Skip to Content
UDS Simulator 2.0 Released
Docs0x10 Diagnostic Session Control

Service Interaction Protocol

Diagnostic Session Control

0x10
Protocol Identifier
The gateway to ECU diagnostics. Transition between default, programming, and extended sessions to unlock advanced capabilities.
A Service Identifier (SID) is a single-byte value (0x00–0xFF) in position 0 of every UDS request frame. It specifies which diagnostic operation the client wishes the ECU to execute. The positive response echoes the SID with the high bit set (SID + 0x40).

SYSTEM_STATE

EXTENDED
Current ECU session mode. Affects available services and security protocols.

P2_SERVER

50ms
Standard server response timeout (P2). Extended session uses 100ms.

P2*_SERVER

5000ms
Extended timeout after NRC 0x78 ResponsePending. Encoded at 10ms resolution.

S3_TIMEOUT

5000ms
Time until automatic session reset to Default (0x01).

Overview

ISO 14229-1

“The DiagnosticSessionControl service is used to enable different diagnostic sessions in the server. A diagnostic session enables a specific set of diagnostic services and/or functionalities in the server.”

SID 0x10 is the foundation of the UDS protocol. It must be the first service invoked when transitioning out of the default session. Every other SID’s availability depends on the active session type.

info _entry

At ECU power-on, the server automatically enters Default Session (0x01). No explicit 0x10 request is needed. The S3 timer (5000ms) is active in all non-default sessions — if no TesterPresent (0x3E) is received within this window, the ECU reverts to Default Session.

Session Types

ISO 14229-1 defines four standard session types. Each session unlocks a different set of diagnostic capabilities and has specific security requirements.

Value
Session Type
Description
Requires Security
0x01Default SessionStandard diagnostics: ReadDTC, ReadDID, TesterPresent. Active at power-on.No
0x02Programming SessionFlash reprogramming: RequestDownload (0x34), TransferData (0x36). Requires vehicle standstill.Yes (Level 1+)
0x03Extended DiagnosticAdvanced diagnostics: WriteDID (0x2E), RoutineControl (0x31), IO Control. Most common non-default session.Depends on SID
0x04Safety SystemSafety-critical diagnostics for ASIL-rated systems. Isolated from other session types.Yes (Dedicated)
warning _entry

Values 0x05-0x3F are ISO reserved. Values 0x40-0x5F are vehicle-manufacturer specific. Values 0x60-0x7E are system-supplier specific. An ECU must return NRC 0x12 (subFunctionNotSupported) for any unsupported session type.

Protocol Anatomy

The SID 0x10 request is a compact 2-byte command. The response carries session-specific P2 and P2* timing parameters that the tester must observe.

◆ PROTOCOL ANATOMY

View
REQUEST_TX

0x10 DIAGNOSTIC SESSION CONTROL

RESPONSE_RX

0x10 RESPONSE

Timing Parameters

The positive response to SID 0x10 carries two critical timing parameters that the tester must observe for the remainder of the session. These govern the maximum time the ECU may take to respond.

Parameter
Encoding
Resolution
Default Value
Purpose
P2Big-endian 2 bytes1 ms0x0032 (50ms)Max response time before tester timeout. Extended session uses 100ms (0x0064).
P2*Big-endian 2 bytes10 ms0x01F4 (5000ms)Extended timeout after NRC 0x78 (ResponsePending). Used during long operations like flash erase.
S3Not in responseN/A5000msNon-default session keepalive. Tester must send 0x3E within this window.
tip _entry

P2 encoding pitfall*: The P2* value is encoded at 10ms resolution, not 1ms. A raw value of 0x01F4 (decimal 500) represents 500 × 10ms = 5000ms, not 500ms. This is a common implementation error.

rx_packet

Default/Programming P2 Timing

50 02 00 32 01 F4

> P2=0x0032 (50ms) | P2*=0x01F4 (500 x 10ms = 5000ms)

rx_packet

Extended Session P2 Timing

50 03 00 64 01 F4

> P2=0x0064 (100ms) | P2*=0x01F4 (500 x 10ms = 5000ms)

Session Transition Logic

Session transitions follow a strict hierarchy. Not all transitions are permitted — the ECU enforces a transition matrix based on the current and requested session types.

Protocol Insight

ECU State Synchronization

When the ECU receives a session control request, it must verify conditions (speed, voltage, dependencies) before granting the transition. On success, the S3 timer starts and all security states are reset.

Default Session0x01Programming0x02Extended0x03Safety System0x04Power On / Reset10 0210 0110 0310 0110 0410 01* S3 Timeout (5000ms) reverts any non-default session to Default (0x01)

UDS Session State Transitions

From
To
Allowed
Notes
Default (0x01)Programming (0x02)YesCommon for flash reprogramming workflows
Default (0x01)Extended (0x03)YesMost common transition for diagnostics
Default (0x01)Safety (0x04)YesDirect entry to safety-critical diagnostics
Extended (0x03)Programming (0x02)YesExtended to Programming transition allowed
Extended (0x03)Extended (0x03)YesRe-entry resets security and timers
Extended (0x03)Safety (0x04)NoNRC 0x22 — must go through Default first
Programming (0x02)Extended (0x03)YesProgramming to Extended allowed
Programming (0x02)Programming (0x02)NoNRC 0x22 — re-entry not permitted
Safety (0x04)Safety (0x04)YesRe-entry resets security and timers
Safety (0x04)Any otherNoNRC 0x22 — must return to Default first
Any non-defaultDefault (0x01)YesAlways permitted from any session
info _entry

On any successful session transition (including re-entry), the ECU resets: security access state, active routines, periodic tasks, transfer operations, and communication control state. The S3 timer restarts.

Suppress Positive Response

Bit 7 of the sub-function byte controls response suppression. When set (e.g., 0x83 for Extended session), the ECU performs the session transition but does not send a positive response — reducing bus load in high-throughput scenarios.

RESPONSE_SUPPRESSION_LOGIC

Active Bit 7 (0x80) detection. When present in the sub-function byte, the ECU enters Silent Mode for positive responses, optimizing packet throughput.

Standard_Sequence
tx_packet

Request

10 01
rx_packet

Response

50 01
Suppressed_Sequence
tx_packet

Suppression_Active

10 81
[ HUD_SILENCE_DETECTED ]

! Critical: NRC 0x7F bypasses suppression logic and will always broadcast.

warning _entry

Negative responses are never suppressed. Even with bit 7 set, the ECU will respond with NRC if the transition fails. This ensures the tester always knows about errors.

Sequence Scenarios

Understanding the request-response flow is critical for robust diagnostic implementation.

Successful Session Elevation

3 steps
Tester
ECU

Programming Session with Security Access

6 steps
Tester
ECU

S3 Timeout — Session Revert

4 steps
Tester
ECU

Common Request/Response Pairs

tx_packet

Enter Extended Session

10 03

> Request Extended Diagnostic Session (0x03)

rx_packet

Positive Response

50 03 00 64 01 F4

> Session granted. P2=100ms, P2*=5000ms.

tx_packet

Return to Default

10 01

> Request Default Session (0x01). Always succeeds.

rx_packet

Positive Response

50 01 00 32 01 F4

> Session granted. P2=50ms, P2*=5000ms.

tx_packet

Enter Programming

10 02

> Request Programming Session (0x02)

rx_packet

Positive Response

50 02 00 32 01 F4

> Session granted. P2=50ms, P2*=5000ms.

tx_packet

Suppressed Extended

10 83

> Extended (0x03) + Suppress bit (0x80) = 0x83

[ NO_RESPONSE — SUPPRESSED ]

Negative Response Codes

When a session transition fails, the ECU returns a negative response (0x7F 0x10 [NRC]). The following NRCs are applicable to SID 0x10:

Error_Catalog

Negative Response Codes

THREAT_LEVEL3 HIGH1 MEDIUM4 NRCs TOTAL
ISO_14229_ANNEX_ANRC_ENGINE_V2

Session Change Side Effects

A successful session transition (including re-entry to the same session) triggers a comprehensive state reset. Understanding these side effects is critical for maintaining correct ECU state.

State
Reset Action
ISO Reference
Security AccesssecurityUnlocked = false, securityLevel = 0, currentSeed cleared§9.4.5
Communication ControlAll channels reset to rxEnabled + txEnabled (normalMessages, networkManagement)§9.5
Active RoutinesAll running routines set to idle, progress cleared§9.6.3
Periodic TasksAll scheduled periodic identifier reads cancelled§9.8
Transfer OperationsdownloadInProgress and uploadInProgress set to false, block counter reset§9.11
DTC SettingsdtcRecordingEnabled restored to true§9.13
S3 TimerRestarted from the moment of successful transition§9.2.6
tip _entry

The simulator implements all of these resets in both the SID 0x10 handler (on explicit session change) and the S3 timeout handler (on automatic session revert). This ensures consistent behavior regardless of how the session changes.