Fix failing very first wifi connection attempt

This commit is contained in:
jpirnay
2026-03-28 11:10:19 +01:00
parent 5b43639f98
commit ffbe4fed21
@@ -217,7 +217,10 @@ void WifiSelectionActivity::attemptConnection() {
connectionError.clear();
requestUpdate();
WiFi.persistent(false); // Credentials are managed by WifiCredentialStore; suppress SDK NVS auto-connect
WiFi.mode(WIFI_STA);
WiFi.disconnect(true); // Abort any in-progress SDK auto-connect and clear NVS-saved SSID
delay(100);
// Set hostname so routers show "CrossPoint-Reader-AABBCCDDEEFF" instead of "esp32-XXXXXXXXXXXX"
String mac = WiFi.macAddress();