diff --git a/libraries/WiFi/src/WiFiGeneric.cpp b/libraries/WiFi/src/WiFiGeneric.cpp index a1bdc76f..1362a65b 100644 --- a/libraries/WiFi/src/WiFiGeneric.cpp +++ b/libraries/WiFi/src/WiFiGeneric.cpp @@ -574,7 +574,7 @@ bool WiFiGenericClass::mode(wifi_mode_t m) */ wifi_mode_t WiFiGenericClass::getMode() { - if(!lowLevelInitDone){ + if(!lowLevelInitDone || !_esp_wifi_started){ return WIFI_MODE_NULL; } wifi_mode_t mode;