Merge branch 'support/openthread_custom_config' into 'master'

feat(openthread): Add some configuration for customer using

Closes TZ-68

See merge request espressif/esp-idf!25774
This commit is contained in:
Shu Chen 2023-09-26 15:20:24 +08:00
commit 5bced24b13
4 changed files with 105 additions and 6 deletions

View File

@ -177,6 +177,12 @@ menu "OpenThread"
commissioner in the Thread network. A commissioner checks the pre-shared key from a joining device with
the Thread commissioning protocol and shares the network parameter with the joining device upon success.
config OPENTHREAD_COMM_MAX_JOINER_ENTRIES
int "The size of max commissioning joiner entries"
depends on OPENTHREAD_COMMISSIONER
default 2
range 2 50
config OPENTHREAD_JOINER
bool "Enable Joiner"
depends on OPENTHREAD_ENABLED
@ -193,6 +199,14 @@ menu "OpenThread"
Select this option to enable SRP Client in OpenThread. This allows a device to register SRP services to SRP
Server.
config OPENTHREAD_SRP_CLIENT_MAX_SERVICES
int "Specifies number of service entries in the SRP client service pool"
depends on OPENTHREAD_SRP_CLIENT
default 5
range 2 20
help
Set the max buffer size of service entries in the SRP client service pool.
config OPENTHREAD_DNS_CLIENT
bool "Enable DNS Client"
depends on OPENTHREAD_ENABLED
@ -221,6 +235,24 @@ menu "OpenThread"
range 10 100 if !OPENTHREAD_PLATFORM_MSGPOOL_MANAGEMENT
range 10 8191 if OPENTHREAD_PLATFORM_MSGPOOL_MANAGEMENT
config OPENTHREAD_SPINEL_RX_FRAME_BUFFER_SIZE
int "The size of openthread spinel rx frame buffer"
depends on OPENTHREAD_ENABLED
default 1024
range 512 8192
config OPENTHREAD_MLE_MAX_CHILDREN
int "The size of max MLE children entries"
depends on OPENTHREAD_ENABLED
default 10
range 5 50
config OPENTHREAD_TMF_ADDR_CACHE_ENTRIES
int "The size of max TMF address cache entries"
depends on OPENTHREAD_ENABLED
default 20
range 5 50
config OPENTHREAD_DNS64_CLIENT
bool "Use dns64 client"
depends on OPENTHREAD_ENABLED && LWIP_IPV4
@ -264,6 +296,26 @@ menu "OpenThread"
help
Select this option to enable CSL feature
config OPENTHREAD_XTAL_ACCURACY
int "The accuracy of the XTAL"
default 130
help
The device's XTAL accuracy, in ppm.
config OPENTHREAD_CSL_ACCURACY
int "The current CSL rx/tx scheduling drift, in units of ± ppm"
depends on OPENTHREAD_CSL_ENABLE
default 1
help
The current accuracy of the clock used for scheduling CSL operations
config OPENTHREAD_CSL_UNCERTAIN
int "The CSL Uncertainty in units of 10 us."
depends on OPENTHREAD_CSL_ENABLE
default 1
help
The fixed uncertainty of the Device for scheduling CSL Transmissions in units of 10 microseconds.
config OPENTHREAD_CSL_DEBUG_ENABLE
bool "Enable CSL debug"
depends on OPENTHREAD_CSL_ENABLE

View File

@ -361,7 +361,7 @@
* `RadioSpinel` platform is used.
*
*/
#define OPENTHREAD_CONFIG_PLATFORM_RADIO_SPINEL_RX_FRAME_BUFFER_SIZE 1024
#define OPENTHREAD_CONFIG_PLATFORM_RADIO_SPINEL_RX_FRAME_BUFFER_SIZE CONFIG_OPENTHREAD_SPINEL_RX_FRAME_BUFFER_SIZE
/**
* @def OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
@ -381,6 +381,22 @@
*/
#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1
/**
* @def OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
*
* The maximum number of children.
*
*/
#define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN CONFIG_OPENTHREAD_MLE_MAX_CHILDREN
/**
* @def OPENTHREAD_CONFIG_TMF_ADDRESS_CACHE_ENTRIES
*
* The number of EID-to-RLOC cache entries.
*
*/
#define OPENTHREAD_CONFIG_TMF_ADDRESS_CACHE_ENTRIES CONFIG_OPENTHREAD_TMF_ADDR_CACHE_ENTRIES
#if CONFIG_OPENTHREAD_DUA_ENABLE
/**
* @def OPENTHREAD_CONFIG_DUA_ENABLE
@ -418,6 +434,14 @@
*/
#if CONFIG_OPENTHREAD_COMMISSIONER
#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 1
/**
* @def OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES
*
* The maximum number of Joiner entries maintained by the Commissioner
*
*/
#define OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES CONFIG_OPENTHREAD_COMM_MAX_JOINER_ENTRIES
#endif
#if CONFIG_OPENTHREAD_MACFILTER_ENABLE
@ -440,6 +464,16 @@
#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1
#endif
/**
* @def OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
*
* Specifies number of service entries in the SRP client service pool.
*
* This config is applicable only when `OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_ENABLE` is enabled.
*
*/
#define OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES CONFIG_OPENTHREAD_SRP_CLIENT_MAX_SERVICES
#endif
/**

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -232,6 +232,17 @@
#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1
#endif
/**
* @def OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
*
* Specifies number of service entries in the SRP client service pool.
*
* This config is applicable only when `OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_ENABLE` is enabled.
*
*/
#define OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES CONFIG_OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
#endif
/**

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -32,9 +32,11 @@
#include "utils/mac_frame.h"
#define ESP_RECEIVE_SENSITIVITY -120
#define ESP_OPENTHREAD_XTAL_ACCURACY 130
#define ESP_OPENTHREAD_CSL_ACCURACY 1
#define ESP_OPENTHREAD_CSL_UNCERTAIN 1
#define ESP_OPENTHREAD_XTAL_ACCURACY CONFIG_OPENTHREAD_XTAL_ACCURACY
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
#define ESP_OPENTHREAD_CSL_ACCURACY CONFIG_OPENTHREAD_CSL_ACCURACY
#define ESP_OPENTHREAD_CSL_UNCERTAIN CONFIG_OPENTHREAD_CSL_UNCERTAIN
#endif
#define EVENT_TX_DONE (1 << 0)
#define EVENT_TX_FAILED (1 << 1)