You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Measured on hardware, board associated to an AP, build 10.3.0-alpha.4-57-gd96b766f32:
[connected] total: 61 uniq_bssid: 12
61 scan results for 12 real access points, about 5x duplication. Same SSID and RSSI repeat, for example six entries of one SSID all at -45 dBm on channel 6.
Cause
ports/zephyr-cp/common-hal/wifi/ScannedNetworks.c:83 sweeps channels one at a time, copied from the espressif port:
Each entry issues its own NET_REQUEST_WIFI_SCAN. That works on espressif because esp_wifi_scan_start() honors the requested channel. It does not work here.
zephyr/drivers/wifi/siwx91x/siwx91x_wifi_scan.c:188 switches scan type once the radio is associated:
if (sidev->state==WIFI_STATE_COMPLETED) {
siwx91x_configure_scan_dwell_time(SL_WIFI_SCAN_TYPE_ADV_SCAN, ...
and Silicon Labs documents that background scans ignore the channel selection (modules/hal/silabs/wiseconnect/components/protocol/wifi/inc/sl_wifi_types.h:274):
For background scans (SL_WIFI_SCAN_TYPE_ADV_SCAN): Scans the channels that were originally specified in channel_bitmap_2g4 during the first scan. The channel bitmap cannot be modified for background scans.
So while connected, every pass of the sweep re-reports the same APs. Nothing between the driver and Python filters them: wifi_scannednetworks_scan_result() puts every result straight on the msgq.
Knock-on
MAX_BUFFERED_SCAN_RESULTS is 10 (ScannedNetworks.h:17) and overflow is dropped with a Dropping scan result warning. Duplicates from a strong nearby AP can push genuine distant APs out of the results entirely, so this is not only cosmetic.
Not unique to this port
CircuitPython does not deduplicate scan results anywhere, on any port. espressif looks clean only because ESP-IDF returns a per-BSS deduplicated list. raspberrypi has the same visible symptom, reported by dhalbert in adafruit#7318, open since 2022 and labeled third-party.
MicroPython solves it for the same cyw43 chip in extmod/network_cyw43.c:159-169 by deduplicating on BSSID and keeping the strongest RSSI.
Measured on hardware, board associated to an AP, build
10.3.0-alpha.4-57-gd96b766f32:61 scan results for 12 real access points, about 5x duplication. Same SSID and RSSI repeat, for example six entries of one SSID all at -45 dBm on channel 6.
Cause
ports/zephyr-cp/common-hal/wifi/ScannedNetworks.c:83sweeps channels one at a time, copied from the espressif port:Each entry issues its own
NET_REQUEST_WIFI_SCAN. That works on espressif becauseesp_wifi_scan_start()honors the requested channel. It does not work here.zephyr/drivers/wifi/siwx91x/siwx91x_wifi_scan.c:188switches scan type once the radio is associated:and Silicon Labs documents that background scans ignore the channel selection (
modules/hal/silabs/wiseconnect/components/protocol/wifi/inc/sl_wifi_types.h:274):So while connected, every pass of the sweep re-reports the same APs. Nothing between the driver and Python filters them:
wifi_scannednetworks_scan_result()puts every result straight on the msgq.Knock-on
MAX_BUFFERED_SCAN_RESULTSis 10 (ScannedNetworks.h:17) and overflow is dropped with aDropping scan resultwarning. Duplicates from a strong nearby AP can push genuine distant APs out of the results entirely, so this is not only cosmetic.Not unique to this port
CircuitPython does not deduplicate scan results anywhere, on any port. espressif looks clean only because ESP-IDF returns a per-BSS deduplicated list. raspberrypi has the same visible symptom, reported by dhalbert in adafruit#7318, open since 2022 and labeled
third-party.MicroPython solves it for the same cyw43 chip in
extmod/network_cyw43.c:159-169by deduplicating on BSSID and keeping the strongest RSSI.Options
These are complementary. 1 is the more useful upstream change.