Inform user if AP creation failed

This should help to diagnose WiFi problems on -S2.
This commit is contained in:
Frank
2023-02-24 15:24:58 +01:00
parent c294ea0e09
commit 6651b412cb

View File

@@ -448,7 +448,7 @@ void WLED::setup()
fsinit = WLED_FS.begin();
#endif
if (!fsinit) {
DEBUG_PRINTLN(F("FS failed!"));
USER_PRINTLN(F("Mount FS failed!")); // WLEDMM
errorFlag = ERR_FS_BEGIN;
}
#ifdef WLED_ADD_EEPROM_SUPPORT
@@ -652,7 +652,11 @@ void WLED::initAP(bool resetAP)
USER_PRINT(F("Opening access point ")); // WLEDMM
USER_PRINTLN(apSSID); // WLEDMM
WiFi.softAPConfig(IPAddress(4, 3, 2, 1), IPAddress(4, 3, 2, 1), IPAddress(255, 255, 255, 0));
WiFi.softAP(apSSID, apPass, apChannel, apHide);
if (!WiFi.softAP(apSSID, apPass, apChannel, apHide)) { // WLEDMM softAp() will return true in case of success and false in case of failure.
USER_PRINTLN(F("Access point creation failed."));
apActive = false;
return;
}
if (!apActive) // start captive portal if AP active
{