From edff2b5b68207e3166d9a46695317951ae18fa5c Mon Sep 17 00:00:00 2001 From: keeramis Date: Thu, 30 May 2024 16:43:11 -0700 Subject: [PATCH] Scan needs NcpState to be ON --- system/src/control/wifi_new.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/src/control/wifi_new.cpp b/system/src/control/wifi_new.cpp index 29968dbc4a..baf52cf27f 100644 --- a/system/src/control/wifi_new.cpp +++ b/system/src/control/wifi_new.cpp @@ -94,6 +94,8 @@ int joinNewNetwork(ctrl_request* req) { const NcpClientLock lock(ncpClient); #if HAL_PLATFORM_RTL872X if (!conf.hidden()) { + // scan checks that the NcpState is ON + CHECK(ncpClient->on()); // Scan for networks to detect the network security type Vector networks; CHECK(ncpClient->scan([](WifiScanResult network, void* data) -> int {