Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libraries/Zigbee/src/ZigbeeCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,14 @@ void ZigbeeCore::scanNetworks(u_int32_t channel_mask, u_int8_t scan_duration) {
log_e("Zigbee stack is not started, cannot scan networks");
return;
}
if (_scan_status == ZB_SCAN_RUNNING) {
log_w("Scan already in progress, ignoring new scan request");
return;
}
log_v("Scanning Zigbee networks");
esp_zb_lock_acquire(portMAX_DELAY);
esp_zb_zdo_active_scan_request(channel_mask, scan_duration, scanCompleteCallback);
esp_zb_lock_release();
_scan_status = ZB_SCAN_RUNNING;
}

Expand Down
Loading