Closed
Description
Hello.
Using ESP32 with arduino.
Below snippet was working ok on all previous versions. I updated today to 1.0.6 and now it won't connect to my home network, always creates Access Point instead.
WiFi.begin(wifiSSID.c_str(), wifiPSWD.c_str());
while(WiFi.status() != WL_CONNECTED) {
if(millis() - startTime > 2000) break;
delay(100);
tft.drawCentreString(CONNECTING_WIFI, OFFSET_WIDTH, OFFSET_HEIGHT+WIFI_OFFSET_HEIGHT, 1);
}
if(WiFi.status() != WL_CONNECTED) {
WiFi.disconnect(true);
WiFi.mode(WIFI_AP);
delay(100);
// WiFi.softAPConfig(local_ip, gateway, subnet);
WiFi.softAP(wifiSSID.c_str(), wifiPSWD.c_str());
delay(500);
IPAddress IP = WiFi.softAPIP();
tft.setCursor(10, 230);
tft.println(IP);
wifiOn = false;
} else {
wifiOn = true;
tft.setCursor(10, 230);
tft.println(WiFi.localIP());
}
Reverted back to 1.0.5 and 1.0.6, power cycled device many times and nothing helps. Once I use 1.0.5 everything works as it should.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done