|
|
@@ -3,6 +3,10 @@ Wi-Fi Driver
|
|
|
|
|
|
:link_to_translation:`zh_CN:[中文]`
|
|
|
|
|
|
+{IDF_TARGET_MAX_CONN_STA_NUM:default="15", esp32c2="4", esp32c3="10", esp32c6="10"}
|
|
|
+
|
|
|
+{IDF_TARGET_SUB_MAX_NUM_FROM_KEYS:default="2", esp32c3="7", esp32c6="7"}
|
|
|
+
|
|
|
{IDF_TARGET_NAME} Wi-Fi Feature List
|
|
|
------------------------------------
|
|
|
The following features are supported:
|
|
|
@@ -1282,33 +1286,7 @@ AP Basic Configuration
|
|
|
|
|
|
API :cpp:func:`esp_wifi_set_config()` can be used to configure the AP. And the configuration will be stored in NVS. The table below describes the fields in detail.
|
|
|
|
|
|
-.. only:: esp32 or esp32s2 or esp32s3
|
|
|
-
|
|
|
- .. list-table::
|
|
|
- :header-rows: 1
|
|
|
- :widths: 15 55
|
|
|
-
|
|
|
- * - Field
|
|
|
- - Description
|
|
|
- * - ssid
|
|
|
- - SSID of AP; if the ssid[0] is 0xFF and ssid[1] is 0xFF, the AP defaults the SSID to ESP_aabbcc, where “aabbcc” is the last three bytes of the AP MAC.
|
|
|
- * - password
|
|
|
- - Password of AP; if the auth mode is WIFI_AUTH_OPEN, this field will be ignored.
|
|
|
- * - ssid_len
|
|
|
- - Length of SSID; if ssid_len is 0, check the SSID until there is a termination character. If ssid_len > 32, change it to 32; otherwise, set the SSID length according to ssid_len.
|
|
|
- * - channel
|
|
|
- - Channel of AP; if the channel is out of range, the Wi-Fi driver defaults to channel 1. So, please make sure the channel is within the required range. For more details, refer to `Wi-Fi Country Code`_.
|
|
|
- * - authmode
|
|
|
- - Auth mode of ESP AP; currently, ESP AP does not support AUTH_WEP. If the authmode is an invalid value, AP defaults the value to WIFI_AUTH_OPEN.
|
|
|
- * - ssid_hidden
|
|
|
- - If ssid_hidden is 1, AP does not broadcast the SSID; otherwise, it does broadcast the SSID.
|
|
|
- * - max_connection
|
|
|
- - The max number of stations allowed to connect in, the default value is 10. ESP Wi-Fi supports up to 15 (ESP_WIFI_MAX_CONN_NUM) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is 17, if :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` <= 2, the max_connection can be set up to 15, otherwise the max_connection can be set up to (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
|
|
- * - beacon_interval
|
|
|
- - Beacon interval; the value is 100 ~ 60000 ms, with default value being 100 ms. If the value is out of range, AP defaults it to 100 ms.
|
|
|
-
|
|
|
-
|
|
|
-.. only:: esp32c3 or esp32c6
|
|
|
+.. only:: esp32 or esp32s2 or esp32s3 or esp32c3 or esp32c6
|
|
|
|
|
|
.. list-table::
|
|
|
:header-rows: 1
|
|
|
@@ -1329,7 +1307,7 @@ API :cpp:func:`esp_wifi_set_config()` can be used to configure the AP. And the c
|
|
|
* - ssid_hidden
|
|
|
- If ssid_hidden is 1, AP does not broadcast the SSID; otherwise, it does broadcast the SSID.
|
|
|
* - max_connection
|
|
|
- - The max number of stations allowed to connect in, the default value is 10. ESP Wi-Fi supports up to 10 (ESP_WIFI_MAX_CONN_NUM) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is 17, if :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` <= 7, the max_connection can be set up to 10, otherwise the max_connection can be set up to (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
|
|
+ - The max number of stations allowed to connect in, the default value is 10. ESP Wi-Fi supports up to {IDF_TARGET_MAX_CONN_STA_NUM} (ESP_WIFI_MAX_CONN_NUM) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is 17, if :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` <= {IDF_TARGET_SUB_MAX_NUM_FROM_KEYS}, the max_connection can be set up to {IDF_TARGET_MAX_CONN_STA_NUM}, otherwise the max_connection can be set up to (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
|
|
* - beacon_interval
|
|
|
- Beacon interval; the value is 100 ~ 60000 ms, with default value being 100 ms. If the value is out of range, AP defaults it to 100 ms.
|
|
|
|
|
|
@@ -1355,7 +1333,7 @@ API :cpp:func:`esp_wifi_set_config()` can be used to configure the AP. And the c
|
|
|
* - ssid_hidden
|
|
|
- If ssid_hidden is 1, AP does not broadcast the SSID; otherwise, it does broadcast the SSID.
|
|
|
* - max_connection
|
|
|
- - The max number of stations allowed to connect in, the default value is 2. ESP Wi-Fi supports up to 4 (ESP_WIFI_MAX_CONN_NUM) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is 4, the max_connection can be set up to (4 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
|
|
+ - The max number of stations allowed to connect in, the default value is 2. ESP Wi-Fi supports up to {IDF_TARGET_MAX_CONN_STA_NUM} (ESP_WIFI_MAX_CONN_NUM) Wi-Fi connections. Please note that ESP AP and ESP-NOW share the same encryption hardware keys, so the max_connection parameter will be affected by the :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`. The total number of encryption hardware keys is {IDF_TARGET_MAX_CONN_STA_NUM}, the max_connection can be set up to ({IDF_TARGET_MAX_CONN_STA_NUM} - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`).
|
|
|
* - beacon_interval
|
|
|
- Beacon interval; the value is 100 ~ 60000 ms, with default value being 100 ms. If the value is out of range, AP defaults it to 100 ms.
|
|
|
|
|
|
@@ -1473,7 +1451,7 @@ Currently, the ESP-IDF supports the following protocol modes:
|
|
|
+-------+-----+----+---+-------+------+-----+----+
|
|
|
| LR | - | - | - | LR | LR | LR | LR |
|
|
|
+-------+-----+----+---+-------+------+-----+----+
|
|
|
-
|
|
|
+
|
|
|
.. only:: esp32c6
|
|
|
|
|
|
+---------+-------+-----+----+---+---------+-------+------+-----+----+
|
|
|
@@ -2176,7 +2154,7 @@ Generally, following steps can be taken to configure the multiple antennas:
|
|
|
.gpio_cfg[0] = { .gpio_select = 1, .gpio_num = 20 },
|
|
|
.gpio_cfg[1] = { .gpio_select = 1, .gpio_num = 21 }
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
- Configure which antennas are enabled and how RX/TX use the enabled antennas. For example, if antenna1 and antenna3 are enabled, the RX needs to select the better antenna automatically and uses antenna1 as its default antenna, the TX always selects the antenna3. The configuration looks like::
|
|
|
|
|
|
wifi_ant_config_t config = {
|