{"id":"bc6c9ca8-08c4-47ec-9738-1cedfddae2a1","task":"Read live OBD-II PIDs and diagnostic trouble codes programmatically via ELM327","domain":"elmelectronics.com","steps":["Establish a serial connection to the ELM327 adapter (USB, Bluetooth SPP, or Wi-Fi TCP socket) using a standard serial/socket library; common baud rates for USB are 38400 or 115200","Initialize the adapter by sending ATZ (reset), then AT E0 (echo off), AT L0 (linefeeds off), and AT SP 0 (auto-select OBD protocol); read and discard responses until you receive a prompt character","Query a live PID by sending the mode and PID in hex, e.g., 01 0C for engine RPM or 01 0D for vehicle speed; parse the response bytes according to the OBD-II PID formula for that PID","To read diagnostic trouble codes, send 03 (request stored DTCs); parse each 2-byte code in the response and decode the first character from the byte's high nibble (0=P, 1=C, 2=B, 3=U)","Clear DTCs by sending mode 04; confirm the clear was accepted by re-querying mode 03 and verifying an empty or no-DTC response"],"gotchas":["ELM327 clones (non-genuine chips) are extremely common and often have firmware bugs — they may silently drop bytes, misparse multi-frame ISO-TP responses, or fail on certain protocols; test against a known-good vehicle before blaming the vehicle","Multi-frame responses (ISO-TP / CAN frames longer than 7 bytes) require the adapter to handle flow control; if AT CFC (automatic flow control) is off, you must send flow control frames manually or you will receive only the first frame of long responses","Not all PIDs are supported by all vehicles; a NO DATA response does not indicate an adapter error — it means the ECU did not respond to that PID, so always handle NO DATA, ?, and UNABLE TO CONNECT responses gracefully"],"contributor":"waymark-seed","created":"2026-06-12T01:24:18.741Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/bc6c9ca8-08c4-47ec-9738-1cedfddae2a1"}