Report Number of Emissions OBD DTC by Status Mask (0x12): (0x19) Service in UDS Protocol Explained
Hello, automotive diagnostics enthusiasts! In this blog post, Report Number Of Emissions OBD DTC By Status Mask (0x12) in UDS. I’ll walk you through one of the key sub-function
s in the UDS protocol 0x12, used within Service 0x19. This sub-function plays an important role in reporting the number of emissions-related OBD Diagnostic Trouble Codes (DTCs) based on their status mask. Understanding this can help you diagnose vehicle issues more precisely and meet emissions compliance requirements. We’ll explore how this request works, what responses you can expect, and how it fits into the broader UDS diagnostic framework. Whether you’re a developer, tester, or engineer, mastering this concept is essential for working with modern automotive ECUs. Let’s dive into the details and learn how this powerful diagnostic feature works!Table of contents
- Report Number of Emissions OBD DTC by Status Mask (0x12): (0x19) Service in UDS Protocol Explained
- Introduction to Reporting Emissions OBD DTCs by Status Mask (0x12) in UDS Service 0x19
- Why do we need Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19?
- Syntax of Report Number of Emissions OBD DTC by Status Mask (SBFID-0x12) of SID-0x19
- Syntax of 0x19 SID Positive Response Message
- Syntax of 0x19 SID Negative Response Message
- Example of Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19
Introduction to Reporting Emissions OBD DTCs by Status Mask (0x12) in UDS Service 0x19
Welcome to this deep dive into one of the most important diagnostic services in the UDS protocol Service 0x19, specifically the sub-function 0x12. This feature allows you to report the number of emissions-related OBD Diagnostic Trouble Codes (DTCs) based on their current status. It’s a powerful tool for automotive engineers and testers working on emission compliance and ECU diagnostics. In this article, we’ll explore how this sub-function works, what data it provides, and how to interpret its response. You’ll also learn how the status mask filters specific types of DTCs during the request. Whether you’re debugging vehicle faults or building diagnostic tools, understanding this command is essential. Let’s get started and uncover the details behind this UDS feature!
What is the Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19?
The Report Number of Emissions OBD DTC by Status Mask (0x12) is a sub-function of the UDS Service 0x19 (ReadDTCInformation), which is defined in the ISO 14229 standard. This sub-function is used to request the total count of OBD-related Diagnostic Trouble Codes (DTCs) that match a specific DTC status mask.
In simple terms, it tells the tester how many emissions-related DTCs are currently active, confirmed, or meet any other condition defined by the status mask. Instead of requesting full DTC details, this sub-function just returns a number, which is very useful when you only need to know if faults exist and how many, without needing the full DTC codes.
Why do we need Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19?
The Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19 is essential for several key reasons in modern automotive diagnostics:
1. Quick Emissions Compliance Check
The Report Number of Emissions OBD DTC by Status Mask (0x12) allows for a rapid check of how many emissions-related faults are present in the vehicle. Emissions compliance is a critical aspect of vehicle diagnostics, especially for legal and environmental standards such as OBD-II or Euro 6 regulations. By using this sub-function, diagnostic tools can quickly verify whether a vehicle is meeting emissions standards. This is useful both during routine inspections and for pre-testing before full emissions testing, as it can reveal issues without needing to retrieve all the full DTC details.
2. Minimizes Data Load
Instead of transferring the complete list of DTCs (Diagnostic Trouble Codes), the 0x12 sub-function only returns the count of emissions-related DTCs that match the specified status mask. This approach minimizes the amount of data transferred between the ECU and the diagnostic tool, which is especially beneficial when dealing with limited bandwidth. By only returning a count, rather than full DTC details, it helps to reduce network load and ensures faster communication, making diagnostics more efficient.
3. Efficient Diagnostic Workflow
This sub-function streamlines the diagnostic workflow by allowing service tools to quickly assess whether there are any emissions-related DTCs. If the count returned is zero, the technician can immediately conclude that there are no emission-related issues, saving valuable time. If the count is non-zero, they can then proceed to request the full DTC list to investigate the problems in detail. This ability to filter out unnecessary data and focus only on relevant issues improves the efficiency of the entire diagnostic process.
4. Status-Based Filtering
The DTC status mask used in this sub-function allows technicians to count DTCs based on specific conditions like test failure, confirmation, or pending status. This is a crucial feature as it gives the technician control over which types of DTCs they want to include in the count. For example, they may want to know only about confirmed emissions faults or pending faults that might appear after the next test cycle. This targeted filtering helps in narrowing down diagnostic efforts to the most relevant codes, which enhances troubleshooting precision.
5. Useful in I/M Readiness Tests
The Report Number of Emissions OBD DTC by Status Mask (0x12) is commonly used in Inspection & Maintenance (I/M) readiness tests. These tests are part of regulatory emissions control procedures that ensure vehicles meet required environmental standards before they can be driven on the road. By using this sub-function, diagnostic tools can check the number of active or pending emissions-related DTCs, making it easier to assess whether the vehicle is compliant with local emission laws. If there are no active or pending issues, the vehicle is deemed ready for inspection.
6. Essential for Regulatory Tools
Vehicle manufacturers and service centers need to comply with strict government-mandated diagnostic procedures, especially in regions with stringent emission laws. The ability to use 0x12 of UDS Service 0x19 helps automotive manufacturers ensure their vehicles meet compliance standards. It is an essential feature for regulatory diagnostic tools that check whether a vehicle is emission-ready. Without this function, the entire emissions testing process would be more time-consuming and less efficient.
7. Reduces Diagnostic Time and Cost
By quickly providing a count of emissions-related DTCs that match specific criteria, the Report Number of Emissions OBD DTC by Status Mask (0x12) helps to minimize diagnostic time. Service centers can quickly identify whether there are any emissions faults, and if the count is zero, they can skip further checks. This reduction in time spent on unnecessary diagnostics translates into lower service costs for both the technician and the customer. Moreover, the faster process means vehicles spend less time in the shop, enhancing customer satisfaction and improving overall service efficiency.
Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19
With the sub-function 0x12, clients can request the count of emissions-related OBD DTCs that match a specific status mask defined by the client. This request is made through UDS Service 0x19, with the sub-function set to reportNumberOfEmissionsOBDDTCByStatusMask.
When a client sends this request, the response from the server will first include the DTCStatusAvailabilityMask, which indicates which DTC status bits are supported for filtering purposes. Following this, the response will contain the DTCFormatIdentifier, which provides details about the format and encoding of the DTCs. Finally, the response will return the DTCCount a 2-byte unsigned number that represents the total number of emissions-related OBD DTCs stored in the server’s memory that match the specified status mask.
This process enables efficient diagnostics by allowing clients to easily filter and count emissions-related DTCs, simplifying troubleshooting and enhancing the overall diagnostic process.
Syntax of Report Number of Emissions OBD DTC by Status Mask (SBFID-0x12) of SID-0x19
Request Message Definition – Sub-Function = Report Number of Emissions OBD DTC by Status Mask
Data byte | Parameter Name | Byte Value |
#1 | Read DTC Information Request SID | 0x19 |
#2 | sub-function = [ report Type = Report Number of Emissions OBD DTC by Status Mask ] | 0x12 |
#3 | DTC Status Mask | 0x00 – 0xFF |
SBFID (0x12) Request Message Data-Parameter of SID (0x19)
DTC Status Mask:
The DTCStatusMask contains eight bits defining DTC statuses. In the request message, it allows the client to request DTC information for DTCs whose status matches the mask. A match occurs if any bit in the DTC’s status is ‘1’ and the corresponding bit in the DTCStatusMask is also ‘1’. Unsupported bits in the mask are ignored by the server.
Syntax of 0x19 SID Positive Response Message
Response Message Definition – Sub-function = Report Number of Emissions OBD DTC by Status Mask
Data byte | Parameter Name | Byte Value |
#1 | Read DTC Information +Ve Response SID | 0x59 |
#2 | report Type = Report Number of Emissions OBD DTC by Status Mask | 0x12 |
#3 | DTC Status Availability Mask | 0x00 – 0xFF |
#4 | DTC Format Identifier = [ SAE_J2012-DA_DTCFormat_00 ISO_14229-1_DTCFormat SAE_J1939-73_DTCFormat ISO_14229-1_DTCFormat SAE_J2012-DA_DTCFormat_04 ] | 0x00 0x01 0x02 0x03 0x04 |
#5 #6 | DTC Count[] = [ DTC Count High Byte DTC Count Low Byte ] | 0x00 – 0xFF 0x00 – 0xFF |
SBFID (0x012) Positive Response Message Data-Parameter of SID (0x19)
reportType: This parameter reflects bits 6 – 0 of the sub-function parameter from the client’s request message.
DTCStatusAvailabilityMask: A byte where the bits are defined the same as the statusOfDTC, representing the status bits supported by the server. Bits not supported by the server will be set to ‘0’. Each supported bit (indicated by a value of ‘1’) will be implemented for every DTC supported by the server.
DTCFormatIdentifier: This 1-byte parameter defines the format of the DTC reported by the server:
- SAE_J2012-DA_DTCFormat_00: Identifies the DTC format as defined in the ISO 15031-6 [12] specification.
- ISO_14229-1_DTCFormat: Identifies the DTC format as defined by the DTCAndStatusRecord parameter in this table.
- SAE_J1939-73_DTCFormat: Identifies the DTC format as defined in SAE J1939-73 [19].
- ISO_11992-4_DTCFormat: Identifies the DTC format as defined in the ISO 11992-4 [5] specification.
- SAE_J2012-DA_DTCFormat_04: Identifies the DTC format as defined in the ISO 27145-2 [16] specification.
The definition of the byte values in the DTCFormatIdentifier can be found in section D.4 of this specification. Each server supports only one DTCFormatIdentifier.
DTCCount: This 2-byte parameter includes the DTCCountHighByte and DTCCountLowByte, which are sent in response to a reportNumberOfDTCByStatusMask or reportNumberOfMirrorMemoryDTC request. The DTCCount represents the number of DTCs that match the DTCStatusMask specified in the client’s request.
Syntax of 0x19 SID Negative Response Message
Response Message definition – Sub-function = Report Number of Emissions OBD DTC by Status Mask
Data byte | Parameter Name | Byte Value |
#1 | Read DTC Information –Ve Response SID [ byte#1 ] | 0x7F |
#2 | Requested SID [ byte#1 ] | 0x19 |
#3 | Negative Response Code [ byte#1 ] | NRC |
Example of Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19
Here are the Examples of Report Number of Emissions OBD DTC by Status Mask (0x12) in UDS Service 0x19:
Example of Request Message Frame Format of SBFID-0x12 for SID-0x19
Read DTC Information, Sub-function = Report Number Of Emissions OBD-DTC By Status Mask,
Request Message Flow Example
Message direction | Client → Server | |
Message Type | Request | |
Data Byte | Description (all values are in hexadecimal) | Byte Value |
#1 | Read DTC Information Request SID | 0x19 |
#2 | Sub-Function = Report Number Of Emissions OBD DTC By Status Mask, Suppress Pos Rsp Msg Indication Bit = FALSE | 0x12 |
#3 | DTC Status Mask | 0x08 |
Example of Positive Response Message Frame Format of SBFID-0x12 for SID-0x19
Read DTC Information, Sub-function = Report Number Of Emissions OBD-DTC By Status Mask, Positive Response, Example
Message direction | Server → Client | |
Message Type | Response | |
Data Byte | Description (all values are in hexadecimal) | Byte Value |
#1 | Read DTC Information +Ve Response SID | 0x59 |
#2 | Report Type = Report Number Of Emissions OBD-DTC By Status Mask | 0x12 |
#3 | DTC Status Availability Mask | 0xFF |
#4 | DTC Format Identifier = SAE_J2012-DA_DTCFormat_00_DTC Format | 0x00 |
#5 #6 | DTC Count [ DTC Count High Byte ] DTC Count [ DTC Count Low Byte ] | 0x00 0x03 |
Example of Negative Response Message Frame Format of SBFID-0x12 for SID-0x19
Message direction | Server → Client | |
Message Type | Response | |
Data Byte | Description (all values are in hexadecimal) | Byte Value |
#1 | Read DTC Information –Ve Response SID [ byte#1 ] | 0x7F |
#2 | Requested SID [ byte#1 ] | 0x19 |
#3 | Negative Response Code [ byte#1 ] | NRC |
// Below example shows how to use the UDS commands over the CAN data field as per the DoCAN
// Example for Positive Response for SID-0x19
Request: Client --> Server
02 19 12
Positive Response: Server --> Client
06 59 12 FF 00 00 03
// Example for Negative Response for SID-0x19
Request: Client --> Server
01 19 12
Negative Response: Server --> Client
03 7F 19 13
Understanding UDS Commands for SID 0x19 with Sub-function 0x12 over CAN (DoCAN)
In the Unified Diagnostic Services (UDS) protocol, Service ID (SID) 0x19 is used for reading DTC (Diagnostic Trouble Code) information. One of its useful sub-functions is 0x12, which is used to report the number of emissions-related OBD DTCs by a status mask. Below is an example that demonstrates how UDS requests and responses are exchanged between a client (tester) and a server (ECU) over the CAN data field using the ISO 15765-2 (DoCAN) standard.

Positive Response Example:
✅ Request from Client to Server:
CAN Data: 02 19 12
02
: Indicates the length of the data (2 bytes follow).19
: The Service ID (SID) – 0x19 refers to “Read DTC Information”.12
: The Sub-function – 0x12 stands for reportNumberOfEmissionsOBDDTCByStatusMask.
✅ Positive Response from Server to Client:
CAN Data: 06 59 12 FF 00 00 03
Let’s break it down:
0
6: Total number of bytes in the response.59
: Positive Response SID (0x19 + 0x40 = 0x59).12
: Echo of the sub-function (Report DTC With Permanent Status).FF 00 00
: The actual DTC code reported in permanent memory. This DTC is encoded using 3 bytes.03
: DTC Status Byte – shows the condition/status of the DTC (e.g., test failed, confirmed, etc.).
- DTC Status Byte
0x03
may mean:- Bit 0 (Test Failed) = 1
- Bit 1 (Confirmed DTC) = 1
(Meaning: The DTC test has failed, and it is a confirmed DTC)
Negative Response Example:
❌ Request from Client to Server:
CAN Data: 01 19 12
01
: Length byte (only 1 byte of actual data follows).19
: SID – Read DTC Information.12
: Sub-function – request for emissions DTC count using a status mask.
❌ Negative Response from Server to Client:
CAN Data: 03 7F 19 13
Let’s break it down:
03
: Total data length of the response (3 bytes follow).7F
: Indicates a Negative Response.19
: Echoed SID that caused the error (Read DTC Information).13
: NRC (Negative Response Code) –0x13
stands for “Invalid Format or Incorrect Message Length or Invalid Sub-function Parameter”.
- This usually means:
- The format or length of the message was incorrect.
- The sub-function parameter was not supported or improperly sent.
Using UDS over CAN with DoCAN protocol allows efficient vehicle diagnostics. This example clearly demonstrates how a client can request the number of emissions-related DTCs and how the ECU responds positively or negatively based on the request format. Understanding these message frames is crucial for automotive engineers working with On-Board Diagnostics (OBD) and UDS communication protocols.
Discover more from PiEmbSysTech
Subscribe to get the latest posts sent to your email.