Menu

1 / 5

obd2_kit: talk to ELM327 OBD-II adapters from Dart over any transport

DEV Community: mobile·Abdeldjalil Chougui·about 1 hour ago
#m8Ie7S7X
#devtomobile#devto#dev#adapter#replies
Reading 0:00
15s threshold

Reading data from a car looks simple on paper. You plug a small ELM327 adapter into the OBD-II port, send 010C , and get the engine speed back. In practice the adapter is a text terminal with its own habits: it echoes your commands, prints SEARCHING... while it looks for the bus, answers in several small chunks, and reports errors as plain words such as NO DATA or BUS BUSY . Replies can come from several ECUs at once, and a long reply such as the VIN is split over several frames.

On top of that, the link to the adapter is different in every app: Bluetooth SPP, BLE UART, Wi-Fi TCP or USB serial.

obd2_kit is a Dart library that handles the protocol side and leaves the link to you. It works over any byte transport and covers the adapter session, the SAE J1979 services, multi-ECU and multi-frame replies, and live polling.

What it does

The ELM327 session.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.