1

I have a Wi-Fi enabled OBDII dongle for my car and want to connect it to my Pi to log diagnostics. I can find libraries and information for USB and Bluetooth OBDII adapters, but can't find anything about using Wi-Fi adapters.

Does anyone know how to use Python, C++, or any other language on a Raspberry Pi to connect to Wi-Fi OBDII adapter?

Sorry if this is the wrong forum for this but I figured this one had the best chance of anyone knowing

user306690
  • 51
  • 1
  • 4

2 Answers2

1

You can use netcat to open a web-socket port.

netcat 192.168.0.10 35000

Where 192.168.0.10 is the OBDII adapter's IP address and 3500 is it's port number.

In Python you can connect with the websocket API on PyPI - https://pypi.python.org/pypi/websocket-client/

user306690
  • 51
  • 1
  • 4
1

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

Output shown is my VNC screen to raspberry pi 3

python obd_gui

Seamus
  • 23,558
  • 5
  • 42
  • 83