reduce the max connection number to 15

This commit is contained in:
jack 2022-12-07 18:03:57 +08:00
parent e943143e0f
commit 43f93678ce
4 changed files with 20 additions and 9 deletions

View File

@ -374,10 +374,9 @@ menu "Wi-Fi"
config ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM
int "Maximum espnow encrypt peers number"
range 0 4 if IDF_TARGET_ESP32C2
range 0 16 if (!IDF_TARGET_ESP32C2)
default 2 if IDF_TARGET_ESP32C2
default 6 if !IDF_TARGET_ESP32C2
range 0 10 if IDF_TARGET_ESP32C3
range 0 15 if (!IDF_TARGET_ESP32C3)
default 6
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

View File

@ -306,7 +306,11 @@ typedef struct {
uint32_t reserved:27; /**< bit: 5..31 reserved */
} wifi_sta_info_t;
#define ESP_WIFI_MAX_CONN_NUM (16) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2/ESP32C3 soft-AP */
#if CONFIG_IDF_TARGET_ESP32C3
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */
#else
#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */
#endif
/** @brief List of stations associated with the ESP32 Soft-AP */
typedef struct {

View File

@ -66,9 +66,13 @@ Add Paired Device
Call :cpp:func:`esp_now_add_peer()` to add the device to the paired device list before you send data to this device. If security is enabled, the LMK must be set. You can send ESP-NOW data via both the Station and the SoftAP interface. Make sure that the interface is enabled before sending ESP-NOW data.
.. only:: esp32 or esp32s2 or esp32s3 or esp32c3
.. only:: esp32c3
The maximum number of paired devices is 20, and the paired encryption devices are no more than 16, 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 10, 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.
.. 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.
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.

View File

@ -66,9 +66,13 @@ ESP-NOW 采用 CCMP 方法保护供应商特定动作帧的安全,具体可参
在将数据发送到其他设备之前,请先调用 :cpp:func:`esp_now_add_peer()` 将其添加到配对设备列表中。如果启用了加密,则必须设置 LMK。ESP-NOW 数据可以从 Station 或 Softap 接口发送。确保在发送 ESP-NOW 数据之前已启用该接口。
.. only:: esp32 or esp32s2 or esp32s3 or esp32c3
.. only:: esp32c3
配对设备的最大数量是 20其中加密设备的数量不超过 16默认值是 6。如果想要修改加密设备的数量在 WiFi menuconfig 设置 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`
配对设备的最大数量是 20其中加密设备的数量不超过 10默认值是 6。如果想要修改加密设备的数量在 WiFi menuconfig 设置 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`
.. only:: esp32 or esp32s2 or esp32s3
配对设备的最大数量是 20其中加密设备的数量不超过 15默认值是 6。如果想要修改加密设备的数量在 WiFi menuconfig 设置 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`
在发送广播数据之前必须添加具有广播 MAC 地址的设备。配对设备的信道范围是从 0 14。如果信道设置为 0数据将在当前信道上发送。否则必须使用本地设备所在的通道。