Modern vehicles contain many electronic control units (ECUs). During development, production, service and repair, engineers need a standardized way to communicate with those ECUs for diagnostics, configuration and programming. Unified Diagnostic Services (UDS) provides this application-layer diagnostic framework.

UDS is specified by the ISO 14229 series. It defines diagnostic services that a diagnostic tester can request from an ECU and the responses that the ECU can return. UDS is not itself a physical network or a transport protocol. It operates over a suitable communication stack, such as ISO-TP over CAN or DoIP over Ethernet.

This guide explains the UDS message model and common services, then connects those concepts to real diagnostic workflows, timing, transport behavior and test engineering.

1. What is UDS?

UDS stands for Unified Diagnostic Services. It defines the diagnostic communication between a tester (client) and an ECU (server).

A tester may be:

  • A workshop diagnostic tool.
  • An end-of-line production tester.
  • An engineering tool used during ECU development.
  • A vehicle test system.
  • An ECU programming tool.

An ECU may expose UDS services to:

  • Read identification and measurement data.
  • Read and clear diagnostic trouble codes (DTCs).
  • Change diagnostic sessions.
  • Perform security-related access control.
  • Execute diagnostic routines.
  • Write configured data.
  • Download software into programmable memory.
  • Control selected ECU communication functions.

The exact services, sub-functions, Data Identifiers (DIDs), routines, memory ranges and access conditions are defined by the ECU diagnostic specification. An ECU is not required to support every service in ISO 14229.

Engineering rule: Treat the ECU diagnostic specification (often represented in an ODX-based workflow) as the authority for supported services, parameters, response formats and preconditions. A generic UDS reference is not a substitute for the ECU-specific definition.

2. UDS architecture and protocol layers

UDS defines the diagnostic application layer. The request and response must still be carried over a network using an appropriate transport and network implementation.

Diagnostic TesterUDS clientTransport LayerISO-TP / DoIPVehicle ECUUDS serverUDS diagnostic communicationThe UDS service layer is independent of the underlying vehicle network.
Conceptual architecture: the tester and ECU exchange UDS application messages through a transport implementation.

Common arrangements include:

Network arrangementDiagnostic transportTypical context
CANISO 15765-2 (ISO-TP)Classical CAN and CAN FD diagnostic communication
EthernetDoIP, ISO 13400Diagnostics and programming over automotive Ethernet
Other supported networksDefined by the applicable implementationDepends on vehicle architecture and project specification

The distinction matters during debugging. A missing UDS response may be caused by addressing, network configuration, transport segmentation, routing, ECU state or application-layer behavior. Do not assume every communication failure is a UDS service failure.

3. UDS message structure

A UDS application request starts with a Service Identifier (SID), followed by parameters defined for that service. The response contains a positive-response SID or a negative-response format, followed by service-specific data.

For example:

Tester request:  22 F1 90
  • 0x22 — ReadDataByIdentifier service.
  • 0xF190 — two-byte DID commonly used for a VIN-related value in many diagnostic conventions.

A positive response typically begins:

ECU response:    62 F1 90 ...

For many services, the positive-response SID is the request SID plus 0x40. Here, 0x22 + 0x40 = 0x62. The remaining bytes contain the DID and its data. The data length, encoding and interpretation must come from the ECU diagnostic specification.

A negative response uses this general structure:

7F <Request SID> <NRC>

For example:

7F 22 31

This is a negative response to service 0x22; NRC 0x31 means requestOutOfRange.

4. Positive responses, negative responses and NRCs

A positive response indicates that the ECU processed the request according to the service's rules. It does not necessarily prove that a larger vehicle-level operation has completed successfully. Interpret the service-specific response data and any subsequent status checks.

A negative response contains:

  • 0x7F — negative response indicator.
  • The original request SID.
  • A Negative Response Code (NRC).

Common NRCs include:

NRCNameGeneral interpretation
0x10generalRejectRequest rejected for a general reason
0x11serviceNotSupportedRequested service is not supported
0x12subFunctionNotSupportedRequested sub-function is not supported
0x13incorrectMessageLengthOrInvalidFormatRequest length or format is invalid
0x22conditionsNotCorrectRequired operating conditions are not met
0x24requestSequenceErrorRequest is not valid in the current sequence
0x31requestOutOfRangeParameter or requested item is outside the supported range
0x33securityAccessDeniedRequired security access is not available
0x35invalidKeySubmitted key is invalid
0x36exceedNumberOfAttemptsSecurity attempt limit has been reached
0x37requiredTimeDelayNotExpiredRequired delay has not elapsed
0x78requestCorrectlyReceived-ResponsePendingECU accepted the request but needs more time

ResponsePending (0x78)

NRC 0x78 is important in practical test automation. It means the server has received the request correctly but cannot provide the final response within the currently applicable response time. The tester should continue waiting according to the applicable timing rules rather than immediately treating the transaction as failed.

A tester must still enforce an overall project-defined timeout and handle repeated pending responses according to the applicable standard and ECU specification.

NRC interpretation

An NRC is a diagnostic clue, not always a complete root-cause explanation. For example, conditionsNotCorrect may relate to vehicle speed, supply voltage, ignition state, engine state, temperature, session or another ECU-specific precondition. Correlate the response with the diagnostic specification and ECU state.

5. Physical and functional addressing

UDS requests are delivered using addressing information provided by the underlying network and transport arrangement. Two common diagnostic addressing concepts are:

  • Physical addressing: a request is directed to a particular ECU. It is commonly used when the tester needs a response from one specific server.
  • Functional addressing: a request is sent to a functionally defined group of ECUs. More than one ECU may process the request and respond, depending on the network, service and implementation.

Addressing is not encoded by the SID itself. The transport/network configuration determines how the target is selected.

For CAN diagnostics, the project defines the relevant request and response CAN identifiers and addressing format. For DoIP, logical addresses and routing activation are part of the communication setup. Always use the addressing rules defined by the vehicle's diagnostic architecture.

Functional requests require particular care in test automation: multiple responses may be expected, and the tester must identify which ECU produced each response.

6. Sub-functions and suppress-positive-response indication

Some UDS services contain a sub-function parameter. The sub-function selects a behavior within the service. For example, DiagnosticSessionControl (0x10) uses a sub-function to identify the requested session.

For services whose sub-function parameter defines it, bit 7 can be used as the suppressPosRspMsgIndicationBit. Setting this bit requests suppression of the positive response for that request, subject to the applicable service and communication rules.

Illustrative session request:

10 03

requests Extended Diagnostic Session.

A request with the suppress-positive-response indication set may be represented as:

10 83

Here 0x83 contains the Extended Session sub-function value 0x03 with bit 7 set. This behavior is not applicable to every UDS service or every parameter byte. Confirm whether the specific service supports the indication before using it.

Do not confuse suppression of a positive response with suppression of all ECU communication. Negative-response behavior and functional-addressing rules must be considered separately.

7. Common UDS services and identifiers

The following table is a practical reference. It is representative, not an ECU capability list.

SIDServiceTypical purpose
0x10DiagnosticSessionControlChange diagnostic session
0x11ECUResetRequest a supported ECU reset
0x14ClearDiagnosticInformationClear selected diagnostic information
0x19ReadDTCInformationRead DTC status, counts and records
0x22ReadDataByIdentifierRead configured data by DID
0x23ReadMemoryByAddressRead an allowed memory range
0x27SecurityAccessPerform configured seed/key access
0x28CommunicationControlControl selected communication
0x29AuthenticationPerform supported authentication procedures
0x2AReadDataByPeriodicIdentifierRequest periodic transmission of configured data
0x2CDynamicallyDefineDataIdentifierDefine a dynamic DID where supported
0x2EWriteDataByIdentifierWrite configured data by DID
0x2FInputOutputControlByIdentifierControl configured inputs/outputs
0x31RoutineControlStart, stop or request routine results
0x34RequestDownloadInitiate a download sequence
0x35RequestUploadInitiate an upload sequence where supported
0x36TransferDataTransfer data blocks
0x37RequestTransferExitEnd a transfer sequence
0x3DWriteMemoryByAddressWrite an allowed memory range
0x3ETesterPresentIndicate tester activity
0x85ControlDTCSettingControl configured DTC-setting behavior

Support for services such as Authentication (0x29), periodic data, dynamic DIDs, memory access and upload varies with the applicable ISO 14229 edition and ECU implementation. Availability, sub-functions, security levels and parameter formats must be checked in the ECU specification.

8. Diagnostic sessions — service 0x10

Diagnostic sessions control which diagnostic functions are available. Common session types include:

Session sub-functionSession
0x01Default Session
0x02Programming Session
0x03Extended Diagnostic Session

A tester typically requests a session using DiagnosticSessionControl:

10 03

The ECU's response may include timing information and other session-related parameters as defined by the service and implementation.

A service that is unavailable in Default Session may be enabled in Extended or Programming Session. Session transitions can also be subject to ECU state, security access and vehicle preconditions.

TesterPresent — service 0x3E

TesterPresent is commonly used to indicate that the tester is still active during a diagnostic session. It is often relevant to the server's S3 session timeout behavior.

Example request:

3E 00

The exact use of TesterPresent, response suppression and timing must follow the ECU's diagnostic configuration. It should not be sent blindly at an arbitrary rate.

9. SecurityAccess and Authentication

SecurityAccess (0x27)

Some diagnostic functions can modify ECU behavior or memory and therefore require authorization. SecurityAccess defines a seed-and-key exchange mechanism for configured security levels.

A simplified sequence is:

  1. The tester requests a seed for a supported security level.
  2. The ECU returns a seed.
  3. The tester calculates a key using the authorized algorithm.
  4. The tester sends the key.
  5. The ECU validates it and grants or denies access.

The algorithm and key material are not one universal public formula defined for all ECUs by UDS. They are controlled by the vehicle manufacturer or supplier. Do not assume that a seed can be converted to a key using a generic formula.

Security implementations may include attempt counters, delay timers, lockout behavior and session restrictions. NRCs such as 0x35, 0x36 and 0x37 are relevant when diagnosing failed attempts.

Authentication (0x29)

Authentication is a distinct UDS service introduced in later editions of the standard. It supports authentication procedures where implemented. It should not be treated as another name for the classic 0x27 seed-and-key mechanism. The supported authentication model and credentials are defined by the ECU and vehicle security architecture.

10. Diagnostic trouble codes — services 0x19 and 0x14

ReadDTCInformation (0x19) provides access to diagnostic trouble code information. Depending on supported sub-functions, a tester may request:

  • DTC counts.
  • DTCs matching a status mask.
  • DTC status information.
  • Snapshot records.
  • Extended data records.

ClearDiagnosticInformation (0x14) requests clearing of selected diagnostic information, subject to ECU rules and operating conditions.

A DTC status byte represents diagnostic status information. The meaning of each status bit and the interpretation of returned records should be taken from the applicable standard and ECU specification.

Clearing a DTC does not repair the underlying fault. A fault may be detected again when the relevant monitor executes.

11. Data identifiers and memory access

ReadDataByIdentifier (0x22)

A DID identifies a configured data item. The DID definition specifies what the data represents, its length, encoding, scaling and access conditions.

Example request:

22 F1 90

Illustrative response:

62 F1 90 56 49 4E ...

The bytes after the DID are example payload bytes only; the actual response length and encoding depend on the ECU definition. Do not assume all DIDs use the same length or byte order.

WriteDataByIdentifier (0x2E)

WriteDataByIdentifier writes a configured data item. The tester must know the exact DID, data format, session and authorization requirements. Writing an incorrect value may affect ECU behavior or make the ECU difficult to diagnose.

Memory access services (0x23 and 0x3D)

ReadMemoryByAddress (0x23) and WriteMemoryByAddress (0x3D) support memory access where enabled. The request contains address and size information encoded according to the service's address-and-length format. Access is typically restricted by ECU configuration, memory regions, session and security conditions.

These services are not interchangeable with DID access. A DID is a logical diagnostic data item; memory access addresses a configured memory region. Do not experiment with arbitrary addresses on a production ECU.

12. RoutineControl — service 0x31

RoutineControl allows a tester to request a configured routine to start, stop or return results. The routine is identified by a Routine Identifier (RID).

Common sub-function meanings include:

  • 0x01 — start routine.
  • 0x02 — stop routine.
  • 0x03 — request routine results.

The exact routine, input parameters, output format, preconditions and side effects are ECU-specific. Examples may include self-tests, memory checks, actuator-related procedures or programming-related verification routines, depending on the ECU.

13. ECU programming overview

UDS services commonly used in reprogramming workflows include:

SIDServiceRole in a transfer
0x34RequestDownloadTester requests permission to download data to the ECU
0x36TransferDataTransfers one or more data blocks
0x37RequestTransferExitCloses the transfer sequence

A programming sequence may also involve:

  1. Entering a programming session using 0x10.
  2. Obtaining the required authorization.
  3. Disabling or controlling selected communication.
  4. Erasing or preparing memory through an OEM-defined routine.
  5. Requesting a download with 0x34.
  6. Sending blocks with 0x36.
  7. Ending the transfer with 0x37.
  8. Performing integrity checks or activation routines.
  9. Resetting the ECU and verifying the software identity.

This is only a conceptual workflow. Real programming sequences, block-size negotiation, address/length formats, integrity checks, recovery behavior and activation rules are defined by the OEM programming specification. A successful TransferData response alone does not prove that the new software is valid or active.

14. ISO-TP: carrying UDS over CAN

UDS messages can be longer than the payload capacity of one CAN frame. ISO-TP (ISO 15765-2) provides segmentation and reassembly so that a diagnostic payload can be transported over CAN.

The main ISO-TP frame types are:

Frame typeAbbreviationPurpose
Single FrameSFCarries a complete short payload in one frame
First FrameFFAnnounces the start and total length of a multi-frame payload
Consecutive FrameCFCarries subsequent payload bytes
Flow ControlFCReceiver controls the sender's transmission of consecutive frames

The receiver's Flow Control frame includes a flow status and may include block-size and separation-time information. Common flow statuses are:

  • CTS — Continue To Send.
  • WAIT — Wait; the sender must pause according to the protocol rules.
  • OVFLW — Overflow; the receiver cannot accept the announced payload.

A simplified multi-frame exchange is:

Tester                         ECU
  |                             |
  |---------- FF -------------->|
  |<--------- FC ---------------|
  |---------- CF -------------->|
  |---------- CF -------------->|
  |<--------- UDS response -----|

The exact frame encoding differs between addressing formats and CAN/CAN FD configurations. When debugging, inspect both the raw CAN frames and the reassembled UDS payload. A transport-layer failure can prevent the UDS server from receiving a complete request.

15. UDS over DoIP

For Ethernet diagnostics, UDS can be transported using Diagnostics over Internet Protocol (DoIP), specified by ISO 13400.

A typical DoIP diagnostic workflow includes:

  1. Discover or identify the DoIP entity, where discovery is used.
  2. Establish the required IP communication.
  3. Perform routing activation.
  4. Exchange diagnostic messages using the relevant logical addresses.
  5. Interpret the UDS response carried in the DoIP diagnostic message.

DoIP has its own generic header and message types. Routing activation and DoIP acknowledgements/negative acknowledgements belong to the DoIP layer; they are not UDS NRCs. A DoIP-level acknowledgement must not be confused with a UDS positive response such as 0x62.

When diagnosing DoIP, check IP connectivity, routing activation, source and target logical addresses, TCP connection behavior and the UDS payload separately.

16. UDS timing: P2, P2*, S3 and transport timing

Timing is central to reliable diagnostic communication. Keep the different timing concepts separate:

  • P2 server timing: the applicable response timing for the server to begin its response under the relevant conditions.
  • P2 server timing:* the extended response timing used after a ResponsePending (0x78) response, as applicable.
  • S3 session timing: the session timeout behavior associated with tester activity and session maintenance.
  • Transport timing: timing associated with transport delivery, segmentation, flow control and network communication.

The ECU may provide session-related timing parameters in a DiagnosticSessionControl response. The tester should use the values and interpretation required by the applicable standard and ECU specification.

A robust tester should:

  • Distinguish a transport timeout from a UDS response timeout.
  • Handle NRC 0x78 without prematurely failing the transaction.
  • Apply the correct timing after ResponsePending.
  • Maintain the session when required, using the configured TesterPresent strategy.
  • Avoid hard-coding one timing value for every ECU or service.
  • Record timestamps for request transmission, transport completion, pending responses and final response.

There is no single universal timeout that is correct for all UDS services, ECUs and vehicle programs.

17. Practical request and response examples

Example A — Read a DID

Request:

22 F1 90

Illustrative positive response:

62 F1 90 56 49 4E ...

Interpretation:

  • 0x62 — positive response for request SID 0x22.
  • 0xF190 — echoed DID.
  • Remaining bytes — DID data, interpreted using the ECU definition.

Example B — Negative response

Request:

22 F1 90

Response:

7F 22 31

Interpretation:

  • 0x7F — negative response.
  • 0x22 — original request SID.
  • 0x31 — requestOutOfRange.

Check whether the DID is supported, whether the requested format is valid, and whether the current session and ECU conditions permit access.

Example C — Enter Extended Diagnostic Session

Request:

10 03

The tester requests Extended Diagnostic Session. The ECU's positive response and any timing parameters must be parsed according to the service definition and ECU specification. If the request is rejected, inspect the NRC and current ECU state.

Example D — ResponsePending

A server may respond:

7F 31 78

This indicates that the RoutineControl request (0x31) was correctly received but the final result is not yet available. The tester should continue waiting according to P2* and the applicable rules, then process the final response or report a timeout if the allowed limit is exceeded.

18. Practical troubleshooting workflow

No response from the ECU

  1. Confirm ECU power, wake-up and network state.
  2. Verify physical connection and bus configuration.
  3. Check CAN identifiers or DoIP connectivity and logical addressing.
  4. Confirm that routing activation or transport setup completed where applicable.
  5. Inspect ISO-TP segmentation and Flow Control behavior on CAN.
  6. Check whether the tester is using the correct request addressing mode.
  7. Confirm that the ECU is expected to respond to the selected service and addressing type.

Negative response received

  1. Decode 7F, the original SID and NRC.
  2. Check the active diagnostic session.
  3. Check security/authentication requirements.
  4. Verify sub-function, DID, RID, address and length parameters.
  5. Check vehicle and ECU preconditions.
  6. Check request sequence and any required delay.
  7. Compare the result with the ECU diagnostic specification.

Positive response contains unexpected data

  1. Verify the DID or sub-function definition.
  2. Check the expected response length.
  3. Confirm byte order, scaling, encoding and reserved-byte handling.
  4. Check whether the data is dynamic or state-dependent.
  5. Compare against the ECU diagnostic specification and a known-good trace.

Useful evidence to capture

For each failed diagnostic transaction, retain:

  • Timestamp and tester identity.
  • Target ECU and addressing mode.
  • Network/transport configuration.
  • Raw CAN frames or DoIP messages.
  • Reassembled UDS request and response.
  • Active session and security state, where known.
  • Vehicle/ECU preconditions.
  • Timeout and retry configuration.

This evidence makes it easier to identify whether the fault is in the network, transport, UDS service handling, ECU state or tester implementation.

19. UDS test engineering checklist

Before automating a UDS service, confirm:

  • Service SID and sub-function are supported by the ECU.
  • Physical or functional addressing is correct.
  • Request length and parameter encoding are valid.
  • Required diagnostic session is active.
  • Required security or authentication state is established.
  • DID, RID or memory range is defined and authorized.
  • Vehicle and ECU preconditions are satisfied.
  • ISO-TP or DoIP configuration is correct.
  • P2/P2* and transport timeouts are handled separately.
  • NRC 0x78 is handled as ResponsePending.
  • Positive and negative responses are decoded and logged.
  • Test cleanup restores the ECU to a safe expected state.

20. Key takeaways

  • UDS is an application-layer diagnostic protocol standardized by the ISO 14229 series.
  • UDS requires an appropriate transport/network implementation, such as ISO-TP over CAN or DoIP over Ethernet.
  • The SID identifies the requested diagnostic service.
  • Positive responses commonly use the request SID plus 0x40; negative responses use 0x7F, the original SID and an NRC.
  • Physical and functional addressing are transport/network addressing concepts, not properties of the SID.
  • Sessions, security, DTCs, data access, routines and programming are common diagnostic functions.
  • P2/P2*, S3 and transport timing describe different aspects of communication and must not be mixed.
  • ECU-specific diagnostic specifications determine what is actually supported.

21. Check your understanding

  1. What does UDS stand for, and which ISO series specifies it?
  2. Which SID is used for ReadDataByIdentifier?
  3. What does a response beginning with 7F indicate?
  4. What is the difference between physical and functional addressing?
  5. What does NRC 0x78 mean?
  6. Which ISO-TP frame type controls the sender's multi-frame transmission?
  7. What is the difference between P2/P2* response timing and S3 session timing?
  8. Does every ECU support every UDS service listed in ISO 14229?

Answers

  1. Unified Diagnostic Services; the ISO 14229 series.
  2. 0x22.
  3. A negative response; the next byte identifies the original request SID and the following byte is the NRC.
  4. Physical addressing targets a particular ECU; functional addressing targets a functionally defined group and may result in multiple ECU responses.
  5. The request was received correctly, but the server needs more time to provide the final response.
  6. Flow Control (FC).
  7. P2/P2* govern server response timing; S3 concerns session timeout/maintenance.
  8. No. Support depends on the ECU's diagnostic specification and implementation.

Standards note: ISO 14229 is maintained through editions and amendments. Confirm the edition contractually applicable to the vehicle program and use the corresponding ECU diagnostic specification when implementing or validating services. This article is an engineering introduction, not a replacement for the normative standard.