ESP8266 Developer Zone The Official ESP8266 Forum 2017-10-06T19:45:56+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=6626 2017-10-06T19:45:56+08:00 2017-10-06T19:45:56+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6626&p=16212#p16212 <![CDATA[Re: Store Smart Config ssid and password in WiFi NVS structure]]>
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.

Statistics: Posted by Guest — Fri Oct 06, 2017 7:45 pm


]]>
2017-09-28T22:01:25+08:00 2017-09-28T22:01:25+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6626&p=16077#p16077 <![CDATA[Store Smart Config ssid and password in WiFi NVS structure]]> 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!

Statistics: Posted by zjeezy — Thu Sep 28, 2017 10:01 pm


]]>