What are the reasons for frequent device restarts?
I have a BL602 device. After configuring wifi and mqtt information for the device, the device works normally. Then disconnect the WiFi Internet (keep the device connected to WiFi), and the device will restart frequently and automatically. The reason for displaying the error is: BL-RST-SOFTWARE-WATCHDOG But I have disabled the watchdog, it should not work. I want to ask how to prevent the device from being restarted frequently when the connected WiFi has no Internet?
The log of the device is always lost after reboot. I can't get the reason why the device restarts frequently from the log.
Firmware:
- Version 1.17.628
- Device BL602
- Chip/model: BK7231T?
- Device config { "vendor": "Tuya", "bDetailed": "0", "name": "Full Device Name Here", "model": "enter short model name here", "chip": "BL602", "board": "TODO", "flags": "1024", "keywords": [ "TODO", "TODO", "TODO" ], "pins": { "14": "wifiLED_n;1", "20": "Btn;1", "21": "Rel;1" }, "command": "", "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg", "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html" }
Catch the same BL-RST-SOFTWARE-WATCHDOG on BL602.
You cannot disable software watchdog, it always works; what is our mqtt config? does it contain dns name? could you try replacing it with IP?
You cannot disable software watchdog, it always works; what is our mqtt config? does it contain dns name? could you try replacing it with IP?
Yes, I disabled the watchdog and it still works.
My mqtt config:
host mqtt.xxxxx.com port 1883 username xxxx password xxxx
I changed host to ip, and this problem never occurred again. thank you very much!
@giedriuslt
@openshwprojects maybe we can make dns resolution for mqtt asynchronous? Now it's in the main loop, and if slow (or no-internet) causes reboot
I changed host to ip, and this problem never occurred again. thank you very much!
did almost the same, except mqtt server in local network. but still get "BL_RST_SOFTWARE_WATCHDOG". how I can permanently disable watchdog function?
If you disable watchdog, then in case of crash, device will stay offline until you manually power it off and on again..
@giedriuslt maybe move it to threaD?
If you disable watchdog, then in case of crash, device will stay offline until you manually power it off and on again..
I understand the risk. but for now my home server plugged in through power plug for energy monitoring. and it is very annoying that it randomly reboots.
Made a fix for this here #1298 No need to use threads lwip can resolve dns asynchronously
:tada: This issue has been resolved in version 1.17.655 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
This problem exists on version 1.18.210 with IP address for MQTT host. When I disable MQTT device does not restart. No problem with version 1.18.180 so far, to downgrade I have to flash it via UART.