esp-idf: WIFI_ALL_CHANNEL_SCAN, this parameter doesn't seem to work (IDFGH-6630)

Environment

  • Development Kit: [ESP32-C3-DevKitM-1]
  • IDF version (run git describe --tags to find it): v4.3.2-198-gb9a96186fd
  • Build System: [idf.py]
  • Compiler version riscv32-esp-elf-gcc (crosstool-NG esp-2021r2) 8.4.0
  • Operating System: [Windows]
  • (Windows only) environment type: [ESP Command Prompt].
  • Power Supply: [USB]

Problem Description

Using full channel scanning doesn’t work, I built two wifi with the same SSID and password, but ESP32C3 doesn’t always choose the connection with the best signal.

Code to reproduce this issue

wifi_config_t wifi_config = {
    .sta = {
        .ssid = DEFAULT_SSID,
        .password = DEFAULT_PWD,
        .scan_method = WIFI_ALL_CHANNEL_SCAN, // WIFI_FAST_SCAN, // 
        .sort_method = WIFI_CONNECT_AP_BY_SIGNAL,
        .threshold.rssi = DEFAULT_RSSI,
        .threshold.authmode = DEFAULT_AUTHMODE,
    },
 };
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config));

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 91 (24 by maintainers)

Most upvoted comments

hi! An update - Fix for this is merged on the master branch. Backporting is in progress for v4.x and v5.0 release branches. One of us would post an update once this is available on all branches.

Regards, Vikram