-->
Page 1 of 2

Speed up connection to WiFi after power on reset

PostPosted: Tue Feb 14, 2017 12:29 pm
by snafu
Hi all!

I'm pretty happy getting my ESP connected to WiFi within approx 1 sec if I use static IP and deep sleep. Power supply remains connected, and I reset ESP with an pushbutton to wake him up to do some work.

To reduce power consumption even further, I now use an MOSFET to switch off the ESP completely. If i start the ESP after such power off, connection time increases significantly up to several seconds.

Somewhere I read about some WiFi connection credentials saved in Watchdog / RTC RAM. These credentials (must be more than SSID and PW) are told to be responsible for that fast connect.

How can i sped up my connection time after power on in the same way? Is it possible to save these connection details in FLASH?

Thank you in advance!
Snafu.

Re: Speed up connection to WiFi after power on reset

PostPosted: Sun Mar 07, 2021 11:29 am
by Br4inslug
Same question here.
Working with deep sleep everything works fine.
But after power reset it takes up to 4 Sekonds to connect.
Did you manage to find a solution to the problem?

Re: Speed up connection to WiFi after power on reset

PostPosted: Wed Mar 10, 2021 5:06 pm
by davydnorris
You can of course store them in flash but then you would have to write your own routines to do the connection. I've posted my own code to do this in the Advanced topic.

Having said that, there is also some additional diagnostics that are done when first starting up so you'll never get it quite the same as deep sleep.

Re: Speed up connection to WiFi after power on reset

PostPosted: Thu Mar 11, 2021 7:43 am
by btidey
Fast connect requires avoiding the channel scan and using an explicit mac address for the router.

One can pass these 2 parameters as part of a wifi connect call. They will then be stored in flash and re-used subsequently even after power off or sleep.

If using arduino environment and wifi manager to manage connections then the fast connect can be handled automatically by using the feature_fastconnect version of the library. This retrieves the channel / mac address when first making a connection and then subsequently uses them. It also handles the changes needed if the channel or mac address of the router change.