ESP32 auto sleep?
Posted: Wed May 12, 2021 5:50 pm
I have an ESP32 wrover module which seems to "fall asleep" by itself. Probebly it is something else but it looks like this.
The module is connected to wifi and gets sensor data, sends it to a webserver and does this every X seconds. It also has an RGB strip to show some modes (blue light is normal, red light is no wifi, purple is updating etc).
For some reason, the device stops connecting to the server after some amount (random) of time. I have ubiquiti access points and i am still seeing the device connected to the access point, but the wifi experience is 100% constant (normally fluctuating between 90 and 100%), see below.
I can reconnect the device via ubiquiti but nothing happens.
I did build in some code to see if the device has a wifi connection and if it doesnt it will reconnect. If it can't get a wifi connection for 1 hour it will reboot.
The problem is that the device seems to halt all of its running processes. I have connected the device to the computer now but it works perfectly. If i disable wifi it shows the message that wifi is disconnected and keeps trying to reconnect, after wifi comes back again it reconnects and it works again. The other problem is that it can work for a few days and all of a sudden it stops working. I am not sure how to debug this since i can't access it via wifi.
What could cause this problem? Can the ESP32 go into sleepmode at some scenario?
Thanks for helping me with my difficult explanation
The module is connected to wifi and gets sensor data, sends it to a webserver and does this every X seconds. It also has an RGB strip to show some modes (blue light is normal, red light is no wifi, purple is updating etc).
For some reason, the device stops connecting to the server after some amount (random) of time. I have ubiquiti access points and i am still seeing the device connected to the access point, but the wifi experience is 100% constant (normally fluctuating between 90 and 100%), see below.
I can reconnect the device via ubiquiti but nothing happens.
I did build in some code to see if the device has a wifi connection and if it doesnt it will reconnect. If it can't get a wifi connection for 1 hour it will reboot.
The problem is that the device seems to halt all of its running processes. I have connected the device to the computer now but it works perfectly. If i disable wifi it shows the message that wifi is disconnected and keeps trying to reconnect, after wifi comes back again it reconnects and it works again. The other problem is that it can work for a few days and all of a sudden it stops working. I am not sure how to debug this since i can't access it via wifi.
What could cause this problem? Can the ESP32 go into sleepmode at some scenario?
Thanks for helping me with my difficult explanation