OBD-II PID 21: Distance travelled with the check-engine lamp on

Mode 01 PID 21 (SAE J1979) reports distance travelled with the check-engine lamp on. Request 01 21; the response 41 21 carries 2 data bytes, decoded with 256 A + B.

Request and response

Request:   01 21
Response:  41 21 A B

Send 01 21 to the functional address 0x7DF (every emissions ECU answers) or to one ECU, such as 0x7E0 for the engine. The answer starts 41 21 and carries 2 data bytes, named A and B in the formula. In a freeze frame (mode 02) the same PID comes as 42 21 00 followed by the data.

Formula

ValueFormulaUnit
Distance travelled with the check-engine lamp on256 A + Bkm

Worked example

Response:  41 21 00 00
Distance travelled with the check-engine lamp on: 0 km

Worth knowing

  • Not every vehicle supports PID 21. A vehicle that does not stays silent; PIDs 00, 20, 40 … list the ones it supports.
  • Over CAN (ISO 15765-4) the request is one frame such as 02 01 21 on 0x7DF, and each ECU answers on its own ID (0x7E8 for the engine).
  • Values are metric: temperatures in °C, speeds in km/h, pressures in kPa.

Nearby PIDs

Do it in your browser