ESP32-S2-WROVER (4MB) with ESP-IDF v5.0-dev-4770-gd622bcfd46
WiFi is running in mode WIFI_MODE_APSTA
Problem: WiFi-Scan does not list stations of all channels.
Code: Select all
wifi_config_t wifi_config_ap = \
{
.ap = \
{
.ssid = WIFI_AP_SSID,
.ssid_len = strlen(WIFI_AP_SSID),
.channel = 2,
.password = WIFI_AP_PASSWORD,
.authmode = WIFI_AUTH_WPA_WPA2_PSK,
.max_connection = WIFI_MAX_STA_CONN,
},
};
Code: Select all
wifi_scan_config_t s_scan_config = { 0 };
esp_wifi_scan_start(&s_scan_config, false);
If ESP-AP channel is set to 2, scan returns access points on channels 1-7.
If ESP-AP channel is set to 8, scan returns stations on channels 1-8.
If ESP-AP channel is set to 11, scan returns stations on channels 1-7, 11.
If scan is started with s_scan_config.channel = 8, scan returns stations on channel 8.
Function esp_wifi_get_country returns:
.cc = 01
.schan = 1
.schan = 11
.max_tx_power = 20
.policy = WIFI_COUNTRY_POLICY_AUTO
What's wrong? esp_wifi_scan_start should return stations of all channels.