Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are the reasons for frequent device restarts? #1284

Closed
q127981 opened this issue Jul 1, 2024 · 10 comments · Fixed by #1298
Closed

What are the reasons for frequent device restarts? #1284

q127981 opened this issue Jul 1, 2024 · 10 comments · Fixed by #1298
Labels
bug Something isn't working released

Comments

@q127981
Copy link

q127981 commented Jul 1, 2024

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:

@rpv-tomsk
Copy link
Contributor

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

@giedriuslt
Copy link
Contributor

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?

@openshwprojects openshwprojects added the bug Something isn't working label Jul 3, 2024
@q127981
Copy link
Author

q127981 commented Jul 3, 2024

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

@giedriuslt
Copy link
Contributor

@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

@restoration2699
Copy link

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?

@openshwprojects
Copy link
Owner

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

@openshwprojects
Copy link
Owner

@giedriuslt maybe move it to threaD?

@restoration2699
Copy link

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.

@giedriuslt
Copy link
Contributor

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

Copy link

🎉 This issue has been resolved in version 1.17.655 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants