mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
Modify maximum softap conn num and espnow encryption peer num
This commit is contained in:
@ -372,4 +372,19 @@ menu "Wi-Fi"
|
|||||||
Delta timeout time for rf phy off, When the beacon is lost, the next rf phy off will
|
Delta timeout time for rf phy off, When the beacon is lost, the next rf phy off will
|
||||||
be delayed for the time specified by the configuration item. Unit: 1024 microsecond.
|
be delayed for the time specified by the configuration item. Unit: 1024 microsecond.
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
hardware keys. So this configuration will affect the maximum connection number of SoftAP.
|
||||||
|
Maximum espnow encrypted peers number + maximum number of connections of SoftAP = Max hardware keys number.
|
||||||
|
|
||||||
|
When using ESP mesh, this value should be set to a maximum of 6.
|
||||||
|
|
||||||
|
|
||||||
endmenu # Wi-Fi
|
endmenu # Wi-Fi
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// You may obtain a copy of the License at
|
*/
|
||||||
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
#ifndef __ESP_MESH_INTERNAL_H__
|
#ifndef __ESP_MESH_INTERNAL_H__
|
||||||
#define __ESP_MESH_INTERNAL_H__
|
#define __ESP_MESH_INTERNAL_H__
|
||||||
@ -107,6 +99,9 @@ typedef struct {
|
|||||||
mesh_chain_layer_t chain;
|
mesh_chain_layer_t chain;
|
||||||
} __attribute__((packed)) mesh_chain_assoc_t;
|
} __attribute__((packed)) mesh_chain_assoc_t;
|
||||||
|
|
||||||
|
/* mesh max connections */
|
||||||
|
#define MESH_MAX_CONNECTIONS (10)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mesh PS duties
|
* @brief Mesh PS duties
|
||||||
*/
|
*/
|
||||||
@ -117,7 +112,7 @@ typedef struct {
|
|||||||
bool used;
|
bool used;
|
||||||
uint8_t duty;
|
uint8_t duty;
|
||||||
uint8_t mac[6];
|
uint8_t mac[6];
|
||||||
} child[ESP_WIFI_MAX_CONN_NUM];
|
} child[MESH_MAX_CONNECTIONS];
|
||||||
} esp_mesh_ps_duties_t;
|
} esp_mesh_ps_duties_t;
|
||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
|
@ -108,6 +108,7 @@ typedef struct {
|
|||||||
int mgmt_sbuf_num; /**< WiFi management short buffer number, the minimum value is 6, the maximum value is 32 */
|
int mgmt_sbuf_num; /**< WiFi management short buffer number, the minimum value is 6, the maximum value is 32 */
|
||||||
uint64_t feature_caps; /**< Enables additional WiFi features and capabilities */
|
uint64_t feature_caps; /**< Enables additional WiFi features and capabilities */
|
||||||
bool sta_disconnected_pm; /**< WiFi Power Management for station at disconnected status */
|
bool sta_disconnected_pm; /**< WiFi Power Management for station at disconnected status */
|
||||||
|
int espnow_max_encrypt_num; /**< Maximum encrypt number of peers supported by espnow */
|
||||||
int magic; /**< WiFi init magic number, it should be the last field */
|
int magic; /**< WiFi init magic number, it should be the last field */
|
||||||
} wifi_init_config_t;
|
} wifi_init_config_t;
|
||||||
|
|
||||||
@ -227,6 +228,7 @@ extern uint64_t g_wifi_feature_caps;
|
|||||||
.mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \
|
.mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \
|
||||||
.feature_caps = g_wifi_feature_caps, \
|
.feature_caps = g_wifi_feature_caps, \
|
||||||
.sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \
|
.sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \
|
||||||
|
.espnow_max_encrypt_num = CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM, \
|
||||||
.magic = WIFI_INIT_CONFIG_MAGIC\
|
.magic = WIFI_INIT_CONFIG_MAGIC\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ typedef struct {
|
|||||||
uint32_t reserved:27; /**< bit: 5..31 reserved */
|
uint32_t reserved:27; /**< bit: 5..31 reserved */
|
||||||
} wifi_sta_info_t;
|
} wifi_sta_info_t;
|
||||||
|
|
||||||
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32 soft-AP */
|
#define ESP_WIFI_MAX_CONN_NUM (16) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2/ESP32C3 soft-AP */
|
||||||
|
|
||||||
/** @brief List of stations associated with the ESP32 Soft-AP */
|
/** @brief List of stations associated with the ESP32 Soft-AP */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Reference in New Issue
Block a user