UDS 0x31 RoutineControl

Start, stop or get the result of a routine inside the ECU: erase flash, self-tests, checks.

Request and response

Bytes
Request31 <routineControlType> <routineIdentifier: 2 bytes> [routineControlOptionRecord]
Positive response71 <routineControlType> <routineIdentifier> [routineStatusRecord]
Negative response7F 31 <NRC>

The positive response service ID is the request's plus 0x40: 31 answers with 71. The byte after the service ID is a sub-function; setting its bit 7 (adding 0x80) asks the ECU not to send a positive response.

Example

Request:   31 01 FF 00
Response:  71 01 FF 00

Start routine FF00 (erase memory), often after a few 7F 31 78.

Control types

ValueName
01startRoutine
02stopRoutine
03requestRoutineResults

Worth knowing

  • FF00 (eraseMemory) and FF01 (checkProgrammingDependencies) are the standard routine IDs; most others are manufacturer-specific.
  • Erasing usually answers 0x78 (response pending) one or more times before the result.

Negative response codes it often returns

Do it in your browser