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

  • What you seem to be asking for is paid labor and not a specific question. – Mohammad Ali Feb 3 '17 at 2:48
  • I just want to know if anyone knows where I can find documentation for this, there must be docs somewhere because there are several apps for Android and Linux that can do this using apparently standardized protocols. I just can't find any mention of them anywhere. – user306690 Feb 5 '17 at 0:44
  • 1
    this describes the protocol stackoverflow.com/questions/10498747/car-obdii-wlan-protocol , and this describes how to connect to the obd2 sensor amazon.ca/review/R5HUE5N2GJ8ZF/… – Mohammad Ali Feb 5 '17 at 0:56
  • That first link was a lot of help. Somewhere in there it mentioned web-sockets. After looking that up I found out I can connect to the port using netcat, and once connected I just have to use the hexadecimal commands. So far that seems to be working, thanks! – user306690 Feb 7 '17 at 0:50

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

netcat 35000

Where 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/

| improve this answer | |

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:

Then I followed these instructions


python obd_gui.py

Output shown is my VNC screen to raspberry pi 3

python obd_gui

| improve this answer | |
  • Thanks for the answer! I've been asked to review your answer, and I have just one comment that might improve it: As I read the original question, and then read your answer, it's not quite clear how it relates to the original question. And so I'd suggest that you begin you answer with something along the lines of, "Here's how to connect your RPi to the OBDII adapter in your car:", and then, something along the lines of, "Python is a good language to use to implement the connection...". All up to you, of course, but remember that reader's attention spans are short. – Seamus Aug 4 '18 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.