Equipment-and-Tool-Institute / j1939-84

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

Datalink Adapter Hardware Error Causes Tool "Hang" #1212

Closed markmorrisoncummins closed 1 month ago

markmorrisoncummins commented 1 year ago

This is the same complaint as #1081. In every version I've tried, up to 3.1.10, I can replicate the hanging behavior and ERR_HARDWARE_NOT_RESPONDING error by briefly disconnecting the Nexiq USB-Link 2 adapter from the 9-pin connector. It looks like the connection to the PC is reset because the adapter is power cycling. The only place I see any mention of a problem is in j1939_840.log where the Java exception is logged.

PEAK does not show this behavior. I suspect because the PEAK adapter gets power from USB rather than the 9-pin the connection to the PC is stable even if the CAN connection is temporarily lost.

Ideally, it would be great if the -84 tool is able to reconnect on a power loss event like this. If that's not possible, I would at least like to see an error message for the user that connection to the adapter was lost and the test needs to be restarted.

ericthomasswenson commented 1 year ago

Nice work Mark.

ericthomasswenson commented 1 year ago

Plan to provide an adapter error notification when detected.

battjt commented 1 year ago

When an error occurs, the user will be presented: image

The report will contain a "RP1210 ERROR" string:

Start Test 1.15 - DM1: Active DTCs

12:31:35.6239 Reading the bus for published DM1 messages
RP1210 ERROR: Failed to read RP1210, restarting: Error (142): ERR_HARDWARE_NOT_RESPONDING
19:03:49.4457 1CFECA00 [42] 40 FF 79 02 00 01 DC 04 05 01 75 02 0C 01 5B 00 04 01 3F 0A 04 01 BE 19 03 01 9D 00 15 01 BD 19 03 01 81 02 09 01 88 0D 09 01

Because the tool is using the adapter time, the packet times will be odd until the tool detects it and recorrects the time.

Once the user clears the notification panel, the RP1210 connection will be re opened.