diff --git a/wled00/const.h b/wled00/const.h index 5930445af..5fd87cac7 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -156,6 +156,7 @@ #define AP_BEHAVIOR_NO_CONN 1 //Open when no connection (either after boot or if connection is lost) #define AP_BEHAVIOR_ALWAYS 2 //Always open #define AP_BEHAVIOR_BUTTON_ONLY 3 //Only when button pressed for 6 sec +#define AP_BEHAVIOR_BOOT_NO_CONN_5MIN 4 //Open AP when no connection after boot but only for 5min //Notifier callMode #define CALL_MODE_INIT 0 //no updates on init, can be used to disable updates diff --git a/wled00/data/settings_wifi.htm b/wled00/data/settings_wifi.htm index f083a91d8..a503bc6ec 100644 --- a/wled00/data/settings_wifi.htm +++ b/wled00/data/settings_wifi.htm @@ -186,10 +186,12 @@ Access Point WiFi channel:
AP opens:
+ + + + + +
AP IP: Not active

Experimental

Disable WiFi sleep:
diff --git a/wled00/wled.cpp b/wled00/wled.cpp index dde3bbc85..0ad0ad716 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -885,11 +885,11 @@ void WLED::handleConnection() initConnection(); } if (!apActive && now - lastReconnectAttempt > 12000 && (!wasConnected || apBehavior == AP_BEHAVIOR_NO_CONN)) { - if (!(apBehavior == AP_BEHAVIOR_BOOT_NO_CONN && now > 300000)) { + if (!(apBehavior == AP_BEHAVIOR_BOOT_NO_CONN_5MIN && now > 300000)) { DEBUG_PRINTLN(F("Not connected AP.")); initAP(); // start AP only within first 5min } - } if (apActive && apBehavior == AP_BEHAVIOR_BOOT_NO_CONN && now > 300000 && stac == 0) { // disconnect AP after 5min + } if (apActive && apBehavior == AP_BEHAVIOR_BOOT_NO_CONN_5MIN && now > 300000 && stac == 0) { // disconnect AP after 5min dnsServer.stop(); WiFi.softAPdisconnect(true); apActive = false; @@ -914,7 +914,7 @@ void WLED::handleConnection() dnsServer.stop(); WiFi.softAPdisconnect(true); apActive = false; - DEBUG_PRINTLN(F("Access point disabled (handle).")); + DEBUG_PRINTLN(F("Access point disabled (connected).")); } } }