Question regarding WIFI_COUNTRY_POLICY_AUTO

axellin
Posts: 197
Joined: Mon Sep 17, 2018 9:09 am

Question regarding WIFI_COUNTRY_POLICY_AUTO

Postby axellin » Fri Apr 16, 2021 2:18 am

I'm checking the esp_wifi_set_country() function with WIFI_COUNTRY_POLICY_AUTO.

The document says:
When the country policy is WIFI_COUNTRY_POLICY_AUTO, the country info of the AP to which the station is connected is used. E.g. if the configured country info is {.cc=”USA”, .schan=1, .nchan=11} and the country info of the AP to which the station is connected is {.cc=”JP”, .schan=1, .nchan=14} then the country info that will be used is {.cc=”JP”, .schan=1, .nchan=14}. If the station disconnected from the AP the country info is set back back to the country info of the station automatically, {.cc=”US”, .schan=1, .nchan=11} in the example.

Assument the device's country code is US.
the problem is before connecting to any AP the user usually do "all channel scan" to find the AP nearby.
While the device's country code is US, it can only scan channel 1 ~ 11.
i.e. it has no chance to find the AP in channel 13.
So I'm wondering how WIFI_COUNTRY_POLICY_AUTO works in this common use case.

Who is online

Users browsing this forum: cdollar and 122 guests