You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See release notes, doc and #7902 ? By looking at the minimal example above, I'd suggest to add enableWiFiAtBootTime(); call somewhere the setup(); of you sketch. By default, WiFi station is disabled and there's no auto connect happening at boot anymore.
Otherwise, just try to start the connection by calling WiFi.begin() (notice that there are no arguments, it will use the saved ones)
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());
}
The text was updated successfully, but these errors were encountered: