UDS Diagnostic Message Decoder
Decode Unified Diagnostic Services messages from hexadecimal bytes. Identify UDS service IDs, request and positive-response services, negative responses, NRC values, diagnostic sessions, Data Identifiers, routine IDs, security access levels and common diagnostic sub-functions.
—
What Is a UDS Diagnostic Message?
Unified Diagnostic Services, commonly abbreviated UDS, is an automotive diagnostic protocol standardized by ISO 14229. It defines diagnostic services that allow a tester to communicate with electronic control units for tasks such as reading data, changing diagnostic sessions, performing routines, accessing security levels and transferring software.
A UDS message normally begins with a one-byte Service Identifier, or SID. The structure of the bytes following that SID depends on the selected service.
Common UDS Service IDs
| SID | Service |
|---|---|
| 0x10 | Diagnostic Session Control |
| 0x11 | ECU Reset |
| 0x14 | Clear Diagnostic Information |
| 0x19 | Read DTC Information |
| 0x22 | Read Data By Identifier |
| 0x23 | Read Memory By Address |
| 0x27 | Security Access |
| 0x28 | Communication Control |
| 0x2E | Write Data By Identifier |
| 0x2F | Input Output Control By Identifier |
| 0x31 | Routine Control |
| 0x34 | Request Download |
| 0x35 | Request Upload |
| 0x36 | Transfer Data |
| 0x37 | Request Transfer Exit |
| 0x3E | Tester Present |
| 0x85 | Control DTC Setting |
UDS Positive Response
For many UDS services, a successful response uses a response SID equal to the
request SID plus hexadecimal 0x40.
Request:
22 F1 90
Request SID:
0x22
Positive Response SID:
0x22 + 0x40
= 0x62
Response:
62 F1 90 ...UDS Negative Response
A standard UDS negative response begins with 0x7F. The next byte
identifies the requested service and the third byte contains the Negative
Response Code, or NRC.
7F 22 31
7F:
Negative Response
22:
Original Requested Service
Read Data By Identifier
31:
Request Out Of RangeCommon UDS Negative Response Codes
| NRC | Meaning |
|---|---|
| 0x10 | General Reject |
| 0x11 | Service Not Supported |
| 0x12 | Sub-Function Not Supported |
| 0x13 | Incorrect Message Length Or Invalid Format |
| 0x21 | Busy Repeat Request |
| 0x22 | Conditions Not Correct |
| 0x24 | Request Sequence Error |
| 0x31 | Request Out Of Range |
| 0x33 | Security Access Denied |
| 0x35 | Invalid Key |
| 0x36 | Exceeded Number Of Attempts |
| 0x37 | Required Time Delay Not Expired |
| 0x70 | Upload / Download Not Accepted |
| 0x71 | Transfer Data Suspended |
| 0x72 | General Programming Failure |
| 0x73 | Wrong Block Sequence Counter |
| 0x78 | Request Correctly Received — Response Pending |
| 0x7E | Sub-Function Not Supported In Active Session |
| 0x7F | Service Not Supported In Active Session |
Read Data By Identifier — SID 0x22
Read Data By Identifier requests one or more Data Identifiers, commonly called DIDs. A DID occupies two bytes.
22 F1 90
SID:
0x22
DID:
0xF190
DID 0xF190 is commonly associated with VIN data in standardized
diagnostic implementations.
Diagnostic Session Control — SID 0x10
Diagnostic Session Control changes the active ECU diagnostic session. The byte following SID 0x10 contains the requested session type.
10 01
Default Session
10 02
Programming Session
10 03
Extended Diagnostic SessionSecurity Access — SID 0x27
Security Access is used where an ECU requires authorization before protected operations can be performed. Odd-numbered sub-functions commonly request a seed, while the corresponding even-numbered sub-function sends a calculated key.
27 01
Request Seed — Level Pair 1
27 02 ...
Send Key — Level Pair 1The algorithm that converts a seed into a valid key is ECU-specific and is not inferred by this decoder.
Routine Control — SID 0x31
Routine Control can start, stop or request the result of an ECU-defined routine. A standard request contains a sub-function followed by a two-byte Routine Identifier.
31 01 FF 00
31:
Routine Control
01:
Start Routine
FF00:
Routine IdentifierTester Present — SID 0x3E
Tester Present can be sent periodically to indicate that the diagnostic tester is still active and to help keep an applicable diagnostic session from timing out.
3E 00
Service:
Tester Present
Sub-function:
0x00Suppress Positive Response Bit
For services that define a sub-function byte, bit 7 can be used as the Suppress Positive Response Message Indication Bit. The actual sub-function is obtained from the lower seven bits.
Sub-function byte:
0x83
Bit 7:
1 → Suppress positive response requested
Actual sub-function:
0x83 & 0x7F
= 0x03UDS vs ISO-TP
UDS and ISO-TP operate at different layers. UDS defines diagnostic services and their application data. ISO-TP provides segmentation and transport when a diagnostic message is too large for a single CAN data field.
CAN / ISO-TP frame:
03 22 F1 90 00 00 00 00
ISO-TP PCI:
03
Reassembled UDS message:
22 F1 90
UDS SID:
22
Therefore this decoder expects 22 F1 90, not the ISO-TP PCI byte
03.
UDS Diagnostic Message Decoder FAQs
What does UDS stand for?
Which standard defines UDS?
What is a UDS SID?
Why is a positive UDS response SID 0x40 higher?
What does UDS 0x7F mean?
What does NRC 0x31 mean?
What does NRC 0x78 mean?
What is UDS service 0x22?
What is DID F190?
What is UDS service 0x27?
Can this tool calculate a UDS security key?
Should ISO-TP PCI bytes be included?
Decode UDS Diagnostic Hex Messages
Identify ISO 14229 services, request and response SIDs, diagnostic sub-functions, DIDs, routine identifiers, Security Access messages and negative response codes from raw UDS payload bytes.