Configuration of "0x1902: Report DTC by Status Mask" in Unified Diagnostic Services (UDS)

4.5k Views Asked by At

I am using Read DTC Information(0x19) protocol, Subfunction: 0x02: Report DTC by Status Mask

But my question is specifically related to 0x1902 logic.

I tried to report DTCs by using different status masks. Fo example, 0x19020D and 0x190201 With 190201 request, I can get only failed DTCs, but I don't know the logic behind that? How can I configure my requests by using status masks? I need main logic of 1902 request. I would appreciate if anyone could help me to understand it. Thanks.

If I would like to filter only failed DTCs, I need to use 190201. I tried and got responses with only active failed DTCs. What if I would like to filter only stored (not active DTCs) anymore?

When requesting the stored DTC(s), we're meaning the old DTC(s), tested ones, so we will not take into consideration bit6 and bit4. So what should the final mask be when asking for DTC ? Is it possible to use 1902AF? I am a little bit confused. I would appreciate if you could reply me.

ECU diag request

1

There are 1 best solutions below

0
On

The comments says the formula to filter DTCs by mask is (status_byte & mask) == mask, but in reality it is (status_byte & mask) != 0, "at least one bit from the mask is set". Therefore 1902FF lists all supported DTCs except of tested and passed ones (DTCs with status == 0 are always omitted).

The command 190A lists all DTCs and therefore might (and should!) show more than 1902FF. The response payload is compatible (3B DTC + 1B status per each DTC).

May be that various vehicle marks implement this differently but they should not.