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
In the examples:
// Try to connect to stored SSID, start AP with captive portal if fails after timeout
IPAddress myIP = server.startWiFi(15000);
if (!myIP) {
Serial.println("\n\nNo WiFi connection, start AP and Captive Portal\n");
server.startCaptivePortal("ESP_AP", "123456789", "/setup");
myIP = WiFi.softAPIP();
captiveRun = true;
}
myIP is always 192.168.4.1 when there is no connection to Router, so (!myIP) is never true and Captive Portal is not startet.
But captive portal is running with other name (ESP-...) and without password.
The text was updated successfully, but these errors were encountered:
I have this issue too. For now i have it partly hardwired in the src files, however this only handles the ssid and not the password (maybe because of my poor programming skills.)
But yes, The ssid and password that are in the .ino sketch are not being used.
In the sketch:
Change
IPAddress myIP = server.startWiFi(15000); to
IPAddress myIP = server.startWiFi(15000, nullptr, true);
When there is no AP or the credentials are wrong then AP ist startet with ("ESP_AP", "123456789" because the returned IP is 0.0.0.0
But when there are no credentials in the ESP AP is starting with another name and without password.
I put the following code in line 675 of AsyncFsWebServer.cpp:
// If AP not needed because it will be started in sketch
if (skipAP) return IPAddress(0, 0, 0, 0);
i made the above adjustments to the code and then found my issue. I had manually entered the ssid and passw in the src/.cpp file, but i also left the old line in there. so there were 2 lines doing the same thing. anyway, it works now.
as for your issue, i cannot test it because i don't know how to erase the wifi credentials that are saved. I tried before, and even after multiple flash erase cycles, the wifi credentials stayed in memory.
In the examples:
// Try to connect to stored SSID, start AP with captive portal if fails after timeout
IPAddress myIP = server.startWiFi(15000);
if (!myIP) {
Serial.println("\n\nNo WiFi connection, start AP and Captive Portal\n");
server.startCaptivePortal("ESP_AP", "123456789", "/setup");
myIP = WiFi.softAPIP();
captiveRun = true;
}
myIP is always 192.168.4.1 when there is no connection to Router, so (!myIP) is never true and Captive Portal is not startet.
But captive portal is running with other name (ESP-...) and without password.
The text was updated successfully, but these errors were encountered: