-->
Page 1 of 1

Is it possible to make ESP8266 to go to model_sleep faster?

PostPosted: Tue Jul 31, 2018 7:54 am
by tkoski
Hi all,

I manage to get the esp8266 to go to a modem_sleep state (By using delay(1);) so that power consumption drops from ~70mA to ~15am (except during the beacons).

However, it seems, that there is a ~10 seconds timeout before esp8266 goes to the modem_sleep -state after WIFI connection.

Is there a way to get the esp8266 to modem_sleep state any faster? For example, right after getting the IP?

Re: Is it possible to make ESP8266 to go to model_sleep fast

PostPosted: Tue Jul 31, 2018 11:52 am
by schufti
if you are using dhcp then it could just be the time between the "connect" (authentication) and successful end of the following dhcp negotiation.
you could also try WiFi.forceSleepBegin()

Re: Is it possible to make ESP8266 to go to model_sleep fast

PostPosted: Wed Aug 01, 2018 7:00 am
by tkoski
Thank you Schulti.

I need to debug more, but it seems that there is some some kind of timeout before the esp goes to modem_sleep. Does anyone know about that or is it documented somewhere?

Also, to my understanding, WiFi.forceSleepBegin() will not work, since it will close the WiFi connection, right?

Re: Is it possible to make ESP8266 to go to model_sleep fast

PostPosted: Wed Aug 01, 2018 7:56 am
by tkoski
Thanks schufti for your response,

based on my short set of tests, it seems that the time to go to modem_sleep seems to happen after the timeout. Not because the delay in dhcp negotiation. I will test more.

Does anyone know about the timeout or if it's documented somewhere?

If I have understood right, i cannot use WiFi.forceSleepBegin() because that will close the wifi connection. Right?