EasyManua.ls Logo

Espressif Systems ESP - Page 158

Default Icon
191 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4. Software framework
4.10.76 How do I set the country code for a Wi-Fi module ?
CHIP: ESP8266 | ESP32 | ESP32 | ESP32-C3
Please call esp_wi󰝘_set_country to set the country code.
4.10.77 When using ESP32 as a SoftAP and have it connected to an Iphone, a warning
prompts aslow security WPA/WPA2(TKIP) is not secure. If this is your wireless
LAN, please congure the router to use WPA2(AES) or WPA3 security type,
how to solve it?
IDF: release/v4.0 and above
You can refer to the following code snippet:
wifi_config_t wifi_config = {
.ap = {
.ssid = EXAMPLE_ESP_WIFI_SSID,
.ssid_len = strlen(EXAMPLE_ESP_WIFI_SSID),
.channel = EXAMPLE_ESP_WIFI_CHANNEL,
.password = EXAMPLE_ESP_WIFI_PASS,
.max_connection = EXAMPLE_MAX_STA_CONN,
.authmode = WIFI_AUTH_WPA2_PSK,
.pairwise_cipher = WIFI_CIPHER_TYPE_CCMP
},
};
WIFI_AUTH_WPA2_PSK is AES, also called CCMP. WIFI_AUTH_WPA_PSK is TKIP.
WIFI_AUTH_WPA_WPA2_PSK is TKIP+CCMP.
4.10.78 Since ESP32s Wi-Fi module only supports 2.4 GHz of bandwidth, can Wi-Fi
networking succeed when using a multi-frequency router with both 2.4 GHz and
5 GHz of bandwidth
Please set your router to multi-frequency mode (can support 2.4 GHz and 5 GHz for one Wi-Fi account), and
the ESP32 device can connect to Wi-Fi normally.
4.10.79 How to obtain the RSSI of the station connected when ESP32 is used in AP mode?
You can call API esp_wi󰝘_ap_get_sta_list, please refer to the following code snippet:
{
wifi_sta_list_t wifi_sta_list;
esp_wifi_ap_get_sta_list(&wifi_sta_list);
for (int i = 0; i < wifi_sta_list.num; i++) {
printf("mac address: %02x:%02x:%02x:%02x:%02x:%02x\t rssi:%d\n",wifi_
,sta_list.sta[i].mac[0], wifi_sta_list.sta[i].mac[1],wifi_sta_list.sta[i].
,mac[2],
wifi_sta_list.sta[i].mac[3],wifi_sta_list.sta[i].mac[4],wifi_
,sta_list.sta[i].mac[5],wifi_sta_list.sta[i].rssi);
}
}
Espressif Systems 141
Submit Document Feedback
Release master

Table of Contents