From 71e4d231c6eb74a16920ed9ec80a2de75cd22984 Mon Sep 17 00:00:00 2001 From: Deng Xin Date: Fri, 20 Jul 2018 20:30:29 +0800 Subject: [PATCH] Wifi: bug fix of may connect to wrong AP in all channel scan 1. enable threshold in all channel scan 2. bug fix of may connect to an open AP even set password in all channel scan --- components/esp32/include/esp_wifi_types.h | 4 +++- components/esp32/lib | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/esp32/include/esp_wifi_types.h b/components/esp32/include/esp_wifi_types.h index 88108bf0a..8a7695faf 100755 --- a/components/esp32/include/esp_wifi_types.h +++ b/components/esp32/include/esp_wifi_types.h @@ -173,6 +173,8 @@ typedef struct { wifi_auth_mode_t authmode; /**< The weakest authmode to accept in the fast scan mode */ }wifi_fast_scan_threshold_t; +typedef wifi_fast_scan_threshold_t wifi_scan_threshold_t; /**< wifi_fast_scan_threshold_t only used in fast scan mode once, now it enabled in all channel scan, the wifi_fast_scan_threshold_t will be remove in version 4.0 */ + typedef enum { WIFI_PS_NONE, /**< No power save */ WIFI_PS_MODEM, /**< Modem power save */ @@ -209,7 +211,7 @@ typedef struct { uint8_t bssid[6]; /**< MAC address of target AP*/ uint8_t channel; /**< channel of target AP. Set to 1~13 to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/ wifi_sort_method_t sort_method; /**< sort the connect AP in the list by rssi or security mode */ - wifi_fast_scan_threshold_t threshold; /**< When scan_method is set to WIFI_FAST_SCAN, only APs which have an auth mode that is more secure than the selected auth mode and a signal stronger than the minimum RSSI will be used. */ + wifi_scan_threshold_t threshold; /**< When scan_method is set, only APs which have an auth mode that is more secure than the selected auth mode and a signal stronger than the minimum RSSI will be used. */ } wifi_sta_config_t; /** @brief Configuration data for ESP32 AP or STA. diff --git a/components/esp32/lib b/components/esp32/lib index 66d20f0a5..69ef74a88 160000 --- a/components/esp32/lib +++ b/components/esp32/lib @@ -1 +1 @@ -Subproject commit 66d20f0a5e2b103e535c4ad2a737b7f11c90ed4d +Subproject commit 69ef74a88d256f1687d6d72cb3e64ebc79a73cb1