Skip to content

Commit edff2b5

Browse files
committed
Scan needs NcpState to be ON
1 parent 0e34f23 commit edff2b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

system/src/control/wifi_new.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ int joinNewNetwork(ctrl_request* req) {
9494
const NcpClientLock lock(ncpClient);
9595
#if HAL_PLATFORM_RTL872X
9696
if (!conf.hidden()) {
97+
// scan checks that the NcpState is ON
98+
CHECK(ncpClient->on());
9799
// Scan for networks to detect the network security type
98100
Vector<WifiScanResult> networks;
99101
CHECK(ncpClient->scan([](WifiScanResult network, void* data) -> int {

0 commit comments

Comments
 (0)