Arduino-esp32: WiFiSmartConfig save settings (AP, PASS)

Created on 7 Oct 2017  路  10Comments  路  Source: espressif/arduino-esp32

WiFiSmartConfig connection working good. But after reboot changes unsaved. I try to get AP name and PASS to write to EEPROM but both unsuccessful. Any advise?

stale

Most helpful comment

Has there been any progress in fixing this? I have a couple of application that just won't work if the settings obtained with smart config are lost. I can add a work-around like this:

int count = 0;
Serial.print("Attempting WiFi connection");
status = WiFi.reconnect(); //or reconnect they work about the same
while (status != WL_CONNECTED) {
if (count > 9) break;
Serial.print(".");
Show ("Connecting....");
//status = WiFi.begin(ssid, pass);
status = WiFi.begin();
delay (2000);
count++;
}
if (status != WL_CONNECTED) setupWiFi ();

but shouldn't this be built in to the library?

All 10 comments

can you please post minimal sketch that shows the issue?

I have the same issue. Please see #810.

Has there been any progress in fixing this? I have a couple of application that just won't work if the settings obtained with smart config are lost. I can add a work-around like this:

int count = 0;
Serial.print("Attempting WiFi connection");
status = WiFi.reconnect(); //or reconnect they work about the same
while (status != WL_CONNECTED) {
if (count > 9) break;
Serial.print(".");
Show ("Connecting....");
//status = WiFi.begin(ssid, pass);
status = WiFi.begin();
delay (2000);
count++;
}
if (status != WL_CONNECTED) setupWiFi ();

but shouldn't this be built in to the library?

Agree with @bill-orange, can this be standard functionality? I think most users would assume the smart config settings are preserved between reboots, regardless of past experience with the esp8266.

Thanks alot @bill-orange . i have been looking for a solution

Any updates? Does anyone solved the problem?

Beyond the work-around I posted 9 months ago, I don鈥檛 think so.

There is a solution here: https://github.com/espressif/arduino-esp32/issues/1100#issuecomment-392397250

that saves the SmartConfig credentials to NVS, then load it on boot

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This stale issue has been automatically closed. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jhowkis picture jhowkis  路  3Comments

mistergreen picture mistergreen  路  4Comments

DrewHoyt picture DrewHoyt  路  4Comments

0x1abin picture 0x1abin  路  3Comments

ComputerLag picture ComputerLag  路  3Comments