How to connect elm327 wifi OBD2 device with raspberry pi 3 and view the data through Terminal?

  • 1.2K Views
  • Last Post 04 August 2018
Mohamed Yasin A posted this 15 January 2018

Hi All,

I'm trying to connect with ELM327 Wifi OBD2 device with raspberry PI 3. Currently I'm able to connect through OBD Cat Doctor App but I would like to gather the same information from Raspberry PI Terminal. Please advice How to connect and retrieve it. I'm new-bee to Raspberry PI and OBD.

I tried connecting netcat 192.168.0.10 35000 and passing the mode cod( https://en.wikipedia.org/wiki/OBD-II_PIDs#Modes), but its not giving any response.

Please help.

Order By: Standard | Newest | Votes
inCarDoc posted this 15 January 2018

Unfortunately can't say anything regarding Raspberry specific, just some general tips on communication from any outer platform.

  • setup direct WiFi connection from Raspberry to OBD2 Device
  • check that Raspberry's get (or pre-set) address in the same network 192.168.0.XXX and mask is 255.255.255.0
  • setup socket (serial port protocol - SPP) connection from "terminal" with OBD2 device
  • first check that OBD2 responds with "internal" AT-commands, for example ATZ - reset the device
  • be sure that sent command is finished with "carriage return" (using terminal, that is automatic... just pressing Enter at the end of command)
  • if all above is Ok, could proceed with OBD2 commands

Thanks! 

Keith Phillips posted this 04 August 2018

I was finally able to make this work. Had to make a virtual serial port ttyUSB0 with socat on raspbian stretch.

socat pty,link=/dev/ttyUSB0,waitslave tcp:192.168.0.10:35000&

Then I followed these instructions

http://www.cowfishstudios.com/blog/obd-pi-raspberry-pi-displaying-car-diagnostics-obd-ii-data-on-an-aftermarket-head-unit

python obd_gui.py