Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to communicate with OBD-II device

There is OBD-II device like http://www.rczd.com/c/2015/Car_Diagnostic_Tools_0223/41193.html this device provider does not have its web page or documentation source. We have short "quick start" in box and assurance that it support OBD-II PIDs.

Recently I used to follow https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_1_PID_41

The question is, if there are any general pattern how to communicate with this icar device.

Before I've used to connect with (freematics)dongle that has send the stream of data which I've parsed on fly.

Current one send only one value after one request we send to it (it is synchronous and can't handle more than one request per time).

I would like to get up-to-date OBD-II params to display them(frequently).

Any ideas ?

like image 401
Jacob Avatar asked Mar 17 '15 09:03

Jacob


People also ask

How does OBD communicate?

Modern OBD implementations use a standardized digital communications port to provide real-time data in addition to a standardized series of diagnostic trouble codes, or DTCs, which allow a person to rapidly identify and remedy malfunctions within the vehicle.

Why is my car not communicating with scanner?

In most cases, communication issues can be caused by various reasons including: ignition-key position, connector-voltage issues, incorrect communication protocol, hung ECM, missing or bad data, and OEM-updated ECM software that is unknown to the scan tool.

How do I connect my OBD2 to WiFi?

Go to the settings of your smartphone / tablet, to the Wi-Fi section. Connect to the Wi-Fi network created by the adapter *. Turn on the MotorData OBD application, specify Wi-Fi in the “Connection Type” settings, check the correctness of the address * and port * of the adapter.


1 Answers

If your device is compatible with the ELM327 you can use multiple PID requests but only if adapter is connected to the vehicle with CAN protocol. So it would work only with a subset of vehicles because not all vehicles support CAN.

Popular scan tools simply sends sequential requests. Maximum throughput you can gain with this approach is about 30-40 rps.

I don't know how freematics dongle works but I can see it has some SD card mounted - maybe it gives only emulation of parallelism and internally every request is sent sequentially?

If you are searching for reliable Java library for connecting to OBD II device I would recommend you https://github.com/pires/obd-java-api . You can also take a look at my library - https://github.com/devesion/java-obd-adapter

like image 159
Łukasz Dembiński Avatar answered Oct 06 '22 22:10

Łukasz Dembiński