Equipment-and-Tool-Institute / j1939-84

J1939-84 implementation for etools.org
MIT License
7 stars 6 forks source link

Tool Doesn't Request Test Results for Manufacture Assignable SPNs Correctly #1091

Closed naroner closed 2 years ago

naroner commented 2 years ago

The tool incorrectly requests test results from manufacture assignable SPNs. It requests 9C F0 7F (SPN 258204) instead of the correct 9C F0 FF (SPN 520348) || (FMI 31)

17:45:05.1460 Sending DM7 for DM30 to Exhaust Emission Controller (61) for SPN 520348 17:45:05.1476 18E33DF9 [8] F7 9C F0 7F FF FF FF FF (TX) 17:45:05.7480 Timeout - No Response 17:45:05.7496 18E33DF9 [8] F7 9C F0 7F FF FF FF FF (TX) 17:45:06.3461 Timeout - No Response 17:45:06.3486 18E33DF9 [8] F7 9C F0 7F FF FF FF FF (TX) 17:45:06.9455 Timeout - No Response FAIL: 6.1.12.1.a - No test result for Supported SPN 520348 from Exhaust Emission Controller (61)

ericthomasswenson commented 2 years ago

7FFFFF = (7×16+15)×(256×256)+(255×256)+255 = 8 388 607 < 520 348

520 348 = 07 F0 9Ch

18E33DF9 [8] F7 9C F0 7F FF FF FF FF (TX)

should read

18E33DF9 [8] F7 9C F0 FF FF FF FF FF (TX)

(Test Id (F7)) (Low Byte SPN (9C)) (High Byte SPN) (3 MSBits SPN (111)) (FMI 31 (1F))

F7 9C F0 <111><1F>

F7 9C F0 FF

ericthomasswenson commented 2 years ago

Provider to check And correct SPN bit packing for DM7.

Provider to add unit test case SPNs > 00 FF FF including 03 D2 1E, 05 2B 1A, 07 2D 1E and 07 FF FF

ericthomasswenson commented 2 years ago

This also creates a cascaded failure when Test ID F6 is supported.

SPN 520348 FMI 14 (SLOT 295) Result: Test Not Complete. SPN 520349 FMI 14 (SLOT 318) Result: Test Not Complete. SPN 520353 FMI 17 (SLOT 68) Result: Test Not Complete. SPN 520355 FMI 20 (SLOT 295) Result: Test Not Complete. SPN 520355 FMI 21 (SLOT 295) Result: Test Not Complete. SPN 520372 FMI 16 (SLOT 318) Result: Test Not Complete. ] FAIL: 6.4.12.2.a - Exhaust Emission Controller (61) reported a difference in test result labels from the test results received in part 1

ericthomasswenson commented 2 years ago

Other test steps here in part 5 also suffer

14:55:31.5069 Sending DM7 for DM30 to Engine #2 (1) for SPN 521031 14:55:31.5091 18E301F9 [8] FA 47 F3 70 FF FF FF FF (TX) 14:55:32.1072 Timeout - No Response 14:55:32.1086 18E301F9 [8] FA 47 F3 70 FF FF FF FF (TX) 14:55:32.7068 Timeout - No Response 14:55:32.7088 18E301F9 [8] FA 47 F3 70 FF FF FF FF (TX) 14:55:33.3066 Timeout - No Response

14:55:33.3069 Sending DM7 for DM30 to Engine #2 (1) for SPN 521031 14:55:33.3082 18E301F9 [8] FA 47 F3 72 FF FF FF FF (TX) 14:55:33.9066 Timeout - No Response 14:55:33.9081 18E301F9 [8] FA 47 F3 72 FF FF FF FF (TX) 14:55:34.5066 Timeout - No Response 14:55:34.5082 18E301F9 [8] FA 47 F3 72 FF FF FF FF (TX) 14:55:35.1067 Timeout - No Response

14:55:35.1067 Sending DM7 for DM30 to Engine #2 (1) for SPN 521075 14:55:35.1079 18E301F9 [8] FA 73 F3 64 FF FF FF FF (TX) 14:55:35.7068 Timeout - No Response 14:55:35.7079 18E301F9 [8] FA 73 F3 64 FF FF FF FF (TX) 14:55:36.3068 Timeout - No Response 14:55:36.3082 18E301F9 [8] FA 73 F3 64 FF FF FF FF (TX) 14:55:36.9074 Timeout - No Response

14:55:36.9074 Sending DM7 for DM30 to Engine #2 (1) for SPN 521075 14:55:36.9093 18E301F9 [8] FA 73 F3 63 FF FF FF FF (TX) 14:55:37.5071 Timeout - No Response 14:55:37.5082 18E301F9 [8] FA 73 F3 63 FF FF FF FF (TX) 14:55:38.1079 Timeout - No Response 14:55:38.1086 18E301F9 [8] FA 73 F3 63 FF FF FF FF (TX) 14:55:38.7079 Timeout - No Response

Duplicated queries are perhaps a distinct problem.

ericthomasswenson commented 2 years ago

NR to add his analysis of the three most significant bit packing error.

naroner commented 2 years ago

Analysis of the DM7CommandTestsPacket.java lines 24 through 26 (SP/FMI conversation from integer to DM7 content) for SP 520348:

520348 -> 111 11110000 10011100

spn & 0xFF -> 10011100 (Correct) (spn >> 8) & 0xFF -> 11110000 (Correct) ((((spn >> 16) & 0x03) << 5) | (fmi & 0x1F) SP portion since FMI is correct: (spn >> 16) & 0x03 -> 011 (Incorrect, should be 111)

It appears the root cause is an incorrect masking value for the highest 3 bits of the SP 0x03 -> 011 should instead be 0x07 -> 111 which would make the line: (spn >> 16) & 0x07 -> 111 (Correct)

naroner commented 2 years ago

This is still an issue even after #1091 is fixed:

6.4.13.2.a - Checking for erased diagnostic information 11:56:17.2865 Destination Specific DM6 Request to Engine #1 (0) 11:56:17.2885 18EA00F9 [3] CF FE 00 (TX) 11:56:17.2930 18E8FF00 [8] 01 FF FF FF F9 CF FE 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 65231 11:56:17.2955 Destination Specific DM12 Request to Engine #1 (0) 11:56:17.2980 18EA00F9 [3] D4 FE 00 (TX) 11:56:17.3030 18E8FF00 [8] 01 FF FF FF F9 D4 FE 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 65236 11:56:17.3045 Destination Specific DM23 Request to Engine #1 (0) 11:56:17.3080 18EA00F9 [3] B5 FD 00 (TX) 11:56:17.3135 18E8FF00 [8] 01 FF FF FF F9 B5 FD 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 64949 11:56:17.3145 Destination Specific DM29 Request to Engine #1 (0) 11:56:17.3170 18EA00F9 [3] 00 9E 00 (TX) 11:56:17.3225 18E8FF00 [8] 01 FF FF FF F9 00 9E 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 40448 11:56:17.3245 Destination Specific DM5 Request to Engine #1 (0) 11:56:17.3270 18EA00F9 [3] CE FE 00 (TX) 11:56:17.3330 18FECE00 [8] 00 00 14 04 00 00 00 00 DM5 from Engine #1 (0): OBD Compliance: HD OBD (20), Active Codes: 0, Previously Active Codes: 0 Continuously Monitored System Support/Status: Comprehensive component supported, complete Fuel System not supported, complete Misfire not supported, complete Non-continuously Monitored System Support/Status: A/C system refrigerant not supported, complete Boost pressure control sys not supported, complete Catalyst not supported, complete Cold start aid system not supported, complete Diesel Particulate Filter not supported, complete EGR/VVT system not supported, complete Evaporative system not supported, complete Exhaust Gas Sensor not supported, complete Exhaust Gas Sensor heater not supported, complete Heated catalyst not supported, complete NMHC converting catalyst not supported, complete NOx catalyst/adsorber not supported, complete Secondary air system not supported, complete 11:56:17.3385 Destination Specific DM25 Request to Engine #1 (0) 11:56:17.3410 18EA00F9 [3] B7 FD 00 (TX) 11:56:17.3435 18E8FF00 [8] 01 FF FF FF F9 B7 FD 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 64951 11:56:17.3445 Destination Specific DM31 Request to Engine #1 (0) 11:56:17.3480 18EA00F9 [3] 00 A3 00 (TX) 11:56:17.3530 18E8FF00 [8] 01 FF FF FF F9 00 A3 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 41728 11:56:17.3555 Destination Specific DM21 Request to Engine #1 (0) 11:56:17.3590 18EA00F9 [3] 00 C1 00 (TX) 11:56:17.3635 18E8FF00 [8] 01 FF FF FF F9 00 C1 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 49408 11:56:17.3655 Destination Specific DM26 Request to Engine #1 (0) 11:56:17.3690 18EA00F9 [3] B8 FD 00 (TX) 11:56:17.3735 18E8FF00 [8] 01 FF FF FF F9 B8 FD 00 Acknowledgment from Engine #1 (0): Response: NACK, Group Function: 255, Address Acknowledged: 249, PGN Requested: 64952 FAIL: 6.4.13.2.a - Engine #1 (0) erased Test Results data

naroner commented 2 years ago

Confirmed to be fixed in 3.1.0:

11:47:24.9010 Sending DM7 for DM30 to Engine #2 (1) for SPN 521031 11:47:24.9050 18E301F9 [8] F7 47 F3 FF FF FF FF FF (TX) 11:47:25.0000 1CA4F901 [24] F7 47 F3 F0 89 01 00 FB FF FF FF FF F7 47 F3 F2 89 01 00 FB FF FF FF FF DM30 from 1: [ SPN 521031 FMI 16 (SLOT 393) Result: Test Not Complete. SPN 521031 FMI 18 (SLOT 393) Result: Test Not Complete. ]

ericthomasswenson commented 2 years ago

SPN Formatting Corrected