SK
Signal K10mo ago
Roger

Roger - @Matti Airas, I have a problem with my ...

@Matti Airas, I have a problem with my SH-ESP32 crashing or locking up every so often. When it happens, I no longer receive any data over wifi or n2k, and no logging via usb. My questions are, is the a way to have it dump a crash log, and, is there a a way to have it automatically restart if there is a crash?
4 Replies
Matti Airas
Matti Airas10mo ago
I don't think you can get a crash log after the fact. You'd need to have a computer connected to the device until it crashes. That can of course be quite unpractical if the crash only occurs rarely. The ESP32 has a hardware watchdog. It's not enabled in SensESP by default, though. That's purely an oversight by me... Here's one guide how to set it up. The idea is to first set the watchdog and then reset it every so often to prevent it from rebooting the device. A dead man's switch of sorts.
Roger
RogerOP10mo ago
Link?
Matti Airas
Matti Airas10mo ago
raul
IoT Assistant
How to enable hardware WDT on ESP32 using Arduino IDE - IoT Assistant
A Watchdog Timer (WDT) will auto restart your device when the program gets stuck due to various hardware or software issues.
Roger
RogerOP10mo ago
Thanks, I’ll take a look. @Matti Airas, I've enabled WDT and it seems to work, but it's playing havoc with OTA updates. With WDT enabled with a 5 second timeout, OTA fails at about 10% - 15%. Manually extending the timeout seems to work. Any advice how to either disable it temporarily, or extend the timeout when OTA runs. I'm thinking a checkbox or timeout setting in the UI or some automatic setting that is invoked when OTA runs. I've found a way to fix it in ota.cpp. I'll create a PR so you can take a look.
Want results from more Discord servers?
Add your server