How to contact with OBD-II

There is an OBD-II device, for example http://www.rczd.com/c/2015/Car_Diagnostic_Tools_0223/41193.html this device provider does not have its own web page or documentation source. We have a short “quick start” in the field and the confidence that it supports OBD-II PIDs .

I recently used https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_1_PID_41

The question is whether there is a common template how to communicate with this icar device.

Before I connected to the (freematics)dongle , which sent a stream of data that I processed on the fly.

The current one sends only one value after one request, which we send to it (it is synchronous and cannot process more than one request in time).

I would like to receive updated OBD-II parameters to display them (often).

Any ideas?

+6
source share
1 answer

If your device is compatible with ELM327, you can use several PID requests, but only if the adapter is connected to a vehicle with CAN protocol. Thus, this will only work with a subset of vehicles, because not all vehicles support CAN.

Popular scanning tools simply send sequential requests. The maximum bandwidth that you can get with this approach is about 30-40 rps.

I don’t know how the freematics file works, but I see that it has some SD card installed - maybe it only gives parallelism emulation and internally every request is sent sequentially?

If you are looking for a reliable Java library to connect to your 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

+9
source

Source: https://habr.com/ru/post/983899/


All Articles