Scanner OBD2 in OpenWrt
With the advent of OBD2 (On-Board Diagnostics) in cars many models of different scanners appeared in the market which allow you to connect and look into the "brains" of a car. Some of you have probably built your first Kline adapter at home in order to understand by yourself the reasons of indication of CHECK ENGINE on the panel. Therefore, this section will probably be more interesting to motorists who couldn’t imagine before that the car can diagnosed using home router. ))).
On the stage of configuration OpenWrt the following modules are to be selected:
At the moment of writing of this article the utility for working with obd2 isn’t included in OpenWrt. Therefore I suggest considering the program Freediag from there
Downloading and installing the packages:
root@OpenWrt:/# opkg install kmod-usb-serial-ftdi
Installing kmod-usb-serial-ftdi (188.8.131.52-1) to root...
Installing kmod-usb-serial (184.108.40.206-1) to root...
Let’s connect the scanner OBD2 to the diagnostic connector in our car. A blue led should begin to light inside of the scanner box OBD2. Let’s connect the scanner OBD2 to the USB-port and check the output dmesg:
ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
ftdi_sio 1-1.3:1.0: device disconnected
usb 1-1.3: new full speed USB device using ohci_hcd and address 6
ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
usb 1-1.3: Detected FT232RL
usb 1-1.3: Number of endpoints 2
usb 1-1.3: Endpoint 1 MaxPacketSize 64
usb 1-1.3: Endpoint 2 MaxPacketSize 64
usb 1-1.3: Setting MaxPacketSize 64
usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
The scanner OBD2 has detected in the system as a device ttyUSB0.
Let’s start the Freediag. The base of the Freediag is the utility scantool, therefore let’s start scantool.
scantool: version 0.3
scantool: Type HELP for a list of commands
scantool: Type SCAN to start ODBII Scan
scantool: Then use MONITOR to monitor real-time data
The documentation for the Freediag scantool is available as well as on the web site as in the directory with the initial code. Therefore the available command set you can find there. The command scan starts the scanning.
Trying SAEJ1850-VPW ... failed!
Trying SAEJ1850-PWM ... failed!
Trying ISO14230_FAST ... Failed to open hardware interface failed!
Trying ISO14230_FAST !ISO9141-2
Connection to ECU established
MIL light OFF, 0 stored DTC(s)