Page 1 of 1

ESP32 Wifi Station Modem Sleep Delay

Posted: Wed Sep 20, 2017 9:00 pm
by gatisp
Does anyone known why esp32 wifi lib enables modem sleep only after some time the connection to ap is made?

I am observing about 4-5s delay before modem begins to be turned off - see attached image - 1 sec per horizontal division, 100mA per vertical division.

Is there any way to make the modem sleep to kick in sooner?

See image:
https://pasteboard.co/GLidkQW.png
Image

Re: ESP32 Wifi Station Modem Sleep Delay

Posted: Fri Sep 22, 2017 4:43 am
by ESP_igrr
This was (is) a feature which made its way from the ESP8266, which had cases of packet loss in modem sleep mode early on, which caused some cases of lost DHCP replies, which in turn caused longer times until IP was obtained. On the ESP32 it seems to be unnecessary. We do have a work in progress branch which removes this extra delay, it should be available in master along with the upcoming frequency switching implementation.

Re: ESP32 Wifi Station Modem Sleep Delay

Posted: Fri Sep 22, 2017 7:13 am
by gatisp
Thanks for the info ESP_igrr, sounds promising!

If the power save mode causes trouble with some APs, there could be another wifi sta connection parameter that controls this behaviour (the power save delay). Or even better - an API that allows to dynamically switch from "allow power save" to "radio always on" (there always is possibility not to use power save when it is successfully negotiated).

Thank you, hope this lands in the master soon.

Re: ESP32 Wifi Station Modem Sleep Delay

Posted: Tue Jan 16, 2018 7:43 pm
by gatisp
Any news on this?

Still observing long delay on ESP32 in station mode after connect to AP before modem sleep kicks in...

Re: ESP32 Wifi Station Modem Sleep Delay

Posted: Wed Jan 17, 2018 2:56 pm
by ESP_igrr
Could you please quantify "long"? Once the station is connected to the AP, there shouldn't be much of a delay.

Re: ESP32 Wifi Station Modem Sleep Delay

Posted: Wed Jan 17, 2018 7:42 pm
by gatisp
By long I mean 3+ seconds. See attached image - more than 3 secs (1second per horizontal division)

This is compiled with current esp32 sdk head (1c3dd23fe0c547c5cdcd6a01c111145c572dab91)
Attached sdkconfig as used in app.