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!