Merge branch 'bugfix/fix_max_conn_num_issue_v4.4' into 'release/v4.4'

esp_wifi: change max connection num on ESP32C3 and ESP32S3 (Backport v4.4)

See merge request espressif/esp-idf!21753
pull/11369/head
Jiang Jiang Jian 2022-12-22 15:36:02 +08:00
commit 78e9a38ef4
7 zmienionych plików z 108 dodań i 72 usunięć

Wyświetl plik

@ -374,9 +374,8 @@ menu "Wi-Fi"
config ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM
int "Maximum espnow encrypt peers number"
range 0 10 if IDF_TARGET_ESP32C3
range 0 15 if (!IDF_TARGET_ESP32C3)
default 6
range 0 17
default 7
help
Maximum number of encrypted peers supported by espnow.
The number of hardware keys for encryption is fixed. And the espnow and SoftAP share the same

Wyświetl plik

@ -256,7 +256,7 @@ typedef struct {
uint8_t channel; /**< Channel of ESP32 soft-AP */
wifi_auth_mode_t authmode; /**< Auth mode of ESP32 soft-AP. Do not support AUTH_WEP in soft-AP mode */
uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */
uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 10 */
uint8_t max_connection; /**< Max number of stations allowed to connect in */
uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */
wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of SoftAP, group cipher will be derived using this. cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */
bool ftm_responder; /**< Enable FTM Responder mode */

@ -1 +1 @@
Subproject commit b96f9b7f010615a185447785985b96f6013d66c4
Subproject commit 5e2174edbdff2a835f25e0365211e97b872c03b5

Wyświetl plik

@ -1314,45 +1314,57 @@ 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.
+------------------+--------------------------------------------------------------+
| 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 the channel 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 Wi-Fi 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 | Currently, ESP Wi-Fi supports up to 10 Wi-Fi connections. |
| | If max_connection > 10, AP defaults the value to 10. |
| | |
+------------------+--------------------------------------------------------------+
| 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:: 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 the channel 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, default value is 10. Currently, 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 num 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
.. 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 the channel 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, default value is 10. Currently, 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 num 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`).
* - 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.
Wi-Fi Protocol Mode
+++++++++++++++++++++++++

Wyświetl plik

@ -72,7 +72,7 @@ Call :cpp:func:`esp_now_add_peer()` to add the device to the paired device list
.. only:: esp32 or esp32s2 or esp32s3
The maximum number of paired devices is 20, and the paired encryption devices are no more than 15, the default is 6. If you want to change the number of paired encryption devices, set :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` in WiFi component configuration menu.
The maximum number of paired devices is 20, and the paired encryption devices are no more than 17, the default is 7. If you want to change the number of paired encryption devices, set :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` in WiFi component configuration menu.
A device with a broadcast MAC address must be added before sending broadcast data. The range of the channel of paired devices is from 0 to 14. If the channel is set to 0, data will be sent on the current channel. Otherwise, the channel must be set as the channel that the local device is on.

Wyświetl plik

@ -1256,32 +1256,57 @@ AP 基本配置
API :cpp:func:`esp_wifi_set_config()` 可用于配置 AP。配置的参数信息会保存到 NVS 中。下表详细介绍了各个字段。
+-----------------+----------------------------------------------------------------------------------+
| 字段 | 描述 |
+-----------------+----------------------------------------------------------------------------------+
| ssid | 指 AP的 SSID。如果 ssid[0] 和 ssid[1] 均为 0xFFAP |
| | 默认 SSID 为 ESP_aabbcc"aabbcc" 是 AP MAC 的最后三个字节。 |
+-----------------+----------------------------------------------------------------------------------+
| password | AP 的密码。如果身份验证模式为 WIFI_AUTH_OPEN此字段将被忽略。 |
+-----------------+----------------------------------------------------------------------------------+
| ssid_len | SSID 的长度。如果 ssid_len 为 0则检查 SSID 直至出现终止字符。如果 |
| | ssid_len 大于 32请更改为 32或者根据 ssid_len 设置 SSID 长度。 |
+-----------------+----------------------------------------------------------------------------------+
| channel | AP 的信道。如果信道超出范围Wi-Fi 驱动程序将默认该信道为信道 |
| | 1。所以请确保信道在要求的范围内。有关详细信息请参阅 `Wi-Fi 国家/地区代码`_。 |
+-----------------+----------------------------------------------------------------------------------+
| authmode | ESP AP 的身份验证模式。目前ESP Wi-Fi 不支持 |
| | AUTH_WEP。如果 authmode 是一个无效值AP |
| | 默认该值为 WIFI_AUTH_OPEN。 |
+-----------------+----------------------------------------------------------------------------------+
| ssid_hidden | 如果 ssid_hidden 为 1AP 不广播 SSID。若为其他值则广播。 |
+-----------------+----------------------------------------------------------------------------------+
| max_connection | 目前ESP Wi-Fi 支持 10 个 Wi-Fi 连接。如果 |
| | max_connection 大于 10AP 默认该值为 10。 |
+-----------------+----------------------------------------------------------------------------------+
| beacon_interval | beacon 间隔。值为 100 ~ 60000 ms默认值为 100 |
| | ms。如果该值不在上述范围AP 默认取 100 ms。 |
+-----------------+----------------------------------------------------------------------------------+
.. only:: esp32 or esp32s2 or esp32s3
.. list-table::
:header-rows: 1
:widths: 15 55
* - 字段
- 描述
* - ssid
- 指 AP 的 SSID。如果 ssid[0] 和 ssid[1] 均为 0xFFAP 默认 SSID 为 ESP_aabbcc”aabbcc” 是 AP MAC 的最后三个字节。
* - password
- AP 的密码。如果身份验证模式为 WIFI_AUTH_OPEN此字段将被忽略。
* - ssid_len
- SSID 的长度。如果 ssid_len 为 0则检查 SSID 直至出现终止字符。如果 ssid_len 大于 32请更改为 32或者根据 ssid_len 设置 SSID 长度。
* - channel
- AP 的信道。如果信道超出范围Wi-Fi 驱动程序将默认该信道为信道 1。所以请确保信道在要求的范围内。有关详细信息请参阅 `Wi-Fi 国家/地区代码`_
* - authmode
- ESP AP 的身份验证模式。目前ESP AP 不支持 AUTH_WEP。如果 authmode 是一个无效值AP 默认该值为 WIFI_AUTH_OPEN。
* - ssid_hidden
- 如果 ssid_hidden 为 1AP 不广播 SSID。若为其他值则广播。
* - max_connection
- 允许连接 station 的最大数目,默认值是 10。目前ESP Wi-Fi 支持 15 (ESP_WIFI_MAX_CONN_NUM) 个 Wi-Fi 连接。请注意, ESP AP 和 ESP-NOW 共享同一块加密硬件 keys因此 max_connection 参数将受到 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 的影响。加密硬件 keys 的总数是 17如果 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 小于等于 2那么 max_connection 最大可以设置为 15否则 max_connection 最大可以设置为 (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`)。
* - beacon_interval
- beacon 间隔。值为 100 ~ 60000 ms默认值为 100 ms。如果该值不在上述范围AP 默认取 100 ms。
.. only:: esp32c3
.. list-table::
:header-rows: 1
:widths: 15 55
* - 字段
- 描述
* - ssid
- 指 AP 的 SSID。如果 ssid[0] 和 ssid[1] 均为 0xFFAP 默认 SSID 为 ESP_aabbcc”aabbcc” 是 AP MAC 的最后三个字节。
* - password
- AP 的密码。如果身份验证模式为 WIFI_AUTH_OPEN此字段将被忽略。
* - ssid_len
- SSID 的长度。如果 ssid_len 为 0则检查 SSID 直至出现终止字符。如果 ssid_len 大于 32请更改为 32或者根据 ssid_len 设置 SSID 长度。
* - channel
- AP 的信道。如果信道超出范围Wi-Fi 驱动程序将默认该信道为信道 1。所以请确保信道在要求的范围内。有关详细信息请参阅 `Wi-Fi 国家/地区代码`_
* - authmode
- ESP AP 的身份验证模式。目前ESP AP 不支持 AUTH_WEP。如果 authmode 是一个无效值AP 默认该值为 WIFI_AUTH_OPEN。
* - ssid_hidden
- 如果 ssid_hidden 为 1AP 不广播 SSID。若为其他值则广播。
* - max_connection
- 允许连接 station 的最大数目,默认值是 10。目前ESP Wi-Fi 支持 10 (ESP_WIFI_MAX_CONN_NUM) 个 Wi-Fi 连接。请注意, ESP AP 和 ESP-NOW 共享同一块加密硬件 keys因此 max_connection 参数将受到 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 的影响。加密硬件 keys 的总数是 17如果 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` 小于等于 7那么 max_connection 最大可以设置为 10否则 max_connection 最大可以设置为 (17 - :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`)。
* - beacon_interval
- beacon 间隔。值为 100 ~ 60000 ms默认值为 100 ms。如果该值不在上述范围AP 默认取 100 ms。
Wi-Fi 协议模式
+++++++++++++++++++++++++

Wyświetl plik

@ -72,7 +72,7 @@ ESP-NOW 采用 CCMP 方法保护供应商特定动作帧的安全,具体可参
.. only:: esp32 or esp32s2 or esp32s3
配对设备的最大数量是 20其中加密设备的数量不超过 15默认值是 6。如果想要修改加密设备的数量,在 WiFi menuconfig 设置 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`
配对设备的最大数量是 20其中加密设备的数量不超过 17默认值是 7。如果想要修改加密设备的数量,在 WiFi menuconfig 设置 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`
在发送广播数据之前必须添加具有广播 MAC 地址的设备。配对设备的信道范围是从 0 14。如果信道设置为 0数据将在当前信道上发送。否则必须使用本地设备所在的通道。