From 98dfb8c0b978494827f133636dc8a3fc406c3170 Mon Sep 17 00:00:00 2001 From: XiaXiaotian Date: Tue, 19 Sep 2017 20:17:25 +0800 Subject: [PATCH] Record more information of scanned AP --- components/esp32/include/esp_wifi_types.h | 20 ++++++++++++++++++-- components/esp32/lib | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/components/esp32/include/esp_wifi_types.h b/components/esp32/include/esp_wifi_types.h index a37b1b707..aaa007150 100755 --- a/components/esp32/include/esp_wifi_types.h +++ b/components/esp32/include/esp_wifi_types.h @@ -121,6 +121,16 @@ typedef struct { wifi_scan_time_t scan_time; /**< scan time per channel */ } wifi_scan_config_t; +typedef enum { + WIFI_CIPHER_TYPE_NONE = 0, /**< the cipher type is none */ + WIFI_CIPHER_TYPE_WEP40, /**< the cipher type is WEP40 */ + WIFI_CIPHER_TYPE_WEP104, /**< the cipher type is WEP104 */ + WIFI_CIPHER_TYPE_TKIP, /**< the cipher type is TKIP */ + WIFI_CIPHER_TYPE_CCMP, /**< the cipher type is CCMP */ + WIFI_CIPHER_TYPE_TKIP_CCMP, /**< the cipher type is TKIP and CCMP */ + WIFI_CIPHER_TYPE_UNKNOWN, /**< the cipher type is unknown */ +} wifi_cipher_type_t; + typedef struct { uint8_t bssid[6]; /**< MAC address of AP */ uint8_t ssid[33]; /**< SSID of AP */ @@ -128,8 +138,14 @@ typedef struct { wifi_second_chan_t second; /**< second channel of AP */ int8_t rssi; /**< signal strength of AP */ wifi_auth_mode_t authmode; /**< authmode of AP */ - uint32_t low_rate_enable:1; /**< bit: 0 flag to identify if low rate is enabled or not */ - uint32_t reserved:31; /**< bit: 1..31 reserved */ + wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of AP */ + wifi_cipher_type_t group_cipher; /**< group cipher of AP */ + uint32_t phy_11b:1; /**< bit: 0 flag to identify if 11b mode is enabled or not */ + uint32_t phy_11g:1; /**< bit: 1 flag to identify if 11g mode is enabled or not */ + uint32_t phy_11n:1; /**< bit: 2 flag to identify if 11n mode is enabled or not */ + uint32_t phy_lr:1; /**< bit: 3 flag to identify if low rate is enabled or not */ + uint32_t wps:1; /**< bit: 4 flag to identify if WPS is supported or not */ + uint32_t reserved:27; /**< bit: 5..31 reserved */ } wifi_ap_record_t; typedef enum { diff --git a/components/esp32/lib b/components/esp32/lib index 1a06dd167..c71367fb5 160000 --- a/components/esp32/lib +++ b/components/esp32/lib @@ -1 +1 @@ -Subproject commit 1a06dd1671e386d75f98844c454c8a86e5b71c1b +Subproject commit c71367fb572b7710ce7950999ec5e67af57a105c