ControlDTCSetting (0x85)
UDS ControlDTCSetting (0x85) turns fault-code storage on an ECU on or off during a test. The sub-functions, request and response bytes and what to validate.
Updated This page as Markdown
In short
ControlDTCSetting (0x85) turns the storing of diagnostic trouble codes on an ECU on or off, so a test does not fill the fault memory with its own side effects. The sub-function selects on (01) or off (02). The request 85 02 stops DTC storage, the positive response C5 02 confirms it. It needs the extended session, and the ECU must turn DTC storage back on when the session ends or the ECU resets.
What is ControlDTCSetting (0x85)?
ControlDTCSetting turns the recording of diagnostic trouble codes on or off. The sub-function byte selects the state: on resumes normal DTC storage, off suspends it for the duration of the session.
A normal exchange:
| Direction | Bytes | Meaning |
|---|---|---|
| Request | 85 02 | DTC setting off |
| Positive response | C5 02 | accepted, storage suspended |
| Negative response | 7F 85 7F | serviceNotSupportedInActiveSession |
Other typical negative responses are 7F 85 12 (subFunctionNotSupported), 7F 85 13 (incorrectMessageLengthOrInvalidFormat) and 7F 85 22 (conditionsNotCorrect).
Where is it defined?
ISO 14229-1:2020 defines ControlDTCSetting (0x85) in the Diagnostic and communication management functional unit. The standard specifies the on and off sub-functions, the optional DTCSettingControlOptionRecord and the rule that the service is session-dependent, so the setting is tied to the active session and restored on return to the default session. The transport on CAN is ISO 15765-2. The faults themselves are read with ReadDTCInformation (0x19).
What it means in practice
ControlDTCSetting belongs to a tester that is about to do something that would otherwise set faults, so it lives in the extended session and is not meant to be reachable by default. In validation, engineers check:
- the service answers only in the intended session and gives NRC 0x7F in the default session;
- an unknown sub-function gives NRC 0x12 and a wrong length gives NRC 0x13;
- DTC storage resumes on session timeout, session change and reset;
- with storage off, side-effect faults are genuinely suppressed and real monitoring is restored afterwards.
The security-relevant failure is an ECU that leaves DTC storage off after the tester is gone, because a fault that occurs later would then not be recorded. We regularly see this alongside other session-handling bugs where state does not reset on an S3 timeout.
How AutoST tests it
AutoST records ControlDTCSetting during enumeration, including in which sessions it answers and with which negative response codes, and checks that DTC storage returns to on when the session ends. The session-survival check in enumeration surfaces an ECU that keeps the setting off after an S3 timeout or reset, and the DTC-count monitor in the fuzzing engine reads 0x19 so it can tell whether fault storage is behaving as expected during a run.
FAQ
Frequently asked questions
What are the two sub-functions?
ControlDTCSetting defines on (0x01), which resumes DTC storage, and off (0x02), which suspends it. An optional DTCSettingControlOptionRecord can scope the control to a group of DTCs on ECUs that support it.
Why turn DTC setting off during a test?
A diagnostic session, a routine or a reset can set faults that are side effects of testing, not real failures. Turning DTC storage off keeps the fault memory clean, and turning it back on restores normal behaviour afterwards.
What must happen when the session ends?
DTC storage must return to on. An ECU that leaves fault-code storage off after the session times out or the ECU resets has a session-handling bug, because a real fault could then go unrecorded.
Sources
Related pages
- GlossaryDTC (Diagnostic Trouble Code)A DTC is a fault code an ECU stores when it detects a problem. The 3-byte UDS format, the status byte, how 0x19 and 0x14 read and clear them, and their role in fuzzing.
- GlossaryReadDTCInformation (0x19)UDS ReadDTCInformation (0x19) reads diagnostic trouble codes and their status from an ECU. The sub-functions, request and response bytes and what to validate.
- GlossaryDiagnostic session (DiagnosticSessionControl 0x10)UDS DiagnosticSessionControl (0x10) switches an ECU between default, extended and programming session. Bytes, timing parameters and what to validate.
- PlatformKnow every door into the ECU.AutoST enumerates an ECU over UDS: diagnostic endpoints, sessions, all 255 services and readable DIDs, plus XCP/CCP discovery. Risky services are flagged automatically.
- InsightsECU reset and session handling bugs, and how to test themHow to test UDS session and reset handling: session fallback, S3 timeout, security state after reset, TesterPresent keeping a session alive, and what each result means.
- Free toolsUDS Message DecoderPaste UDS bytes from a trace and see what they mean: service, sub-function, session, DIDs, routine identifier, SecurityAccess level or NRC, per ISO 14229-1.
