Skip to content

SmartConfig is not saving credentials after upgrading esp8266 board from 2.7.4 to 3.0.2 #8540

@shajvarg

Description

@shajvarg

the code below works perfectly in 2.7.4 version of the esp8266 board, but in 3.0.2 it does not connect and goes to smartconfig everytime..

void wifiSetup() {
/* Set ESP8266 to WiFi Station mode /
WiFi.mode(WIFI_STA);
int cnt = 0; bool smartcfg = false;
/
Wait for WiFi to connect to AP /
Serial.println("Waiting for WiFi");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
if((cnt++ >= 40) && !smartcfg) {
/
start SmartConfig /
int scnt = 0;
WiFi.beginSmartConfig();
/
Wait for SmartConfig packet from mobile */
Serial.println("Waiting for SmartConfig.");
while (!WiFi.smartConfigDone()) {
delay(500);
Serial.print(":");
if(scnt++ >= 120) ESP.reset();
}
Serial.println("");
Serial.println("SmartConfig done.");
smartcfg = true;
}
}
Serial.println("WIFI CONNECTED");
Serial.print("IP Address: ");
Serial.println(WiFi.localIP());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions