Difference between revisions of "OBDLink LX"
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | https:// | + | __NOTOC__ |
− | = Connecting to an OBDLink LX from Linux = | + | [[File:OBDLinkLX .jpg|400px]] |
− | the following was tested on a Raspberry PI | + | |
+ | Connection: Bluetooth /WireLess | ||
+ | |||
+ | This device is in principle fast and supports AT STM commands. Due to the bluetooth connection the handling may get somewhat unreliable in comparison to the {{Link|target=OBDLink SX}} USB cable variant | ||
+ | = Status = | ||
+ | [[can4eve support::indirectly supported e.g. via rfcomm or ip forwarding on linux]] | ||
+ | = Identification = | ||
+ | <source lang='bash'> | ||
+ | >AT I | ||
+ | ELM327 v1.3a | ||
+ | |||
+ | >AT @1 | ||
+ | SCANTOOL.NET LLC | ||
+ | |||
+ | >STDI | ||
+ | OBDLink LX BT r1.2 | ||
+ | |||
+ | >STI | ||
+ | STN1155 v4.0.0 | ||
+ | >AT RV | ||
+ | 13.4V | ||
+ | </source> | ||
+ | = Where to Buy = | ||
+ | As of 2017-02 the device was available via [https://www.amazon.de/ScanTool-427201-OBDLink-Bluetooth-Professionelle/dp/B00H9S71LW Amazon] for some EUR 60 - as of 2017-08 the price is almost 100 EUR. | ||
+ | |||
+ | As of 2017-06 it is advertised for some US50 at: | ||
+ | https://www.scantool.net/obdlink-lxbt/ | ||
+ | |||
+ | = Usage = | ||
+ | |||
+ | == Connecting to an OBDLink LX from Linux == | ||
+ | the following was tested on a {{Link|target=Raspberry PI}} | ||
+ | |||
+ | see https://www.raspberrypi.org/forums/viewtopic.php?t=214373 | ||
+ | == check connection == | ||
+ | === Bluetooth services === | ||
+ | <source lang='bash'> | ||
+ | service bluetooth status | ||
+ | ● bluetooth.service - Bluetooth service | ||
+ | Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset | ||
+ | Active: active (running) since Thu 2019-01-24 08:51:05 CET; 3min 2s ago | ||
+ | Docs: man:bluetoothd(8) | ||
+ | Main PID: 849 (bluetoothd) | ||
+ | Status: "Running" | ||
+ | CGroup: /system.slice/bluetooth.service | ||
+ | └─849 /usr/lib/bluetooth/bluetoothd | ||
+ | </source> | ||
+ | === Pairing === | ||
+ | Pair the device using the Graphical User Interface Bluetooth button in the top right. | ||
+ | You will not be able to connect the message is "Connection failed - No usabel services on this device". | ||
+ | We'll work around this with some python helper software | ||
+ | Check result with commmand line: | ||
+ | <source lang='bash'> | ||
+ | bluetoothctl | ||
+ | [NEW] Controller B8:27:EB:2E:AB:2B pito [default] | ||
+ | [NEW] Device 00:04:3E:9F:A3:C0 OBDLink LX | ||
+ | quit | ||
+ | </source> | ||
+ | |||
+ | === Bluetooth pairing with bluetoothctl === | ||
<source lang='bash'> | <source lang='bash'> | ||
bluetoothctl | bluetoothctl | ||
Line 11: | Line 70: | ||
pair 00:04:3E:9F:A3:C0 | pair 00:04:3E:9F:A3:C0 | ||
Attempting to pair with 00:04:3E:9F:A3:C0 | Attempting to pair with 00:04:3E:9F:A3:C0 | ||
+ | [CHG] Device 00:04:3E:9F:A3:C0 Class: 0x020300 | ||
+ | [CHG] Device 00:04:3E:9F:A3:C0 Icon: network-wireless | ||
+ | [CHG] Device 00:04:3E:9F:A3:C0 Connected: yes | ||
+ | Request confirmation | ||
+ | [agent] Confirm passkey 559460 (yes/no): yes | ||
+ | [CHG] Device 00:04:3E:9F:A3:C0 UUIDs: | ||
+ | 00001101-0000-1000-8000-00805f9b34fb | ||
+ | [CHG] Device 00:04:3E:9F:A3:C0 Paired: yes | ||
Pairing successful | Pairing successful | ||
[CHG] Device 00:04:3E:9F:A3:C0 Trusted: yes | [CHG] Device 00:04:3E:9F:A3:C0 Trusted: yes | ||
Changing 00:04:3E:9F:A3:C0 trust succeeded | Changing 00:04:3E:9F:A3:C0 trust succeeded | ||
quit | quit | ||
+ | </source> | ||
+ | |||
+ | === Setting up an rfcomm device === | ||
+ | <source lang='bash'> | ||
sudo rfcomm bind rfcomm0 00:04:3E:9F:A3:C0 | sudo rfcomm bind rfcomm0 00:04:3E:9F:A3:C0 | ||
− | ls -l /dev/rfcomm0 | + | ls -l /dev/rfcomm0 |
+ | crw-rw---- 1 root dialout 216, 0 Jun 21 21:41 /dev/rfcomm0 | ||
+ | </source> | ||
+ | |||
+ | === Testing === | ||
+ | <source lang='bash'> | ||
+ | minicom -D /dev/rfcomm0 -b 115200 | ||
+ | </source> | ||
+ | |||
+ | === Testing with a python script === | ||
+ | <source lang='bash'> | ||
python3 source/java/can4eve/scripts/obdtest.py | python3 source/java/can4eve/scripts/obdtest.py | ||
>K | >K | ||
Line 42: | Line 123: | ||
> | > | ||
+ | </source> | ||
+ | |||
+ | === Forwarding the OBDII Adapter via TCP/IP === | ||
+ | There is a helper script obdii_blue available that you can use to redirect the bluetooth device to tcip/ip. | ||
+ | === Example script call === | ||
+ | <source lang='bash'> | ||
+ | #!/bin/bash | ||
+ | # WF 2019-01-24 | ||
+ | cd $HOME/source/java/can4eve/scripts | ||
+ | ./obdii_blue 00:04:3E:9F:A3:C0 | ||
+ | </source> | ||
+ | |||
+ | ==== redirect script ==== | ||
+ | You can also try out the redirect directly as shown below | ||
+ | <source lang='bash'> | ||
python source/java/can4eve/scripts/tcp_serial_redirect.py --debug -P 7000 /dev/rfcomm0 115200 | python source/java/can4eve/scripts/tcp_serial_redirect.py --debug -P 7000 /dev/rfcomm0 115200 | ||
--- TCP/IP to Serial redirect on /dev/rfcomm0 115200,8,N,1 --- | --- TCP/IP to Serial redirect on /dev/rfcomm0 115200,8,N,1 --- | ||
Line 47: | Line 143: | ||
Waiting for connection on 7000... | Waiting for connection on 7000... | ||
</source> | </source> | ||
+ | At this point your OBDLink LX is available via LAN - you can simply do a telnet host 7000 to the server where you ran the commands. | ||
+ | The can4eve software can now use the bluetooth device as if it was a Wifi/LAN device | ||
+ | |||
+ | = What links here = | ||
+ | {{WhatLinksHere}} | ||
+ | = Picture = | ||
+ | [[Has image::File:OBDLinkLX .jpg]] | ||
+ | [[Category:can4eve]] | ||
[[Category:ELM327]] | [[Category:ELM327]] |
Latest revision as of 06:49, 6 September 2019
Connection: Bluetooth /WireLess
This device is in principle fast and supports AT STM commands. Due to the bluetooth connection the handling may get somewhat unreliable in comparison to the OBDLink SX USB cable variant
Status
indirectly supported e.g. via rfcomm or ip forwarding on linux
Identification
>AT I
ELM327 v1.3a
>AT @1
SCANTOOL.NET LLC
>STDI
OBDLink LX BT r1.2
>STI
STN1155 v4.0.0
>AT RV
13.4V
Where to Buy
As of 2017-02 the device was available via Amazon for some EUR 60 - as of 2017-08 the price is almost 100 EUR.
As of 2017-06 it is advertised for some US50 at: https://www.scantool.net/obdlink-lxbt/
Usage
Connecting to an OBDLink LX from Linux
the following was tested on a Raspberry PI
see https://www.raspberrypi.org/forums/viewtopic.php?t=214373
check connection
Bluetooth services
service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
Active: active (running) since Thu 2019-01-24 08:51:05 CET; 3min 2s ago
Docs: man:bluetoothd(8)
Main PID: 849 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─849 /usr/lib/bluetooth/bluetoothd
Pairing
Pair the device using the Graphical User Interface Bluetooth button in the top right. You will not be able to connect the message is "Connection failed - No usabel services on this device". We'll work around this with some python helper software Check result with commmand line:
bluetoothctl
[NEW] Controller B8:27:EB:2E:AB:2B pito [default]
[NEW] Device 00:04:3E:9F:A3:C0 OBDLink LX
quit
Bluetooth pairing with bluetoothctl
bluetoothctl
agent on
scan on
Discovery started
...
[NEW] Device 00:04:3E:9F:A3:C0 OBDLink LX
pair 00:04:3E:9F:A3:C0
Attempting to pair with 00:04:3E:9F:A3:C0
[CHG] Device 00:04:3E:9F:A3:C0 Class: 0x020300
[CHG] Device 00:04:3E:9F:A3:C0 Icon: network-wireless
[CHG] Device 00:04:3E:9F:A3:C0 Connected: yes
Request confirmation
[agent] Confirm passkey 559460 (yes/no): yes
[CHG] Device 00:04:3E:9F:A3:C0 UUIDs:
00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 00:04:3E:9F:A3:C0 Paired: yes
Pairing successful
[CHG] Device 00:04:3E:9F:A3:C0 Trusted: yes
Changing 00:04:3E:9F:A3:C0 trust succeeded
quit
Setting up an rfcomm device
sudo rfcomm bind rfcomm0 00:04:3E:9F:A3:C0
ls -l /dev/rfcomm0
crw-rw---- 1 root dialout 216, 0 Jun 21 21:41 /dev/rfcomm0
Testing
minicom -D /dev/rfcomm0 -b 115200
Testing with a python script
python3 source/java/can4eve/scripts/obdtest.py
>K
>LM327 v1.3a
>KE0
OK
>
ELM327 v1.3a
>
OK
>
ISO 15765-4 (CAN 11/500)
>
OK
>
OK
>
OK
>
Forwarding the OBDII Adapter via TCP/IP
There is a helper script obdii_blue available that you can use to redirect the bluetooth device to tcip/ip.
Example script call
#!/bin/bash
# WF 2019-01-24
cd $HOME/source/java/can4eve/scripts
./obdii_blue 00:04:3E:9F:A3:C0
redirect script
You can also try out the redirect directly as shown below
python source/java/can4eve/scripts/tcp_serial_redirect.py --debug -P 7000 /dev/rfcomm0 115200
--- TCP/IP to Serial redirect on /dev/rfcomm0 115200,8,N,1 ---
--- type Ctrl-C / BREAK to quit
Waiting for connection on 7000...
At this point your OBDLink LX is available via LAN - you can simply do a telnet host 7000 to the server where you ran the commands. The can4eve software can now use the bluetooth device as if it was a Wifi/LAN device