When scanning 5GHz channels using active scan we are not seeing any matches when SSID is hidden. When same SSID is set to not be hidden, active scan results are being returned properly.
Using this function to scan:
wifi_scan(RTW_SCAN_TYPE_ACTIVE, RTW_BSS_TYPE_ANY, &scan_buf))
NOTE: When scanning 2.4GHz channels using same API call, we DO see the hidden SSIDs.
I am setting the channels using wifi_set_pscan_chan
and using PSCAN_ENABLE 0x01 option
I am looking into Wi-Fi Channel Plan from chapter 14.5.5 from “AN0400 Ameba-D Application Note v8.0” in sdk/doc folder. If I am not mistaken, Channel Plan will enforce certain channel map for 5G channels to default to passive scan even though code sets scan mode to active, is this a correct assumption? At least this is how the chips seems to behave, by default.
I will try changing channel plan and see if chip can then see hidden 5G networks.
If anyone has dealt with this and/or has a confirmed solution feedback, please chime in.
Thanks,
Ivan S
Hi @airista_islavov, you may raise a request on this github link for further support.
Thank you.
Hi @airista_islavov, did you have a look at this thread?
I switched from the default 0x7f channel plan to 0x76 (US, Europe), which allows active scanning of channels 36, 40, 44, 48, 149, 153, 157, 161 and 165. For me it worked.
Hope that helps,
Xavier
I used wifi_set_country defined in wifi_conf.h, and that did it.
I exposed a parameter to set the county in my firmware, and then rely on chip to set proper channel plan based on section 14.5.5. setting country to US did exactly what you described.
/**
* @brief Set the country code to driver to determine the channel set.
* @param[in] country_code: Specify the country code.
* @return RTW_SUCCESS: If result is successfully set.
* @return RTW_ERROR: If result is not successfully set.
*/
int wifi_set_country(rtw_country_code_t country_code);
Update: setting country code via “wifi_set_country(RTW_COUNTRY_US)” allows hidden 5GHz SSID connections on non-DFS channels, exactly per the “Wi-Fi Channel Plan from chapter” and country mappings.
I just wanted to confirm what is the recommended way to set the channel plan?
- to set the country code via "wifi_set_country(…)… and that seems to be setting correct channel plan
OR
- wifi_set_channel_plan - to directly set the channel plan
Do both need to be called or setting country would suffice?