@@ -40,11 +40,15 @@ typedef esp_interface_t wifi_interface_t;
40
40
#define WIFI_IF_AP ESP_IF_WIFI_AP
41
41
42
42
typedef enum {
43
- WIFI_COUNTRY_CN = 0 , /**< country China, channel range [1, 14] */
44
- WIFI_COUNTRY_JP , /**< country Japan, channel range [1, 14] */
45
- WIFI_COUNTRY_US , /**< country USA, channel range [1, 11] */
46
- WIFI_COUNTRY_EU , /**< country Europe, channel range [1, 13] */
47
- WIFI_COUNTRY_MAX
43
+ WIFI_COUNTRY_POLICY_AUTO , /**< Country policy is auto, use the country info of AP to which the station is connected */
44
+ WIFI_COUNTRY_POLICY_MANUAL , /**< Country policy is manual, always use the configured country info */
45
+ } wifi_country_policy_t ;
46
+
47
+ typedef struct {
48
+ char cc [3 ]; /**< country code string */
49
+ uint8_t schan ; /**< start channel */
50
+ uint8_t nchan ; /**< total channel number */
51
+ wifi_country_policy_t policy ; /**< country policy */
48
52
} wifi_country_t ;
49
53
50
54
typedef enum {
@@ -121,15 +125,31 @@ typedef struct {
121
125
wifi_scan_time_t scan_time ; /**< scan time per channel */
122
126
} wifi_scan_config_t ;
123
127
128
+ typedef enum {
129
+ WIFI_CIPHER_TYPE_NONE = 0 , /**< the cipher type is none */
130
+ WIFI_CIPHER_TYPE_WEP40 , /**< the cipher type is WEP40 */
131
+ WIFI_CIPHER_TYPE_WEP104 , /**< the cipher type is WEP104 */
132
+ WIFI_CIPHER_TYPE_TKIP , /**< the cipher type is TKIP */
133
+ WIFI_CIPHER_TYPE_CCMP , /**< the cipher type is CCMP */
134
+ WIFI_CIPHER_TYPE_TKIP_CCMP , /**< the cipher type is TKIP and CCMP */
135
+ WIFI_CIPHER_TYPE_UNKNOWN , /**< the cipher type is unknown */
136
+ } wifi_cipher_type_t ;
137
+
124
138
typedef struct {
125
139
uint8_t bssid [6 ]; /**< MAC address of AP */
126
140
uint8_t ssid [33 ]; /**< SSID of AP */
127
141
uint8_t primary ; /**< channel of AP */
128
142
wifi_second_chan_t second ; /**< second channel of AP */
129
143
int8_t rssi ; /**< signal strength of AP */
130
144
wifi_auth_mode_t authmode ; /**< authmode of AP */
131
- uint32_t low_rate_enable :1 ; /**< bit: 0 flag to identify if low rate is enabled or not */
132
- uint32_t reserved :31 ; /**< bit: 1..31 reserved */
145
+ wifi_cipher_type_t pairwise_cipher ; /**< pairwise cipher of AP */
146
+ wifi_cipher_type_t group_cipher ; /**< group cipher of AP */
147
+ uint32_t phy_11b :1 ; /**< bit: 0 flag to identify if 11b mode is enabled or not */
148
+ uint32_t phy_11g :1 ; /**< bit: 1 flag to identify if 11g mode is enabled or not */
149
+ uint32_t phy_11n :1 ; /**< bit: 2 flag to identify if 11n mode is enabled or not */
150
+ uint32_t phy_lr :1 ; /**< bit: 3 flag to identify if low rate is enabled or not */
151
+ uint32_t wps :1 ; /**< bit: 4 flag to identify if WPS is supported or not */
152
+ uint32_t reserved :27 ; /**< bit: 5..31 reserved */
133
153
} wifi_ap_record_t ;
134
154
135
155
typedef enum {
0 commit comments