Skip to content

Commit 8281cdf

Browse files
authored
Merge pull request #2778 from particle-iot/fix/p2-join-new-network
Scan needs NcpState to be ON
2 parents 0e34f23 + edff2b5 commit 8281cdf

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)