espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.78k stars 7.31k forks source link

WIFI_SCAN_PARAMS_DEFAULT_CONFIG macro should also set channel bitmap (IDFGH-13687) #14505

Open TD-er opened 2 months ago

TD-er commented 2 months ago

Answers checklist.

General issue report

See the define of this macro: https://github.com/espressif/esp-idf/blob/6673376297b921d438790d195014b860eaf8bb17/components/esp_wifi/include/esp_wifi_types_generic.h#L154C9-L159

This macro does not clear the channel_bitmap members, which can cause issues as those will then contain random data. See related PR in arduino-esp32: https://github.com/espressif/arduino-esp32/pull/10282 and related issue: https://github.com/espressif/arduino-esp32/issues/10281

brentru commented 2 months ago

@TD-er I'm seeing/having a similar issue with WiFi Scan as well and this macro is not set properly.

hansw123 commented 1 month ago

@TD-er sorry for late reply WIFI_SCAN_PARAMS_DEFAULT_CONFIG is used for esp_wifi_set_scan_parameters() and struct wifi_scan_default_params_t, and only set scan time releated config, bitmap will be set default and will not cauese issue