OpenBK7231T_App icon indicating copy to clipboard operation
OpenBK7231T_App copied to clipboard

What are the reasons for frequent device restarts?

Open q127981 opened this issue 1 year ago • 4 comments

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" }

q127981 avatar Jul 01 '24 06:07 q127981

Catch the same BL-RST-SOFTWARE-WATCHDOG on BL602.

rpv-tomsk avatar Jul 01 '24 14:07 rpv-tomsk

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?

giedriuslt avatar Jul 02 '24 15:07 giedriuslt

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

q127981 avatar Jul 03 '24 11:07 q127981

@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

giedriuslt avatar Jul 03 '24 14:07 giedriuslt

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?

restoration2699 avatar Jul 22 '24 05:07 restoration2699

If you disable watchdog, then in case of crash, device will stay offline until you manually power it off and on again..

openshwprojects avatar Jul 23 '24 20:07 openshwprojects

@giedriuslt maybe move it to threaD?

openshwprojects avatar Jul 23 '24 20:07 openshwprojects

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.

restoration2699 avatar Jul 24 '24 15:07 restoration2699

Made a fix for this here #1298 No need to use threads lwip can resolve dns asynchronously

giedriuslt avatar Jul 27 '24 11:07 giedriuslt

: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:

github-actions[bot] avatar Aug 12 '24 19:08 github-actions[bot]

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.

andreid1303 avatar Nov 12 '25 13:11 andreid1303