Unified Diagnostic Services (UDS)

UDSISO 14229UDS protocolUDS on CANdiagnostic services

Unified Diagnostic Services is the diagnostic communication protocol defined by ISO 14229 that tools use to talk to vehicle control modules. It defines numbered services for reading data, reading and clearing fault codes, running routines, changing sessions, security access and reprogramming, carried over CAN, Ethernet or other transports.123

How it works

Each request starts with a service identifier.

Common ones include 0x10 DiagnosticSessionControl, 0x11 ECUReset, 0x19 ReadDTCInformation, 0x14 ClearDiagnosticInformation, 0x22 ReadDataByIdentifier, 0x27 SecurityAccess, 0x2E WriteDataByIdentifier, 0x31 RoutineControl and 0x3E TesterPresent.21

A positive response returns the service identifier plus 0x40, so a 0x22 request is answered with 0x62. A negative response starts with 0x7F, then the requested service and a negative response code explaining why, such as an unsupported service, wrong session or security access denied.21

A module is always in exactly one diagnostic session. The default session is active at power-up, and extended or programming sessions open more services. The tester must keep sending TesterPresent (0x3E) while in a non-default session, or the module falls back to default.29

Sensitive services need an unlocked state. SecurityAccess (0x27) is a challenge and response: the module issues a seed and accepts only the matching key, which the module maker controls. Reprogramming uses RequestDownload (0x34), TransferData (0x36) and RequestTransferExit (0x37) inside a programming session.Medium219

On CAN, UDS rides on ISO-TP (ISO 15765-2), which splits long messages into a first frame, consecutive frames and receiver flow control. A single frame carries up to 7 data bytes. Data identifiers are 2 bytes, allowing up to 65,535, against 1-byte OBD-II PIDs.109

Typical values

Positive response IDRequest SID + 0x400x22 answered by 0x62Sourced29
Negative response format0x7F, rejected SID, negative response code (NRC)Sourced2
Common NRCs

0x11 not supported, 0x22 conditions not correct, 0x31 out of range, 0x33 security denied, 0x78 response pending

Sourced2
Data identifier size2bytesup to 65,535 DIDsOBD-II PIDs are 1 byteSourced9
VIN data identifier0xF190Sourced91
11-bit diagnostic CAN IDs
  • 0x7DF functional request
  • Physical pairs such as 0x7E4/0x7EC, response = request + 8
Sourced9
ISO-TP single frameUp to 7 data bytes on classical CANSourced10
ISO-TP separation time (STmin)0-127 ms, or 100-900 µsSet by the receiver in its flow control frameSourced10

How an ECU uses it

In a module, UDS is the server side of diagnostics.

The ECU answers reads from its stored identifiers, reports DTCs with status bits through service 0x19, runs maker-defined routines through 0x31, and refuses whatever its session or security state does not allow.21

Modules guard actions with preconditions that come back as specific codes, such as 0x83 engine is running, 0x88 vehicle speed too high or 0x93 voltage too low. These protect the vehicle during tests and programming, so meet the condition rather than retrying.2

Reprogramming through UDS is controlled by the module maker. The standard defines the transfer services, but the security keys, memory layout and software signing belong to the maker. Only the maker's authorized, verified tools should write to a third-party ECU.Medium14

How to test it

5 checks, in order.

  1. Connect a CAN interface or diagnostic tool to the OBD-II connector, where pins 6 and 14 carry CAN high and CAN low on CAN vehicles. Start in listen-only mode to confirm the bit rate and normal traffic.Medium38
  2. Send a harmless read, such as ReadDataByIdentifier for the VIN at 0xF190, to the module's physical request ID. A reply beginning 62 F1 90 confirms addressing and transport are working.92
  3. If the reply starts 0x7F, read the code before retrying. 0x11 means service not supported, 0x22 conditions not correct, 0x31 request out of range, and 0x78 means the module is still working and will answer later.2
  4. If long replies stop after the first frame, check that the tool sends a flow control frame promptly. A missing flow control frame is the usual reason multi-frame responses, such as DTC lists, arrive truncated.Medium109
  5. Read DTCs with service 0x19 and compare the list with a generic OBD-II scan. Manufacturer-specific codes from non-emissions modules may appear only through UDS.Low23

Symptoms and causes

No response at all.

Likely causes Wrong request ID, wrong bit rate, 11-bit versus 29-bit addressing, or a module that is asleep.

Check Sniff the bus, then send a functional request on 0x7DF and see which IDs answer.

Medium98

Reply 7F with code 7F or 7E.

Likely causes Service or sub-function not supported in the active session.

Check Open the required session with 0x10 first and keep TesterPresent running.

2

Session drops back to default mid-job.

Likely causes TesterPresent not sent often enough.

Check Log the 0x3E messages and their interval.

Medium29

Long responses arrive truncated.

Likely causes Flow control missing, late, or with an unworkable block size or STmin.

Check Log the ISO-TP frames and confirm a flow control frame follows each first frame.

Medium10

Security access returns 0x36 or 0x37.

Likely causes Too many invalid attempts, or the lockout delay has not expired.

Check Stop retrying, wait out the delay and use the maker's authorized tool.

2

In tuning

UDS is how factory scan tools read manufacturer-specific data, run tests such as actuator checks, and reprogram modules.

For third-party controllers, use only the manufacturer's authorized, verified interfaces and tools for writing or flashing; SAE J2534 defines a standard pass-thru interface used for authorized reprogramming.Medium41

Altering emissions-related software on road vehicles can be illegal tampering under US rules, regardless of the protocol used. Read-only diagnostics and logging are a separate matter from writing calibrations.Medium56

Formula and worked example

Common mistakes

Mistake Resending a request after an 0x78 response pending.

Do instead Wait for the final answer; 0x78 means the request was received and the module is still working.2

Mistake Expecting every module to answer on the OBD-II ID range.

Do instead Many body and chassis modules use maker-assigned IDs; use the maker's service information for addressing.Low93

Mistake Treating UDS write services as a tuning interface for a third-party ECU.

Do instead Writing software or calibration belongs to the maker's authorized, verified tools. Reading data and DTCs is a separate, lower-risk task.Medium14

Myths vs facts

Myth UDS and OBD-II are the same thing.

Fact OBD-II services in SAE J1979 are a mandated, standardized set for emissions diagnostics. UDS is a broader protocol for all diagnostics and programming, and most of its data identifiers are defined by each manufacturer.Medium27

Myth Knowing the UDS services is enough to reprogram any ECU.

Fact Writing and flashing require security access, correct session handling and manufacturer data layouts, and should only be done through authorized tools and interfaces. The protocol itself does not grant permission.Medium14

Myth A 7F negative response means the module is faulty.

Fact It is a normal, specific refusal. The code says why, such as wrong session, conditions not met or security not unlocked, and the module is usually working as designed.2

Frequently asked

What is the UDS protocol?

UDS, Unified Diagnostic Services, is the ISO 14229 protocol that diagnostic tools use to talk to vehicle control modules. It defines numbered services for reading data and fault codes, running tests, switching sessions, security access and reprogramming. On most cars it runs over CAN through ISO-TP.129

What is the difference between UDS and OBD-II?

OBD-II, through SAE J1979, is a legally required, standardized set of emissions diagnostics that any generic scan tool can read. UDS, defined in ISO 14229, is a general diagnostic and programming protocol used across all vehicle modules, with services like reading data identifiers, routines and reprogramming, mostly defined per manufacturer.Medium271

What is UDS security access?

SecurityAccess, service 0x27, protects sensitive functions. The tester requests a seed, the module returns a value, and the tester must answer with the matching key computed by the manufacturer's algorithm. Only then are protected services such as writing data or reprogramming allowed in that session.Medium21

What does a 7F negative response mean?

It means the module refused the request. The reply is 0x7F, then the service identifier that was requested, then a negative response code giving the reason, for example service not supported, conditions not correct, request out of range or security access denied. Check the code before retrying.21

How is UDS used to program an ECU?

An authorized tool typically opens a programming session, unlocks security access, erases memory with a routine, then sends the new software with RequestDownload, TransferData and RequestTransferExit before resetting the module. Exact sequences are manufacturer-specific, and this should only be done with authorized, verified tools for that module.Medium214

Sources

Numbered as cited above. Hover or tap a citation chip to preview it.

10 sources
  1. ISO 14229-1:2020 Road vehicles, Unified diagnostic services (UDS), Part 1: Application layer · International Organization for Standardization · standard · retrieved 2026-10-27
  2. Unified Diagnostic Services · Wikipedia · reference · retrieved 2026-10-27
  3. On-board diagnostics · Wikipedia · reference · retrieved 2026-10-27
  4. SAE J2534-1: Recommended Practice for Pass-Thru Vehicle Programming · SAE International · standard · retrieved 2026-10-27
  5. Tampering and Aftermarket Defeat Devices enforcement alert (December 2020) · U.S. Environmental Protection Agency · reference · retrieved 2026-10-27
  6. 40 CFR 86.1806-05: On-board diagnostics · US Electronic Code of Federal Regulations · standard · retrieved 2026-10-27
  7. SAE J1979: E/E Diagnostic Test Modes · SAE International · standard · retrieved 2026-10-27
  8. CAN Bus Explained: A Simple Intro · CSS Electronics · vendor-doc · retrieved 2026-10-27
  9. UDS Explained: A Simple Intro (Unified Diagnostic Services) · CSS Electronics · vendor-doc · retrieved 2026-10-27
  10. ISO 15765-2 · Wikipedia · reference · retrieved 2026-10-27