diff --git a/main/kernel/drivers/WiFiDriver.hpp b/main/kernel/drivers/WiFiDriver.hpp index efea232f..3f170fa9 100644 --- a/main/kernel/drivers/WiFiDriver.hpp +++ b/main/kernel/drivers/WiFiDriver.hpp @@ -155,7 +155,8 @@ class WiFiDriver { switch (eventId) { case WIFI_PROV_START: { Log.debug("WiFi: provisioning started"); - // configPortalRunning.set(); + // Do not turn WiFi off until provisioning finishes + acquire(); break; } case WIFI_PROV_CRED_RECV: { @@ -180,6 +181,7 @@ class WiFiDriver { case WIFI_PROV_END: { Log.debug("WiFi: provisioning finished"); configPortalRunning.clear(); + release(); break; } }