Chat freely about anything...

User avatar
By snafu
#62562 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.
User avatar
By davydnorris
#90784 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.
User avatar
By btidey
#90791 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.