KB155 - LonScanner shows Device Escape message code 0x7D?

 Problem

LonScanner shows "Device Escape" message, code 0x7D?

 Solution

Devices which include the debug kernel will notify the debugger about each reset by making use of "device escape" messages.  In NodeBuilder 3.0 and newer, the debug kernel is added automatically to the Development Target.
This is a desirable thing to have for debugging, but it is also a dangerous thing to have in production devices, especially since the debugger is not available on-site. You should make sure to use the Release Target for your production builds.

It is also possible to leave the debug kernel in and selectively disable the reset message by using #pragma debug no_reset_event. You can also turn off all event notification using #pragma debug no_event_notify.

There is nothing special about these messages, they should show up as normal messages in a LonTalk Protocol Analyzer. However, the debug kernel uses a message image which resides in EEPROM and this EEPROM space is the same space as the application data so it is not checksummed. Thus, it is possible for one to modify this memory (application bug, corruption or Network Management write message) such that the message image contents get corrupted. Certain forms of corrupted messages (specifically, illegal protocol version number) are not displayed by LonTalk Protocol Analyzers.

 Related articles

  • LonScanner