Store Smart Config ssid and password in WiFi NVS structure

zjeezy
Posts: 1
Joined: Thu Sep 28, 2017 9:47 pm

Store Smart Config ssid and password in WiFi NVS structure

Postby zjeezy » Thu Sep 28, 2017 10:01 pm

Hello,
I am able to successfully set up the smartconfig example using the ESPTOUCH app. I would like to modify this example to automatically connect to the last working WiFi network. Can someone provide guidance on the best way to do this?

I can easily save the ssid and password using something similar to the NVS RW example. However, I noticed in the documentation that the esp_wifi_init() method has an option for a WiFi NVS structure. https://esp-idf.readthedocs.io/en/v2.0/api/wifi/esp_wifi.html#_CPPv213esp_wifi_initP18wifi_init_config_t Is there an automatic way to retrieve previously working credentials on boot using this?

Thanks!

pratik

Re: Store Smart Config ssid and password in WiFi NVS structure

Postby pratik » Fri Oct 06, 2017 7:45 pm

Oops, you should be posting ESP32 questions on esp32.com

And as for the question, I tried to use WIFI_STORAGE_FLASH and store WiFi credentials to flash but that does not seem to be working for some reason. At least not reliably. I am using a custom WiFi event handler and not the IDF default one.

Who is online

Users browsing this forum: No registered users and 120 guests