From 1b5d71bac79482fb72be832b8e2df0448e6d14d6 Mon Sep 17 00:00:00 2001 From: tablatronix <807787+tablatronix@users.noreply.github.com> Date: Mon, 12 Sep 2022 16:06:23 -0500 Subject: [PATCH] workaround for #1482 --- WiFiManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 0853000..2a71921 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -717,6 +717,7 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo // HANDLE issues with STA connections, shutdown sta if not connected, or else this will hang channel scanning and softap will not respond if(_disableSTA || (!WiFi.isConnected() && _disableSTAConn)){ // this fixes most ap problems, however, simply doing mode(WIFI_AP) does not work if sta connection is hanging, must `wifi_station_disconnect` + WiFi.mode(WIFI_AP_STA); WiFi_Disconnect(); WiFi_enableSTA(false); #ifdef WM_DEBUG_LEVEL @@ -724,7 +725,7 @@ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPasswo #endif } else { - WiFi_enableSTA(true); + // WiFi_enableSTA(true); } // init configportal globals to known states