Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By jbillhei
#62349 Ok, here goes. I cannot get modem sleep to do anything. I've pretty much canvassed the internet and tried everything I could find. As best I can tell, this feature just does not work. Much sadness.

I'm running the latest Arduino code from git (master branch, as of yesterday).

I'm mostly interested in this function:
wifi_set_sleep_type( MODEM_SLEEP_T );

According to Espressif, this should automatically sleep the modem and wake up for the DTIM message. So, we should see low current, and spikes when the receiver wakes up. Ostensibly this means that ping times should be increased, but they should still work. This is how your phone and laptop work to save power, but still be accessible on the network.

What I get is maximum receive current all of the time and very fast pings. No power savings whatsoever.

If I use WiFi.forceSleepBegin(), the modem definitely turns off. Until I wake it back up. While it is asleep, it will not receive any messages at all. But that's not modem sleep in the way Espressif defines it, it's just turning off the receiver completely (but it does somehow maintain the connection to the router?). This is definitely not how the DTIM power saving feature in wifi is supposed to work.

I cannot use light sleep or deep sleep, as I need the CPU running all the time (and I need to be able to receive network traffic).

I've seen tons of confusing and conflicting information on this subject. Seems like it works for some, doesn't for others. But what it looks like most people end up doing is forced sleep. This is fine if you have a sensor transmitting data, but no good if you have a control system that needs to receive messages at any time.


So, my question is, does anyone have the actual modem sleep mode working? As in, you're seeing 15-20 mA current most of the time, but still able to ping your device.


Thanks in advance!
User avatar
By RK_aus_S
#78151 Hi

Any progress in this issue?

I see exactly the same behaviour as jbillhei wrotes. Need Modem-Sleep, but my ESP8266 does obviousely not enter in this mode, because device still needs about 70 mA of current.

Espressif writes that Modem-Sleep is enabled by default as long the ESP is in Station Mode.