On-board diagnostics explained
On-board diagnostics is the vehicle’s ability to detect faults and report data. A scan tool asks the control modules for readings, fault records and test results. Below: every term, grouped by what it does, with where each one is used.
1. Modules and tools
A vehicle contains several computers on shared networks. Each controls one job. Diagnostics means talking to them.
| Term | Definition |
|---|---|
| ECU / module / controller | Electronic control unit: a computer with software, inputs and outputs. The three words are used interchangeably. ECU sometimes means engine control unit specifically. |
| ECM / PCM / TCM | Engine, powertrain (engine + transmission) and transmission control modules. |
| BCM / ABS / SRS | Body control module, anti-lock brake controller, airbag (supplemental restraint) controller. |
| Node | Anything on a network: a module or a diagnostic interface. One module can sit on several networks. |
| Gateway | Module joining networks. Forwards diagnostic requests, translates addresses and can block access. |
| Tester / scan tool | The device or app sending requests. The module answering is the server. |
| Adapter / VCI | Vehicle communication interface: the hardware between your phone or computer and the car. |
2. OBD-II and the connector
OBD-II is the standardized, emissions-focused part of diagnostics: one connector, a few permitted protocols and a common request set. Every manufacturer supports it. Everything beyond emissions (ABS, airbags, body, coding) uses the manufacturer’s own diagnostics. EOBD is the European equivalent. OBD-I means the earlier, unstandardized systems.
| DLC pin | Use |
|---|---|
| 6 and 14 | CAN High / CAN Low (standard OBD CAN). |
| 4, 5, 16 | Chassis ground, signal ground, battery +12 V (live with ignition off). |
| 7 (and 15) | K-Line (and optional L-Line) for ISO 9141 / KWP2000. |
| 2 and 10 | J1850: pin 2 for VPW, pins 2 + 10 for PWM. |
| 1, 3, 8, 9, 11, 12, 13 | Manufacturer use: GM SWCAN on 1, Ford MS-CAN on 3 + 11, BMW Ethernet activation on 8. |
DLC (diagnostic link connector) is the socket, SAE J1962. US cars from model year 1996; EU petrol from 2001, diesel from 2004.
3. Layers: OSI and the three-level model
The OSI model splits communication into seven layers, each with one job. Vehicle protocols fill only some of them. Knowing the layer tells you which terms can be swapped and which can’t: UDS can ride on CAN or Ethernet; ISO-TP only carries, it never interprets.
| OSI layer | Job | Vehicle examples |
|---|---|---|
| 7 · Application | What the message means | OBD-II services (J1979), UDS (ISO 14229), KWP2000 (ISO 14230), GMLAN diagnostics, J1939-73 |
| 6 · Presentation | Encoding of values | Scaling and formulas defined by the application layer or ODX/DBC files |
| 5 · Session | Dialogue state | UDS sessions (service 10), TesterPresent, KWP StartCommunication |
| 4 · Transport | Splitting and reassembling long messages | ISO-TP (ISO 15765-2), VW TP2.0, J1939-21 transport, DoIP |
| 3 · Network | Addressing and routing | Diagnostic addressing (7DF/7E0), gateways, DoIP logical addresses, IP |
| 2 · Data link | Frames, IDs, error checks | CAN / CAN FD frames, K-Line bytes, LIN frames, Ethernet MAC |
| 1 · Physical | Wires and voltages | CAN High/Low, SWCAN, K-Line, J1850, LIN, 100BASE-T1 Ethernet |
In practice three levels cover CAN diagnostics. A request travels down, the reply travels back up.
Level 3 · Meaning (OSI 5–7)
OBD-II / UDS / GMLAN / KWP2000
Ask for RPM: 01 0C → answer: 41 0C 1A F8
Level 2 · Delivery (OSI 3–4)
Addressing and transport, usually ISO-TP
Pick request/response IDs; split long messages; reassemble replies
Level 1 · Network (OSI 1–2)
CAN frames, transceiver and wires
CAN ID + length + data → CAN High / CAN Low → module
- The app asks for RPM: service 01, PID 0C.
- The interface sends a CAN frame on functional ID 7DF; ISO-TP adds the length byte.
- The engine module replies on 7E8 with 41 0C 1A F8.
- 41 = positive reply to 01, 0C = RPM, 1A F8 = raw value → 1,726 RPM.
The phone-to-adapter link (USB, Bluetooth, Wi-Fi) sits outside this stack. It carries instructions to the adapter, which speaks CAN.
4. CAN: frames and IDs
CAN (Controller Area Network, ISO 11898) is a shared two-wire bus. Every module hears every frame; each picks the ones it needs.
| Term | Definition |
|---|---|
| Frame | One CAN message: ID, length, up to 8 data bytes (64 on CAN FD), CRC. |
| CAN ID / arbitration ID | 11-bit (standard) or 29-bit (extended) label on a frame. Lower ID wins when two nodes transmit at once. |
| Classic CAN | Up to 8 data bytes per frame, typically 500 kbit/s powertrain, 125–250 kbit/s body. |
| CAN FD | Flexible Data-rate: up to 64 bytes and a faster data phase. Needs CAN FD hardware. |
| Bitrate vs baud | Bitrate is bus speed; baud rate is the serial speed between computer and adapter. |
| DLC (in a frame) | Data Length Code: the frame’s payload length field. Same letters as the connector, different thing. |
| CRC / ACK / bus-off | Error check; receipt by any node; a controller disabling itself after too many errors. |
| Signal | A value packed into a broadcast frame (wheel speed, coolant), with bit position, scale and unit. |
| Hex | Base 16, digits 0–9 and A–F. One byte = two hex digits (00–FF). 0x is a notation prefix. |
7F7 in an ID column is CAN ID 0x7F7 (decimal 2039). Its meaning comes from that vehicle’s address map: often a manufacturer diagnostic request or reply ID. 7F as the first payload byte is something else: the UDS negative response.
5. Addressing and ISO-TP
ISO-TP (ISO 15765-2) carries diagnostic messages longer than one CAN frame: it adds length and sequence bytes, flow control and reassembly.
| Frame type | Job |
|---|---|
| Single Frame (SF) | A complete short message, up to 7 bytes on classic CAN. |
| First Frame (FF) | Starts a long message and gives its total length. |
| Flow Control (FC) | Receiver says continue, how many frames per block and the spacing. |
| Consecutive Frame (CF) | The next piece, numbered in sequence. |
| Addressing | Definition |
|---|---|
| Functional | One request to every emissions module. OBD on 11-bit CAN: 7DF. |
| Physical | One request to one module. Engine: 7E0 → reply 7E8; transmission: 7E1 → 7E9. |
| 29-bit OBD | 18DB33F1 functional; replies on 18DAF1xx, where xx is the module address. |
| Extended addressing | An extra address byte inside the data (used by BMW). Separate from 29-bit IDs. |
Reply = request + 8 holds for standard OBD pairs. Manufacturer modules use their own maps.
6. Message types
| Type | Definition |
|---|---|
| Request | Tester asks for a service: service ID plus a PID, DID, subfunction or arguments. |
| Positive response | Success plus data. Service ID + 0x40 (01 → 41, 22 → 62). |
| Negative response | Structured refusal or delay: 7F, the refused service, a reason code. |
| No response / NO DATA | Nothing arrived in time: wrong address, ignition off, unsupported, filtered. |
| Broadcast / periodic | Frames modules send on their own, repeatedly. Normal vehicle traffic. |
| Event-driven | Frames sent when something changes. |
| Polling | Tester asks again and again. This is what most ‘live data’ is. |
| Passive monitoring / sniffing | Listening to traffic without sending requests. |
| Service / subfunction / mask | Operation; its variant; flag filter that selects records. |
| Payload | The message data inside the frame. |
More channels means slower updates: the adapter splits a fixed request rate among them.
7. PIDs, DIDs and definitions
| Term | Definition |
|---|---|
| PID | Parameter ID: one value within an OBD service. Service 01 PID 0C = RPM. |
| DID | Data Identifier: two-byte UDS value ID, read with service 22. F190 = VIN; most others are manufacturer-defined. |
| User / custom PID | A definition you add to an app: request, address, reply bytes, formula, unit. Usually wraps a manufacturer DID. |
| OBDb | Open database of vehicle signal definitions: how to request and decode each value per vehicle. |
| Scaling | Byte positions, sign, byte order, factor and offset that turn raw bytes into units. |
| Supported-PID bitmap | PIDs 00, 20, 40…: a module’s list of the PIDs it answers. |
| PID (tuning) | Proportional–integral–derivative controller, used for idle and boost. Unrelated to OBD PIDs. |
Confirm a new definition against a known reading: a believable value can still be wrong.
8. OBD services (modes)
Mode and service mean the same thing here. Numbers are hex. Defined in SAE J1979; newer cars use J1979-2 (OBDonUDS).
| Service | Provides |
|---|---|
| 01 · Current data | Live readings (RPM, coolant, trims, MAP), readiness, supported-PID lists. |
| 02 · Freeze frame | Snapshot of readings taken when an emissions fault was stored. |
| 03 · Stored DTCs | Confirmed emissions trouble codes. |
| 04 · Clear | Erases codes, freeze frames and readiness. |
| 05 · O2 sensor tests | Oxygen sensor results on pre-CAN cars. |
| 06 · Monitor results | On-board test results with measured value and min/max limits. |
| 07 · Pending DTCs | Faults seen this or last drive cycle, awaiting confirmation. |
| 08 · Control | Commands a few on-board tests, such as an EVAP leak test. |
| 09 · Vehicle info | VIN (InfoType 02), calibration IDs, CVNs, ECU name. |
| 0A · Permanent DTCs | Codes only the ECU clears, after it verifies the repair. |
| Term | Definition |
|---|---|
| Readiness | Whether each emissions monitor has finished its self-test since the last clear. |
| Mode 06 MID / TID / CID | Monitor, test and component IDs that label each test result. |
| Drive cycle | The temperatures, speeds and times needed for monitors to run. |
| VIN | Vehicle identification number, 17 characters. |
| CALID / CVN | Calibration ID names the software; calibration verification number checksums it. |
9. One request and reply, byte by byte
Request CAN ID 7DF data 02 01 0C 00 00 00 00 00
Response CAN ID 7E8 data 04 41 0C 1A F8 00 00 00
02 / 04 = ISO-TP Single Frame length
01 = request current data
41 = positive response to 01
0C = engine RPM PID
1A F8 = A and B: decimal 26 and 248
RPM = (256 × A + B) / 4 = 1,726
Trailing 00 = paddingOn an ELM327 you type 010C and get 41 0C 1A F8: the adapter adds and strips the framing.
10. DTCs
DTC (Diagnostic Trouble Code, SAE J2012) records a failed self-test. It names the test that failed; the cause can be the part, its wiring, power, ground or a mechanical fault.
| Term | Definition |
|---|---|
| P / B / C / U | Powertrain, body, chassis, network. P0xxx generic, P1xxx manufacturer. |
| Pending | Seen once, awaiting confirmation. |
| Confirmed / stored | Met its confirmation criteria and saved. |
| Active / current | Failing right now. |
| History / intermittent | Failed earlier, passing now. |
| Permanent | Emissions record only the ECU clears after verifying the repair. |
| MIL / CEL | Malfunction indicator lamp, the check-engine light. |
| Failure type byte | Extra detail after a dash (P0123-1C), used by UDS and GM. |
| Status byte | UDS bit flags: test failed, pending, confirmed, warning lamp requested, and more. |
| Extended data | Mileage, counters and conditions stored with the code. |
Save codes and freeze frames before clearing.
11. UDS
UDS (Unified Diagnostic Services, ISO 14229) is the modern manufacturer diagnostic language: reading data and faults, routines, coding and programming. Runs on CAN (via ISO-TP) or Ethernet (via DoIP).
| Service | Purpose |
|---|---|
| 10 · Session control | Switches ECU state: default, extended or programming. |
| 11 · ECU reset | Restarts the module. |
| 14 · Clear DTCs | Erases fault memory. |
| 19 · Read DTCs | Reads codes, status, snapshots and extended data. |
| 22 · Read by identifier | Reads a DID. |
| 27 / 29 · Security / authentication | Seed-key unlock (27) or certificate login (29) before protected actions. |
| 2E · Write by identifier | Writes a DID, changing configuration. |
| 2F · I/O control | Temporarily drives an output: the basis of actuator tests. |
| 31 · Routine control | Starts, stops or reads a built-in procedure. |
| 34 / 36 / 37 · Download | Request, transfer and finish a flash. |
| 3E · Tester present | Keeps a non-default session open. |
Request: 22 F1 90
Positive: 62 F1 90 [VIN bytes]
Negative: 7F 22 31
22 = ReadDataByIdentifier, F190 = VIN DID
62 = positive response to 22
7F = negative response, 22 = service refused, 31 = requestOutOfRange| NRC | Meaning |
|---|---|
| 11 | Service not supported |
| 12 | Subfunction not supported |
| 13 | Wrong length or format |
| 22 | Conditions not correct (engine running, speed, etc.) |
| 31 | Request out of range: identifier unavailable here |
| 33 | Security access denied |
| 78 | Response pending: wait, the answer is coming |
P2 / P2* are the reply time limits; S3 is the session timeout.
12. Bidirectional
In scan-tool marketing, bidirectional means the tool can command the car: run a fan, cycle a solenoid, start a routine.
| Capability | Definition |
|---|---|
| Read | Readings, identity, codes, test results. |
| Clear / reset | Erases stored diagnostic state. |
| Active test | Drives an actuator temporarily. |
| Adaptation / relearn | Resets or relearns stored values (throttle body, injector codes). |
| Coding / configuration | Changes module options. |
| Flashing / programming | Replaces calibration or firmware. |
13. Manufacturer implementations
Every maker speaks OBD-II for emissions and its own diagnostics for everything else.
| Maker | Older networks | Manufacturer diagnostics | Newer |
|---|---|---|---|
| GM | J1850 VPW (Class 2), ALDL | GMLAN (GMW3110), SWCAN body bus | UDS on Global B / VIP |
| Ford | J1850 PWM, UBP | UDS on HS-CAN and MS-CAN (pins 3 + 11) | UDS, CAN FD, DoIP |
| Stellantis (Chrysler) | J1850 VPW, SCI | KWP2000 / UDS on CAN | UDS behind the Secure Gateway |
| VW group | K-Line KW1281, KWP2000 | KWP2000 over VW TP2.0 | UDS on ISO-TP (MQB on), DoIP |
| BMW | K-Line DS2 | KWP2000 / UDS on D-CAN with extended addressing | UDS over DoIP (ENET), F-series on |
| Mercedes | K-Line KWP2000 | KWP2000 / UDS on CAN | UDS, DoIP |
| Toyota / Honda / Nissan | ISO 9141, KWP2000 on K-Line | Proprietary services on CAN | UDS |
| Trucks / heavy duty | J1708 / J1587 | J1939 | J1939, UDS on newer |
GM
| Term | Definition |
|---|---|
| GMLAN | GM’s network family and its diagnostic language (GMW3110). Close to KWP2000 with GM services. |
| Class 2 | GM’s pre-CAN network on J1850 VPW, 10.4 kbit/s. |
| High-speed GMLAN | Two-wire 500 kbit/s CAN for powertrain and chassis. |
| SWCAN | Single-Wire CAN (SAE J2411), 33.3 kbit/s, GM body bus on DLC pin 1. Needs a single-wire transceiver. |
| Global A | GM electrical architecture, roughly 2007–2019, using GMLAN diagnostics. |
| Global B / VIP | Successor architecture with UDS and a security gateway. |
| A9 | GMLAN service 0xA9, ReadDiagnosticInformation: reads DTCs by status mask (subfunction 81). |
| A9 framing | A9 replies arrive as unsolicited frames (UUDT) on a separate ID, one DTC per frame, ending with a terminator. |
| USDT / UUDT | Segmented (ISO-TP) vs unsegmented single-frame diagnostic transfers. |
VW group
| Term | Definition |
|---|---|
| KW1281 | VW’s original K-Line protocol, 1990s. |
| VW TP2.0 | VW Transport Protocol 2.0: opens a channel to a module on CAN with negotiated IDs, acknowledgments and timing, then carries KWP2000. Roughly 2004–2012. |
| Measuring blocks | Numbered groups of readings (block 001 = RPM, coolant…) per module and firmware. |
| Module addresses | Two-digit hex: 01 engine, 02 transmission, 03 ABS, 17 instruments. |
Older shared protocols
| Term | Definition |
|---|---|
| K-Line | Single-wire serial link on DLC pin 7. Physical layer for ISO 9141-2 and KWP2000. |
| ISO 9141-2 | Early OBD-II protocol on K-Line, 10.4 kbit/s, slow init. Common on Asian and European cars. |
| KWP2000 | Keyword Protocol 2000 (ISO 14230): diagnostic language, on K-Line or on CAN. UDS’s predecessor. |
| 5-baud / fast init | K-Line wake-up sequences before talking. |
| J1850 VPW / PWM | SAE pre-CAN networks: VPW 10.4 kbit/s (GM, Chrysler), PWM 41.6 kbit/s (Ford). |
14. Description files
A protocol defines how to ask. A description file defines what one ECU’s requests and replies mean.
| Format | Describes | Used with |
|---|---|---|
| CDD | An ECU’s diagnostic services, DIDs, DTCs and variants | Vector CANdela tools |
| ODX | Same, in open XML (ASAM MCD-2 D / ISO 22901) | OEM and dealer tools |
| PDX | A ZIP package of ODX files | ODX tools |
| DBC | Broadcast CAN frames and their signals | Sniffing and logging |
| A2L | ECU memory map for calibration | XCP / CCP tools |
| Variant | One module + software + configuration combination | All of the above |
15. J1939 (heavy duty)
SAE J1939: trucks, buses, tractors and generators. 29-bit CAN, 250 or 500 kbit/s, mostly broadcast.
| Term | Definition |
|---|---|
| PGN | Parameter Group Number: the message type, taken from part of the 29-bit ID. |
| SPN | Suspect Parameter Number: one value or fault subject. |
| FMI | Failure Mode Identifier: how it failed (high, low, open circuit…). |
| Source address / address claim | A node’s one-byte address and how it claims it; NAME is its 64-bit identity. |
| DM1 | Active DTCs and lamp status, broadcast every second. |
| DM2 | Previously active DTCs, on request. |
| BAM / RTS-CTS | J1939 transport for messages over 8 bytes: broadcast or handshake. |
16. Other networks and protocols
| Term | Definition | Used for |
|---|---|---|
| DoIP | Diagnostics over IP (ISO 13400): UDS over Ethernet, with discovery and routing activation | Fast diagnostics and flashing on newer cars |
| LIN | Single-wire, up to 20 kbit/s, one commander schedules the rest | Switches, mirrors, window motors |
| SOME/IP | Service-oriented messaging over automotive Ethernet | Infotainment, ADAS data |
| CANopen | Higher-layer CAN protocol with object dictionary, PDOs and SDOs | Industrial, e-bikes, forklifts |
| CCP | CAN Calibration Protocol: read and tune ECU memory live | ECU development |
| XCP | CCP’s successor (ASAM), on CAN, Ethernet, USB; uses A2L files | ECU development and tuning |
| MQTT | Publish/subscribe messaging through a broker over IP | Sending readings to dashboards or servers |
17. Adapters and connections
| Term | Definition |
|---|---|
| ELM327 | OBD-to-serial interpreter chip. You send text commands, it handles the vehicle protocol and returns text. Most cheap adapters are ELM clones. |
| AT commands | ELM setup commands: protocol, headers, timeouts, filters (ATSP6, ATH1). |
| STN / ST commands | ScanTool.net chips (OBDLink): ELM-compatible plus ST commands, faster, with SWCAN and better buffering. |
| J2534 | Pass-through standard: a PC API for flashing and dealer software. |
| USB / serial | Wired link to the adapter. May need an OS driver. |
| Bluetooth Classic vs BLE | Two different Bluetooth types. Classic uses SPP serial; BLE uses GATT services. |
| Web Serial | Browser API for serial ports (USB adapters). Chrome and Edge on desktop. |
| Web Bluetooth | Browser API for BLE adapters. Chrome on desktop and Android. |
| CLI | Command-line interface: text-based control of software. |
18. Diagnostic workflow
- Note the complaint and when it happens. Check battery voltage, power and grounds.
- Connect and read identity, stored, pending and permanent codes, and readiness.
- Save the report, freeze frames and extended data.
- Watch a few relevant live values under the fault’s conditions.
- Test wiring and the mechanical side with the manufacturer’s procedure.
- Run active tests once you know what they move. Keep clear of fans and belts.
- After the repair, clear, drive the conditions again and recheck.
Symptom → check
| Symptom | Check |
|---|---|
| Adapter connects, car silent | Ignition, protocol, wiring, timing |
| Generic OBD works, a module doesn’t | Gateway, module address, its diagnostic language |
| Module answers, a value doesn’t | DID support, firmware variant, session, definition |
| Short reads work, VIN or codes fail | Multi-frame transport, flow control, filters, adapter buffer |
| Slow updates | Fewer channels; adapter speed |
| Negative response | Decode the NRC before retrying |
19. The efi2000 scanner
The efi2000 OBD2 scanner runs in Chrome or Edge with an ELM327 or STN adapter, no account needed. It reads live data, readiness, stored, pending and permanent codes, freeze frames and vehicle info, and finds what each module speaks: UDS, GMLAN, KWP2000 or VW TP2.0.
References
- ELM Electronics · ELM327 datasheet
- ASAM MCD-2 D · ODX and PDX
- ISO 27145-2 · WWH-OBD data identifiers
- ISO 27145-3 · UDS-based WWH-OBD messages
- Scapy automotive · protocol layers and ISO-TP
- CANExplorer · GMLAN services and single-wire CAN
- SAE J1939-73 · heavy-duty diagnostics
- OBDb · vehicle signal definitions
| Topic | Standard |
|---|---|
| Connector | SAE J1962 |
| OBD services | SAE J1979 / J1979-2 |
| DTCs | SAE J2012 |
| CAN | ISO 11898 |
| CAN transport / OBD on CAN | ISO 15765-2 / -4 |
| UDS | ISO 14229 |
| KWP2000 | ISO 14230 |
| J1850 | SAE J1850 |
| SWCAN | SAE J2411 |
| DoIP | ISO 13400 |
| LIN | ISO 17987 |
Questions
- How do CAN and OBD-II relate?
- CAN carries frames. OBD-II defines the emissions requests and data sent in them. Since 2008 every US car runs OBD-II on CAN.
- What is 7F7?
- A CAN ID, 0x7F7, used by some makers for module diagnostics. A 7F byte at the start of a payload is a UDS negative response.
- What does a custom PID do?
- It tells the app how to request and decode a value the module already supports.
- What does clearing codes do?
- Erases stored codes, freeze frames and readiness. Permanent codes stay until the ECU verifies the repair.
- What do bidirectional scanners do?
- Command the car: actuator tests, relearns, coding. Flashing is a separate capability.