Welcome Anonymous !

Everything you need to modify your ride
 

Generic OBDII Discussion

Getting an OBDII Connector Working in Linux

A generic OBDII forum for discussing OBDII protocols, hardware, software, scantools, and other OBDII generic items

Postby ZerOne » Fri Feb 24, 2012 4:15 pm

This excellent information was lifted from the scantool.net website.
https://www.scantool.net/forum/index.php?topic=4668.0

First of all, serial ports come in at least three different flavours.

- An old fashioned hardware based serial port, typically with a 9-pin connector on the computer
- A USB to Serial Adapter, plugged into a USB Port
- A Bluetooth (built-in or dongle) Serial Port Profile (SPP)

All of these are mapped to COMx names in Windows, where x is one or two digits, i.e. COM1.
In Linux there are separate names for each type: /dev/ttyS0, /dev/ttyUSB0 and /dev/rfcomm0.
As in Windows, the last digit might be different if more than one of each type is provided.

Note that /dev/ttyS0 is an ordinary serial port on your machine. If you use a USB to Serial
Adapter, you should instead use /dev/ttyUSB0. Also note, that the last digit in the Linux
name might be a different number, if you have more than one serial port or more than one
USB to Serial adapter.
User avatar
ZerOne
Site Admin
 
Posts: 1285
Images: 16800
Joined: Thu Aug 19, 2010 1:25 pm
Location: Sydney Australia
Has thanked: 14 times
Been thanked: 36 times

Postby ZerOne » Fri Feb 24, 2012 4:19 pm

Installing a Bluetooth USB Adaptor

INSTALL THE SUPPORTING BLUETOOTH SOFTWARE:
Install Blueman with Synaptics Package Manager
(Blueman will be installed in System -> Preferences -> Bluetooth Manager)


DETECT THE BLUETOOTH RECEIVER DEVICE - BLUETOOTH:
Insert the USB Bluetooth Adapter in a USB Port. I am using the inbuilt device that came with my Thinkpad T43
Open a Linux Terminal window and cut/paste the following commands with
the BLUETOOTH Adapter plugged into a USB port.

Code: Select all
lsusb


This will return a Manufactuer & Product Number, so use it to get more information....0a5c:2101...)

Code: Select all
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 004 Device 002: ID 0a5c:201e Broadcom Corp. IBM Integrated Bluetooth IV
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04b3:4482 IBM Corp. Serial Converter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Code: Select all
lsusb -v -d 0a5c:201e


Code: Select all
Bus 004 Device 002: ID 0a5c:201e Broadcom Corp. IBM Integrated Bluetooth IV
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x0a5c Broadcom Corp.
  idProduct          0x201e IBM Integrated Bluetooth IV
  bcdDevice            0.09
  iManufacturer           1
  iProduct                2

etc, etc, etc.....


Code: Select all
dmesg | tail


[ 16.774745] Bluetooth: Core ver 2.15
[ 16.816594] lp0: using parport0 (interrupt-driven).
[ 16.819990] ieee80211: 802.11 data/management/control stack, git-1.1.13
[ 16.819993] ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
[ 16.820070] NET: Registered protocol family 31
[ 16.820072] Bluetooth: HCI device and connection manager initialized
[ 16.820076] Bluetooth: HCI socket layer initialized
User avatar
ZerOne
Site Admin
 
Posts: 1285
Images: 16800
Joined: Thu Aug 19, 2010 1:25 pm
Location: Sydney Australia
Has thanked: 14 times
Been thanked: 36 times

Postby ZerOne » Fri Feb 24, 2012 4:21 pm

LINKING the COMM PORT: SYMBOLIC vs HARD

Code: Select all
ls -l /dev/ttyS*


crw-rw---- 1 root dialout 4, 64 2010-11-14 21:37 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2010-11-14 21:37 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2010-11-14 21:37 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2010-11-14 21:37 /dev/ttyS3

Plug the Bluetooth ODBII Reader into the vehicle's ODBII Port.
Click on the Bluetooth Icon in the Top Right Toolbar, and select the
Device once it is detected. Select the PIN, or try 1234. Open Blueman,
and start the Serial Service. This should create /dev/rfcomm0, and there should
be a additional BLUE DOT on the Top Right of the Blueman Icon in the Top Toolbar.

Code: Select all
ls -l /dev/rf*
sudo chmod 766 /dev/rfcomm0


Create a HARD Link to an unused COMM Port. We need to REMOVE
/dev/ttyS3, and then create a HARD Link with:

Code: Select all
sudo rm /dev/ttyS3
sudo ln /dev/rfcomm0 /dev/ttyS3
sudo chmod 766 /dev/ttyS3


Open your ODBII Software, and select the proper Communications Port & the correct Baud Rate.
User avatar
ZerOne
Site Admin
 
Posts: 1285
Images: 16800
Joined: Thu Aug 19, 2010 1:25 pm
Location: Sydney Australia
Has thanked: 14 times
Been thanked: 36 times


Return to Generic OBDII Discussion

  • View new posts
  • View unanswered posts
  • Who is online
  • In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
  • Most users ever online was 902 on Sat May 11, 2024 5:19 pm
  • Users browsing this forum: No registered users and 1 guest