diff --git a/esp-wifi/src/wifi/mod.rs b/esp-wifi/src/wifi/mod.rs index 6db28a7418e..e1bf0babc89 100644 --- a/esp-wifi/src/wifi/mod.rs +++ b/esp-wifi/src/wifi/mod.rs @@ -1212,7 +1212,12 @@ impl embedded_svc::wifi::Wifi for WifiController<'_> { } fn is_started(&self) -> Result { - Ok(self.is_sta_enabled()? || self.is_ap_enabled()?) + match crate::wifi::get_wifi_state() { + crate::wifi::WifiState::Invalid => Ok(false), + // We assume that wifi has been started in every other states + _ => Ok(true) + } + } fn is_connected(&self) -> Result {