Store WiFi state (keys, MAC address etc) externally when in deep sleep?

huming2207
Posts: 9
Joined: Wed Dec 12, 2018 4:59 am

Store WiFi state (keys, MAC address etc) externally when in deep sleep?

Postby huming2207 » Wed Dec 12, 2018 5:18 am

Hi all,

We have a project that we need to use the WiFi network to check the update on every 30 seconds to 5 minutes periodically. The connection time only takes about 10 to 15 seconds. So the ESP32 should be in deep sleep mode to save battery. Now we're planning to re-use the WiFi connection state. That means we need to find some ways to save the current WiFi stack memory and the state of the WiFi hardware before the deep sleep starts, and restore the memory/state after it wakes up. We don't want it to reconnect the WiFi after the deep sleep, as that can waste 2-5 seconds for a handshake and DHCP request.

So I would like to know, is there a way to dump the WiFi state and memory to a certain external storage outside of RAM, like NVS, RTC memory or even SD card?

Or, can we just simply store the WiFi stack to PSRAM, and let the ESP32 to be in deep sleep but maintain the PSRAM's 1.8v power supply to save the network state?

Regards,
Jackson

nevercast
Posts: 7
Joined: Tue Jan 08, 2019 2:58 am

Re: Store WiFi state (keys, MAC address etc) externally when in deep sleep?

Postby nevercast » Tue Jan 08, 2019 4:02 am

You could use the non-volatile storage (nvs) to store these parameters, https://docs.espressif.com/projects/esp ... flash.html

Who is online

Users browsing this forum: No registered users and 106 guests