Equipment-and-Tool-Institute / j1939-84

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

DM56 suspect tool issue #1195

Closed anthonyhbest closed 1 month ago

anthonyhbest commented 1 year ago

When testing DM56 for MY24 support, tool is issuing an incorrect FAIL:

image 0x30 = ASCII null

image 0x2A = ASCII '*'

Regardless of using the ASCII * or ASCII null character the J1939-84 tool is issuing a fail. Below are excerpts from both J1939-73 and J1939-84 text. J1939-73: image J1939-84: image

battjt commented 1 year ago

0x00 is ASCII null. 0x30 is '0'.

BUT, yes, the method the tool uses to check for a null termincator is incorrect. Your second example should have passed.

battjt commented 1 year ago

The implementation of 6.1.6.2.e was taken very literally: "Fail if engine family has <> 12 characters before first asterisk character (ASCII 2Ah) or “null” character (ASCII 00h)." I assume this requirement means "Fail if engine family is not exactly 12 characters." That the field is delimited from another field by *, terminated by null, or terminated by the end of message doesn't matter.

ericthomasswenson commented 1 year ago

The engine family name is understood to be exactly 12 characters. This is clear from https://www.epa.gov/ve-certification/information-about-family-naming-conventions-vehicles-and-engines

Which includes

Thus checking for a length of exactly 12 characters after YYYYE-MY (which was defined by CARB) is correct. String termination may be provided by * (2Ah), or null (00h), or omitted altogether.

The model year code appears below this figure. R = 2024.

ericthomasswenson commented 1 year ago

The response is expected to have 8 + 12 = 20 characters.

A 24 character payload without string termination at byte 21 is incorrect, and should have failed.

The 24 character payload with 2Ah at byte 21 should have passed.

e. Accepts a null (00h) character in addition to 2Ah, in recognition of null’s common use as a string terminator. Thus e. appears to be correct.