UDS Protocol

UDS Protocol Tutorial: Exploring the Automotive Diagnostic Protocol

Discover the power of the Unified Diagnostic Services (UDS) protocol in automotive vehicles. Learn how UDS enables efficient vehicle diagnostics, ECU software flashing, and more. Get

insights into UDS protocol specification and testing. Follow a step-by-step tutorial to learn how to implement and utilize the UDS protocol effectively.

UDS Protocol Overview

Welcome to PiEmbSysTech, your ultimate learning destination for automotive embedded systems! Today, we’re diving deep into one of the most powerful and widely used protocols in the automotive industry – the UDS Protocol (Unified Diagnostic Services). Whether you’re an engineering graduate, an automotive enthusiast, or a working professional dreaming of a high-paying role in automotive development or testing, this is your golden opportunity.

Introduction to the UDS Protocol

Unified Diagnostic Services (UDS) is the most advanced and widely adopted automotive diagnostic protocol used globally to diagnose and maintain modern vehicles. It is defined under the ISO 14229 standard, which ensures a universal framework that all automobile manufacturers (OEMs) can follow. This helps create a common diagnostic system that works across different vehicle models and brands—no matter where they’re made.

But before we dive deeper into UDS, let’s clear up a common confusion:
What’s the difference between a communication protocol and a diagnostic protocol?

Think of it like this:

  • A communication protocol is like the language machines (or ECUs – Electronic Control Units) use to talk to each other. It defines how data is transmitted from one device to another inside the vehicle.
  • A diagnostic protocol (like UDS), on the other hand, is the conversation happening over that language. It defines what kind of information is exchanged—like reading error codes, performing resets, flashing new software, and more.

In simple terms, the communication protocol is the bridge, and UDS is the traffic on that bridge carrying meaningful diagnostic instructions.

Let’s relate it to something more human:
Just like a person visits a doctor when feeling unwell and communicates symptoms for diagnosis, a vehicle’s ECU communicates with a diagnostic tester to identify, treat, and monitor internal issues. The UDS protocol is that trusted doctor-patient conversation, ensuring vehicles stay healthy, efficient, and safe.

💡 What is the UDS Protocol in Automotive?

UDS (Unified Diagnostic Services), defined under ISO 14229, is the advanced diagnostic communication protocol used by modern vehicles for ECU diagnostics, fault analysis, programming, and more. It operates over the CAN bus using ISO 15765-2 and is the backbone of diagnostic communication in automotive ECUs (Electronic Control Units).

🚀 Why UDS Protocol Is a Game-Changer

Unlike older protocols like KWP-2000 or OBD-II, UDS offers enhanced flexibility, security, and performance:

  • Read & Erase DTCs (Diagnostic Trouble Codes)
  • Perform ECU Programming & Coding
  • Execute Security Access Routines
  • Run Self-Tests and Custom Functions
  • Switch between Session Types: Default, Programming, Extended, and Safety-critical
  • Support for Dynamic Sub-functions and advanced parameter requests

In short, UDS enables real-time diagnostics, secure access, and control of ECUs, making it an essential skill for anyone in automotive embedded systems.

🔍 How UDS Works – Simplified Example

Let’s say you want to read the ECU’s software version. Here’s how it’s done using UDS:

  1. The tester sends SID 0x22 (Read Data by Identifier) with DID 0xF180.
  2. The ECU replies with:
    • SID 0x62 + software version (if successful)
    • SID 0x7F + error code (if failed), e.g., 0x31 (Request Out of Range) or 0x22 (Conditions Not Correct)

Each Service Identifier (SID) in UDS triggers a specific operation. For example:

  • 0x10 – Start Diagnostic Session
  • 0x27 – Security Access
  • 0x34 – Request Download
  • 0x36 – Transfer Data
  • 0x11 – ECU Reset

Mastering these SIDs and their responses will elevate your understanding of automotive diagnostics and unlock high-paying roles in ECU development and testing.

🌟 Your Future Starts Here – Learn UDS Today!

This isn’t just a tutorial – this is your career booster! 💼

Are you:

  • 🎓 A fresh engineering graduate aiming to break into the automotive world?
  • 🔄 A working professional looking to transition into embedded systems?
  • 👨‍💻 An automotive developer or tester needing deep knowledge of UDS for real-time projects?

🛠️ History of UDS Protocol – The Evolution of Automotive Diagnostics

The journey of automotive diagnostics has come a long way from simple mechanical checks to advanced computer-based scanning. To truly appreciate the power of the UDS Protocol, it’s important to understand where it all began and how we arrived at today’s ISO 14229 standard.

Here’s a brief timeline of how vehicle diagnostics evolved over the decades:

  • Early 1980s – No Standardization: At first, there was no common diagnostic method. Each car manufacturer used their own proprietary tools and connectors, making it difficult for third-party workshops to diagnose or repair vehicles.
  • 1988 – Birth of On-Board Diagnostics (OBD-I)L The first attempt at standardizing diagnostics came with OBD-I, introduced in California. It helped monitor vehicle emissions, but still lacked uniformity across brands.
  • 1996 – Introduction of OBD-II: OBD-II became mandatory in the U.S. for all cars manufactured after 1996. It brought in standardized connectors (like the 16-pin DLC) and trouble codes (DTCs). This allowed basic fault code reading across different vehicles, laying the foundation for digital diagnostics.
  • Late 1990s – Rise of KWP2000 (ISO 14230): To improve the functionality of OBD-II, KWP2000 (Keyword Protocol 2000) was introduced. It offered better control and more detailed diagnostic capabilities over K-Line and CAN bus, but still lacked flexibility for advanced ECUs.
  • Early 2000s – CAN Protocol Standardization (ISO 15765-2): As vehicle complexity grew, CAN (Controller Area Network) became the default communication bus. It enabled faster, more reliable communication between ECUs and diagnostic tools.
  • 2004 – Introduction of UDS Protocol (ISO 14229): With modern vehicles having dozens of ECUs, the need for a unified and powerful diagnostic protocol was critical. That’s when UDS (Unified Diagnostic Services) was introduced by ISO. It supports flexible services, security access, programming, session management, and more becoming the global standard for diagnostic communication.
  • Today – UDS in AUTOSAR Architecture: UDS is now the default diagnostic protocol used by almost all major OEMs. It is implemented as DCM (Diagnostic Communication Manager) in the AUTOSAR layered architecture. It’s essential for both embedded developers and testing engineers working on modern automotive ECUs.

🌍 The Rise of UDS (ISO 14229)

In response to these evolving needs, the automotive industry moved toward a more unified and capable solution: UDS Protocol, formally standardized as ISO 14229 in the early 2000s.

Features of UDS Protocol

The UDS (Unified Diagnostic Services) protocol is not just another diagnostic tool it is the backbone of intelligent automotive diagnostics. Defined under the ISO 14229 standard, UDS empowers modern vehicles with the ability to self-diagnose, heal, update, and communicate, making them safer and smarter.

Here are the most powerful and career-boosting features of the UDS protocol:

Standardized Across OEMs (ISO 14229)
UDS provides a universal diagnostic language accepted by all major vehicle manufacturers worldwide. This means one tool, one protocol, can speak to most modern vehicles making your skills widely applicable in the automotive domain.

Multiple Diagnostic Sessions
UDS supports different session modes like:

  • Default Session
  • Programming Session
  • Extended Diagnostic Session
  • Safety-Critical Session
    Each session gives different levels of access to the ECU, such as reading data, performing tests, or flashing new software.

Secure Access to ECUs (SecurityAccess – SID 0x27)
Sensitive operations like reprogramming or configuration require a security handshake. UDS uses a challenge-response method to ensure only authorized tools or developers can access critical functions.

Advanced Fault Code Handling
UDS allows for:

  • Reading Diagnostic Trouble Codes (DTCs)
  • Clearing DTCs
  • Monitoring live signals and freeze frames
    This ensures that technicians and engineers can quickly diagnose and fix problems, reducing downtime.

Support for ECU Flashing and Coding
With UDS, you can upload or reprogram ECU firmware remotely and securely—this is a core skill required for AUTOSAR developers and OEM service engineers.

Service Identifier (SID) Based Communication
UDS uses unique 1-byte Service IDs (SIDs) to request specific operations. For example:

  • 0x10: Start Diagnostic Session
  • 0x22: Read Data By Identifier
  • 0x2E: Write Data By Identifier
  • 0x31: Routine Control
  • 0x27: Security Access
    These SIDs form the core of the diagnostic process.

Dynamic Data Handling (Sub-functions)
UDS allows the tester to request dynamic sub-functions and custom data records from the ECU. This flexibility is essential for adapting to different vehicle models and custom configurations.

Powerful Error Feedback with NRC Codes
When a service fails, UDS provides Negative Response Codes (NRC) explaining the reason. This helps developers and testers to quickly debug and fix issues.

CAN-Based and Transport Protocol Friendly
UDS is primarily used over CAN (ISO 15765-2), but also supports other transport layers like Ethernet (DoIP) and FlexRay—making it future-ready.

Integration with AUTOSAR (DCM Layer)
In the AUTOSAR architecture, UDS is implemented in the DCM (Diagnostic Communication Manager). This is a must-know area for anyone working on modern ECU software stacks.

🚘 UDS Implementation in Automotive ECUs – Making Vehicles Talk Like Humans

Have you ever wondered how a vehicle can “tell” a mechanic what’s wrong inside its brain like a short circuit, a faulty sensor, or a malfunctioning actuator?

This intelligent communication is made possible through the implementation of UDS (Unified Diagnostic Services) inside every Electronic Control Unit (ECU) of the vehicle.

Just like doctors diagnose human health, vehicles self-diagnose using UDS!

Inside the ECU, diagnostic programs run at regular intervals, constantly checking for abnormalities across the processor, I/O peripherals, and sensors. When an issue is detected:

  • A Diagnostic Trouble Code (DTC) is generated
  • The DTC is stored in the non-volatile memory of the ECU
  • This log remains saved even if the vehicle is turned off, allowing technicians and engineers to retrieve it anytime

But how does this magic happen?

✅ It’s all thanks to globally accepted standards. The ISO Technical Committee (ISO 14229) and the SAE Committee came together to define a structured and reliable diagnostic protocol – UDS.

UDS defines a set of diagnostic services (via Service IDs) and sub-functions that enable:

  • Reading live sensor data
  • Performing memory tests
  • Reprogramming ECUs
  • Securing critical functions via access control
  • And much more

✅ When a scan tool, laptop, or testing software sends a UDS command to an ECU, the ECU recognizes the service request, processes it, and responds with the required data or result just like answering a question!

This implementation not only helps in vehicle repair and maintenance but also in:

  • AUTOSAR-based ECU development
  • Automated Testing
  • ECU flashing and software updates
  • Cybersecurity enforcement

ISO-14229 Standards Available

The UDS protocol specification is defined in different sub-standards of ISO 14229. The ISO-14229 Standard UDS Protocol consists of the following parts, under the general title Road vehicles – Unified diagnostic services (UDS):

  • ISO 14229-1: Specification and requirements for UDS Protocol.
  • ISO 14229-2: Session layer services for UDS Protocol.
  • ISO 14229-3: Unified diagnostic services on CAN implementation (UDSonCAN).
  • ISO 14229-4: Unified diagnostic services on FlexRay implementation (UDSonFR).
  • ISO 14229-5: Unified diagnostic services on Internet Protocol implementation (UDSonIP).
  • ISO 14229-6: Unified diagnostic services on K-Line implementation (UDSonK-Line).
  • ISO 14229-7: Unified diagnostic services on Local Interconnect Network implementation (UDSonLIN) (Under ongoing research for implementation).
  • ISO 14229-8: Unified diagnostic services on UDSon… will be prepared gradually and added here

How UDS Protocol do diagnostics?

Imagine you are a human. When you feel sick, you go to a hospital to find out what’s wrong and get treated. A hospital has multiple floors, each designed for specific purposes:

  • Ground Floor – General checkup or emergency care.
  • 1st Floor – Diagnostic center. Each room is specialized: blood tests, skin check, eye tests, etc.
  • 2nd Floor – Operation theater for surgeries.
  • 3rd Floor – Preventive care, where doctors help you stay healthy and avoid future issues.

Now, think of a machine like a car as a human body. Just like a human needs medical tests and treatments, a car or electronic control unit (ECU) also needs health checks and problem-solving. This is where the UDS Protocol (Unified Diagnostic Services) comes in.

How UDS Protocol Works (Machine = Human Analogy)

The UDS protocol acts like a doctor for machines. Using this protocol, a human (or another machine) can communicate with a vehicle’s ECU to:

  • Diagnose issues
  • Run tests
  • Perform software updates
  • Ensure the system is running safely

Floors of Diagnosis in UDS (Analogy)

Hospital FloorHuman ServiceMachine Equivalent – UDS Function
Ground FloorEmergency/General CheckReading DTCs (Diagnostic Trouble Codes)
1st FloorDiagnostic TestsService ID functions (e.g., 0x22, 0x19, etc.)
2nd FloorSurgeryECU Reset, Programming, Reflashing
3rd FloorPreventive CareRoutine testing, monitoring, and safety apps

🚗 Why Vehicle Diagnostics Are Essential – Giving Cars a Way to Speak Up!

Just like a human visits a doctor when feeling unwell, a vehicle needs diagnostics to detect, understand, and report its internal problems. Without this, identifying issues would be like fixing a machine blindfolded!

Imagine a world where your vehicle could talk to you telling you what’s wrong, where it hurts, and what needs fixing. That’s exactly what automotive diagnostics make possible.

Here’s why diagnostics are a must in every modern vehicle:

To Read Stored Data: Sometimes, faults occur and are logged by the ECU even before you notice anything wrong. Diagnostics allow us to read Diagnostic Trouble Codes (DTCs) stored in memory to understand historical or current faults.

To Monitor Live Data: We can view real-time parameters such as engine RPM, vehicle speed, coolant temperature, sensor values, and more. This live monitoring helps identify ongoing issues during vehicle operation.

To Reflash or Update ECUs: With diagnostics, we can transfer large volumes of data to the ECU, such as during a software update or reprogramming process (commonly called “flashing”).

To Control ECU Inputs and Outputs: For deeper testing, we can take direct control of components—like disabling a cylinder to identify misfires, or testing relays and actuators individually.

To Run Internal Routines: Modern ECUs come with built-in self-check and calibration routines. Through diagnostics, we can trigger these processes – for example, a self-calibration of throttle or sensors.

To Implement Security Features: Some critical services are password-protected or restricted. Diagnostics can unlock access securely for authorized personnel only helping in cybersecurity and system integrity.

🎯 UDS Protocol: Physical vs Functional Addressing Explained

In Unified Diagnostic Services (UDS), the diagnostic tester (client) communicates with the vehicle’s ECUs using two types of addressing methods: Physical Addressing and Functional Addressing. These methods determine how and to whom the diagnostic requests are sent within the vehicle network (typically over CAN).

✅ Physical Addressing

Physical addressing is used when the diagnostic tester needs to communicate with a specific ECU.

  • 🔹 The request is directed only to one ECU using its unique identifier (CAN ID).
  • 🔹 Used during targeted diagnostics, ECU reprogramming, or module-specific testing.
  • 🔹 The response comes only from the addressed ECU.

Sub-function Example – Read DTC Information (0x19):

  • A physical request like 0x19 02 is sent to a specific ECU (e.g., Engine Control Module) to read stored Diagnostic Trouble Codes (DTCs).

🌐 Functional Addressing

Functional addressing is used when the tester wants to send a broadcast request to all ECUs.

  • 🔹 The request is transmitted using a functional CAN ID shared by all ECUs.
  • 🔹 Only ECUs that support the requested service will respond.
  • 🔹 Ideal for initial diagnostics when the faulty module is unknown.

Sub-function Example – ECU Identification (0x1A):

  • A functional request like 0x1A 00 asks all ECUs to report their identification data (e.g., software version, hardware number).

⏱️ Session Layer Timings in UDS Protocol (ISO 14229-2)

The UDS (Unified Diagnostic Services) protocol, defined under the ISO 14229-2 standard, is part of the OSI Session Layer and introduces several important timing parameters to ensure proper communication and response handling between the tester (client) and the ECU (server).

These timings define how long a diagnostic tester should wait for a response, and how long the ECU has to respond. They are essential for maintaining a stable and reliable diagnostic session.

1. P2 Timing (Standard Response Wait Time)

  • Definition: The time the tester should wait for a normal positive or negative response from the ECU after sending a UDS request.
  • Applies when: The ECU can process and respond to the request quickly.
  • Typical Value: ~50 ms (varies by OEM/specification).
  • Scenario: A tester sends a request to read DTCs, and the ECU replies with the result within 50 ms.

P2* (P2 Star) – Extended Response Wait Time

  • ✅The maximum wait time after the ECU responds with NRC 0x78 (Response Pending).
  • ✅Used when the ECU needs more time to process a request.
  • ✅ ECU sends NRC 0x78 to inform the tester to wait longer.
  • ✅ Tester then waits for P2* before timing out.
  • ✅ Typical value: 1000 to 5000 milliseconds (or more depending on application).

S3 Timer (Session Timeout)

  • ✅ Activated when no request is received from the tester for a set period.The duration after which the ECU automatically returns to default session due to inactivity.
  • ✅ Activated when no request is received from the tester for a set period.
  • ✅ Ensures that the ECU doesn’t stay in extended or programming mode indefinitely.
  • ✅ Typical value: 5 to 10 seconds.

Client Response Timeout

  • ✅The overall wait time the tester uses to decide whether to retry or fail a request.
  • ✅ Includes either P2 or P2*, depending on whether NRC 0x78 was received.
  • ✅ Ensures the diagnostic tool doesn’t hang indefinitely.
  • ✅ Action taken: retry, abort, or show error.

How These Timings Work Together

StepActionTiming
✅ Tester sends UDS requestWaits for immediate ECU responseP2
✅ ECU sends NRC 0x78Instructs tester to wait longerP2*
✅ No communication from testerECU returns to default sessionS3 Timer
✅ No response from ECUTester times out and handles errorClient timeout

Summary of Timing Parameters

ParameterDescriptionWaited ByTypical Range
✅ P2Normal response timeTester50–100 ms
✅ P2*Extended wait after NRC 0x78Tester1000–5000 ms
✅ S3Session idle timeoutECU5–10 seconds
✅ Client TimeoutFull response timeoutTesterBased on P2 / P2*

These timings ensure smooth session control, allowing UDS to support both fast and complex diagnostics efficiently.

UDS Protocol Architecture

Those services allow a tester (client) to control diagnostic functions in an on-vehicle Electronic Control Unit (server) applied for example on the electronic fuel injection, automatic gearbox, anti-lock braking system, etc., connected on a serial data link embedded in a road vehicle.

Furthermore, this part of the standard specifies generic services that allow the diagnostic tester (client) to store or to resume non-diagnostic message transmission on the data link. However, part 1 of the standard does not specify any implementation requirements. Figure 7 shows a general configuration of the client-server connection within a vehicle network.

UDS Client Server
Client-Server Communication in Vehicle

For vehicle 3, the servers are directly connected to the diagnostic data link, and vehicle 4 connects its server/gateway directly to the vehicle 3 server/gateway. For vehicle 4, the servers are connected over an internal data link and indirectly connected to the diagnostic data link through the gateways. ISO 14229-1 or UDS Protocol applies to the diagnostic communications over the diagnostic data link; the diagnostic communications over the internal data link may conform to the same or another protocol.

The server, usually a function that is part of the ECU, uses the application layer services to send response data, provided by the requested diagnostic service back to the client. The client is usually referred to as an External Test Equipment when it is off-board but can in some systems, also be an on-board tester. The usage of the application layer services is independent of the client being an off-board or on-board tester. It is a possibility to have more than one client on the same vehicle system.

OBD-II Gateway with Vehicle Network
OBD-II Gateway with Vehicle Network

The most typical network configuration of the client-server communication for the vehicle diagnostics: the client as an Off-board tester. Communication is based on a request-response model. In the context of diagnostics, the following concepts are useful for a better understanding of the semantics handled on the UDS standard environment:

  1. Diagnostic Trouble Codes (DTC)The numerical common identifier fault condition identified by the on-board diagnostic system.
  2. Diagnostic Data: Data that is located in the memory of an electronic control unit that may be inspected and/or possibly modified by the tester (diagnostic data includes analogue inputs and outputs, digital inputs and outputs, intermediate values and various status information). EXAMPLES: vehicle speed, throttle angle, mirror position, system status, etc.
  3. Diagnostic Session: The current model of the server, which affects the level of diagnostic functionality.
  4. Diagnostic Routine: The routine that is embedded in an electronic control unit and that may be started by a server upon a request from the client. NOTE: It could either run instead of the normal operating program or run concurrently to the normal operating program. In the first case, the normal operation of the ECU is not possible. In the second case, multiple diagnostic routines may be enabled that run while all other parts of the electronic control unit are functioning normally.
  5. Tester: The system that controls functions such as test, inspection, monitoring or diagnosis of an in-vehicle electronic control unit and which may be dedicated to a specific type of operator (e.g. a scan tool dedicated to garage mechanics or a test tool dedicated to the assembly plant agents).

📦 UDS Protocol Frame Format

Unified Diagnostic Services (UDS) operates over transport protocols such as CAN, where the payload is limited (e.g., 8 bytes per frame in standard CAN). UDS defines a structured way of requesting diagnostic data and receiving responses using predefined Service IDs, Sub-function IDs, and Data fields.

✅ UDS Communication Overview

In UDS over CAN (DoCAN), the communication typically involves two primary frame types:

  • Diagnostic Request Frame – Sent from Client (Tester) to Server (ECU).
  • Diagnostic Response Frame – Sent from Server (ECU) to Client (Tester).

Further, the response frame is categorized into:

  • Positive Response
  • Negative Response

✅ UDS Diagnostic Request Frame Format

A diagnostic request from the tester is structured as follows:

ByteFieldDescription
0Service ID (SID)The identifier for the diagnostic service being requested.
1Sub-function ID(Optional) Some services require additional sub-function specification.
2+Data BytesAny additional data required by the service or sub-function.

📝 Notes:

  • The Sub-function ID may or may not be present depending on the service (e.g., Read DTCs vs. ECU Reset).
  • The most significant bit (Bit 7) of the sub-function byte is known as the suppress response bit.
    • ✅ If Bit 7 = 1, the server is not required to send a positive response.
    • ✅ If Bit 7 = 0, the server must send a positive or negative response.

✅ Example:

A request to start a diagnostic session might look like:

Request Frame: 0x10 0x01
0x10 = SID for Diagnostic Session Control
0x01 = Sub-function (Default Session)

✅ UDS Positive Response Frame Format

When the ECU processes the request successfully, it sends a positive response, which includes:

ByteFieldDescription
0Positive Response SIDOriginal SID + 0x40
1Sub-function ID or DataEcho or relevant sub-function/data
2+Additional Data (optional)Any data returned by the service (e.g., ECU Info)

✅ Example:

For a successful Diagnostic Session Control (SID = 0x10), the positive response will be:

Positive Response Frame: 0x50 0x01
0x50 = 0x10 + 0x40
0x01 = Default session (echoed)

✅ UDS Negative Response Frame Format

If the ECU cannot process the request due to format issues, unavailability, or failed preconditions, it sends a negative response with an NRC (Negative Response Code):

ByteFieldDescription
0Negative Response SIDAlways 0x7F
1Original Request SIDThe SID the tester originally sent
2NRC (Error Code)Code indicating why the request failed

✅ Example:

If the tester requests 0x10 (Diagnostic Session Control) improperly:

Negative Response Frame: 0x7F 0x10 0x13
0x13 = NRC for “Invalid Format”

✅ Summary Table: UDS Frame Types

Frame TypeByte 0Byte 1Byte 2+
✅ Request FrameService IDSub-function (opt.)Data (optional)
✅ Positive ResponseSID + 0x40Echo/DataResponse Data
✅ Negative Response0x7FRequested SIDNRC (Response Code)

✅ Understanding Suppress Positive Response (Bit 7 of Sub-function)

  • Bit 7 = 1 (Suppress Response): The ECU may suppress sending a positive response, but it must still send a negative response if an error occurs.
  • Bit 7 = 0: Normal response behavior, ECU is expected to respond.

✅ Visual Example of Flow

Tester —–> ECU
Request: 0x10 0x01 (Start Default Session)

ECU —–> Tester
Response: 0x50 0x01 (Positive response)

OR

Response: 0x7F 0x10 0x22 (Conditions Not Correct)

UDS Protocol Stack in Automotive ECUs

The Unified Diagnostic Services (UDS) protocol is designed to function independently of the underlying transport layers. It operates at the application layer, enabling diagnostic communication between a tester (client) and Electronic Control Units (ECUs) in the vehicle. This communication relies on a layered protocol architecture, aligning with the Open Systems Interconnection (OSI) model.

UDS SecurityLayer
Security Layer in UDS Standard​

✅ Layered Architecture

In the context of automotive ECUs, UDS is implemented over a stack of protocols that separate responsibilities across multiple layers, as shown below:

✅ 1. Application Layer – UDS (ISO 14229-1)

  • This is the highest layer responsible for executing diagnostic services such as:
    • Reading DTCs (Diagnostic Trouble Codes)
    • ECU Reset
    • Security Access
    • Routine Control
    • Flash Programming
  • Each service is identified using a Service Identifier (SID) and may include sub-functions and data parameters.

When executing diagnostics over the CAN, the Client (diagnostic tester) initiates a request and waits for confirmation. The server (function in ECU) then receives the indication and sends a response.

✅ 2. Session & Network Layer – ISO 14229-2 / ISO 15765-2

  • Provides session control, message segmentation, and transport of diagnostic messages between tester and ECU.
  • This layer manages:
    • Flow control
    • Multi-frame transmission (for messages larger than 8 bytes)
    • Message reassembly

✅ 3. Data Link Layer – CAN Protocol (ISO 11898)

  • Ensures the structured and reliable exchange of frames between ECUs over the Controller Area Network.
  • Manages:
    • Frame formatting (11-bit/29-bit identifiers)
    • Arbitration
    • Error checking
    • Acknowledgment

✅ 4. Physical Layer – CAN Transceiver Hardware

  • Defines the electrical signals, voltage levels, and bit timing used for communication on the vehicle bus.
  • Interfaces with the physical wiring and connectors.

✅ Visualization of UDS Protocol Stack (Over CAN)

+-------------------------+
| Application Layer            |   ← UDS (ISO 14229-1)
+-------------------------+
| Network & Transport     |   ← ISO 14229-2 / ISO 15765-2
+-------------------------+
| Data Link Layer                |   ← CAN Protocol (ISO 11898-1)
+-------------------------+
| Physical Layer                  |   ← CAN Bus Hardware & Transceiver
+-------------------------+

🚗 UDS can also be implemented over LIN, FlexRay, or Ethernet, where the lower layers would be replaced accordingly, but the UDS services at the top remain the same.

UDS Protocol Services defined under different service Type

A_SIService TypeDescription
0x01 – 0X0FISO-15031-5/SAE-J1939 Specified ServicesISO-15031-5/SAE-J1939
0x10 – 0x3EService Indentifiers specified in this documentISO-14229-1
0x41 – 0x4FISO-15031-5/SAE-J1939 specified for Positive Response ServicesISO-15031-5/SAE-J1939
0x50 – 0x7EPositive Response Service Identifiers specified in this documentISO-14229-1
0x7FNegative Response Service Identifier specified in this document.ISO-14229-1
0x83 – 0x88Positive Request Service IdentifiersISO-14229-1
0xBA – 0xBEPositive Request Service IdentifiersDefined by System Supplier.
0xC3 – C8Positive Service Response Identifiers specified in this document.ISO-14229-1
0xFA – 0xFEPositive Service Response IdentifiersDefined by System Supplier.

Different Functions of Diagnostic Services In UDS Protocol

Besides defining service primitives and protocols to facilitate the client-server interaction, the UDS (Unified Diagnostic Services) protocol also categorizes its services into several functional units, each designed for a specific diagnostic purpose. These functional units consist of groups of related services, each identified by a unique hexadecimal Service Identifier (SID).

These service categories help organize the diagnostic operations that can be performed on the server (typically an ECU), based on their intended functions. Within the UDS framework, the services are broadly divided into the following six categories:

  1. Diagnostic and communication management.
  2. Data Transmission.
  3. Stored Data Transmission.
  4. Input/Output Control.
  5. Remote activation of routine.
  6. Upload/Download.

Each functional group has more than one service ID for different-2 tasks so to get the detail of the above functional group and related services.

1. Diagnostic and Communication Management Services in UDS Protocol

This functionality is responsible for managing how a diagnostic session starts, behaves, and ends between the tester (diagnostic tool) and the ECU (Electronic Control Unit). It includes essential services like Diagnostic Session Control (0x10) to switch between different diagnostic modes, ECU Reset (0x11) to restart the control unit, and Security Access (0x27) to unlock restricted functionalities. It also includes Communication Control (0x28) to enable or disable certain types of communication during diagnostics. These services ensure secure and controlled access to diagnostic operations, making it a foundational component in vehicle diagnostics.

There are 10 services are available in this module to control the diagnostic and the communication-related in the ECU.

  1. Diagnostic Session Control (0x10)
  2. ECU Reset (0x11)
  3. Security Access (0x27)
  4. Communication Control (0x28)
  5. Tester Present (0x3E)
  6. Access Timing Parameter (0x83)
  7. Secure Data Transmission (0x84)
  8. Control DTC setting (0x85)
  9. Response To Event (0x86)
  10. Link Control (0x87)

2. Data Transmission Functional Services in UDS Protocol

The data transmission functionality allows testers to retrieve live, real-time information from the ECU while the vehicle is running. This is achieved using services such as Read Data by Identifier (0x22) and Read Data by Periodic Identifier (0x2A). These services enable access to important operational parameters like engine temperature, RPM, fuel level, and other sensor data. It is commonly used during vehicle maintenance, performance testing, and diagnostics to monitor the system’s health and behavior without interrupting the normal operation.

There are 7 services are available in this module to control the Data Transmission Functional Services in the ECU.

3. Stored Data Transmission Services in UDS Protocol

This functionality deals with accessing historical fault data stored in the ECU’s memory. The primary service used here is Read DTC Information (0x19), which enables retrieval of Diagnostic Trouble Codes (DTCs), freeze frame data, and other diagnostic records. These stored values give technicians insights into faults that have occurred over time, allowing them to identify and fix intermittent or persistent issues. It plays a vital role in post-failure analysis and repair verification.

There are 2 services and following subfuctions are available in this module to control the Stored Data Transmission Services in the ECU.

4. Input/Output Control Services in UDS Protocol

Input/Output Control functionality enables direct manipulation of vehicle actuators and sensors for testing and validation purposes. Through the Input Output Control by Identifier (0x2F) service, a tester can override normal ECU behavior and send specific commands to actuate components like cooling fans, fuel injectors, or lighting systems. This allows technicians to verify that components are working correctly, simulate various scenarios, and conduct in-depth diagnostics without needing to remove or manually test each part.

Input/Output Control Services in UDS Protocol supports only 1 Service shown below:

5. Remote Activation of Routine Services in UDS Protocol

This function is used to trigger pre-defined routines or self-tests programmed into the ECU. The service responsible for this is Routine Control (0x31). It can initiate activities such as ECU memory checks, system calibrations, DPF (diesel particulate filter) regeneration, or component-specific functional tests. This functionality is critical for advanced diagnostics, system maintenance, and ensuring that the vehicle’s subsystems operate within design parameters.

Remote ARemote Activation of Routine Services in UDS Protocol also supports 1 service given below:

6. Upload/Download Services in UDS Protocol

Upload/Download functionality provides the means for transferring software or calibration data between the tester and the ECU. Using services like Request Download (0x34), Transfer Data (0x36), and Request Transfer Exit (0x37), a technician can update ECU firmware, flash new software, or modify configurations. This capability is essential during production, recalls, or software updates, ensuring that vehicles remain up-to-date with the latest performance improvements and bug fixes.

There are 5 Services supported by Upload/Download Services in UDS Protocol as shown below:

Terminologies used in UDS Protocol

  • UDS automotive protocol: Explore the UDS automotive protocol, a standardized communication method used in the automotive industry.
  • UDS communication protocol: Understand the UDS communication protocol and its role in efficient vehicle diagnostics.
  • UDS diagnostic protocol: Dive into the UDS diagnostic protocol, a crucial aspect of diagnosing and troubleshooting automotive systems
  • UDS protocol overview: Gain a comprehensive overview of the UDS protocol and its relevance in the automotive industry.
  • UDS protocol implementation: Learn about the implementation process of the UDS protocol in automotive systems for effective diagnostics.
  • UDS protocol specification: Explore the specifications of the UDS protocol, including message formats and communication requirements.
  • UDS protocol features: Discover the key features of the UDS protocol that make it an essential tool for vehicle diagnostics.
  • UDS protocol benefits: Explore the benefits of using the UDS protocol for efficient and accurate vehicle diagnostics.
  • UDS protocol applications: Learn about the various applications of the UDS protocol in different areas of the automotive industry.
  • UDS protocol development: Gain insights into the development process of the UDS protocol and its evolution over time.
  • UDS protocol testing: Understand the importance of testing the UDS protocol to ensure its reliability and compatibility with different systems.
  • UDS protocol security: Explore the security measures integrated into the UDS protocol to protect against unauthorized access and data breaches.
  • UDS protocol standards: Learn about the industry standards associated with the UDS protocol and their role in ensuring compatibility and interoperability.

12 thoughts on “UDS Protocol”

  1. Isn’t the time resolution for the extended P2 time 10ms in the UDS standard? Which would make the 7D0 actually 20seconds instead of 2seconds.

  2. For Diagnostic Session Control (0x10) I’d appreciate more explanation of the timing parameters in the server’s response.

    1. Dear Sai, Thank you for your Appreciation. We have written some of the sub-functions and
      some of them are under research for updating onto the website.
      Please search or go to the posts you will get them.
      Thank You…

  3. Question :
    If a Read Data By Identifier request is made to the server from client and the response uses TP layer (since data is > 8). Now when this Transmission is going on if in between one more Read Data Identifier request is made to the server from the client then what should be the behaviour of the Server.

      1. There are 2 chances here based on the OEM
        i. ECU will respond to the 2nd request after responding to the 1st request
        or
        ii. ECU will not respond (no response) to the 2nd request.

  4. Azhar Jahagirdar

    Very Nice explanation sir .
    can you please tell more about Read DTC (0X19) and DTC Status Mask Availability?

Leave a Reply

Scroll to Top