Skip to content

Commit de3b6ff

Browse files
committed
Merge branch 'feat/add_config_for_openthread' into 'master'
feat(openthread): add some configurations in Kconfig Closes TZ-1823 See merge request espressif/esp-idf!39609
2 parents 92883fb + 3c01fd8 commit de3b6ff

File tree

2 files changed

+71
-3
lines changed

2 files changed

+71
-3
lines changed

components/openthread/Kconfig

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ menu "OpenThread"
320320

321321
config OPENTHREAD_RX_ON_WHEN_IDLE
322322
bool "Enable OpenThread radio capability rx on when idle"
323-
default y if !ESP_COEX_SW_COEXIST_ENABLE
324-
default n if ESP_COEX_SW_COEXIST_ENABLE
323+
default y if !ESP_COEX_SW_COEXIST_ENABLE && !ESP_COEX_EXTERNAL_COEXIST_ENABLE
324+
default n if ESP_COEX_SW_COEXIST_ENABLE || ESP_COEX_EXTERNAL_COEXIST_ENABLE
325325
help
326326
Select this option to enable OpenThread radio capability rx on when idle.
327327
Do not support this feature when SW coexistence is enabled.
@@ -343,7 +343,7 @@ menu "OpenThread"
343343
RSS to its current parent every periodically and starts a parent search process if the average
344344
RSS is below OPENTHREAD_PARENT_SEARCH_RSS_THRESHOLD. This feature is always enabled for FTDs.
345345
menu "Parent Search Configurations"
346-
depends on OPENTHREAD_PARENT_SEARCH_MTD
346+
depends on OPENTHREAD_PARENT_SEARCH_MTD || OPENTHREAD_FTD
347347
config OPENTHREAD_PARENT_SEARCH_CHECK_INTERVAL_MINS
348348
int "The interval in minutes for a child to check the trigger condition to perform a parent search"
349349
default 9
@@ -353,6 +353,12 @@ menu "OpenThread"
353353
config OPENTHREAD_PARENT_SEARCH_RSS_THRESHOLD
354354
int "The RSS threshold used to trigger a parent search"
355355
default -65
356+
config OPENTHREAD_PARENT_SEARCH_RESELECT_TIMEOUT_MINS
357+
int "The parent reselect timeout duration in minutes used on FTD child devices"
358+
default 90
359+
config OPENTHREAD_PARENT_SEARCH_RSS_MARGIN
360+
int "The RSS margin over the current parent RSS used on FTD child devices"
361+
default 7
356362
endmenu
357363

358364
menu "Thread Memory Allocation"

components/openthread/private_include/openthread-core-esp32x-ftd-config.h

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,68 @@
382382
#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0
383383
#endif
384384

385+
/**
386+
* @def OPENTHREAD_CONFIG_PARENT_SEARCH_CHECK_INTERVAL
387+
*
388+
* Specifies the interval in seconds for a child to check the trigger condition to perform a parent search.
389+
*
390+
* Applicable only if periodic parent search feature is enabled (see `OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE`).
391+
*/
392+
#ifdef OPENTHREAD_CONFIG_PARENT_SEARCH_CHECK_INTERVAL
393+
#error `OPENTHREAD_CONFIG_PARENT_SEARCH_CHECK_INTERVAL` is redefined.
394+
#endif
395+
#define OPENTHREAD_CONFIG_PARENT_SEARCH_CHECK_INTERVAL CONFIG_OPENTHREAD_PARENT_SEARCH_CHECK_INTERVAL_MINS * 60
396+
397+
/**
398+
* @def OPENTHREAD_CONFIG_PARENT_SEARCH_BACKOFF_INTERVAL
399+
*
400+
* Specifies the backoff interval in seconds for a child to not perform a parent search after triggering one. This is
401+
* used when device is an MTD child.
402+
*
403+
* Applicable only if periodic parent search feature is enabled (see `OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE`).
404+
*/
405+
#ifdef OPENTHREAD_CONFIG_PARENT_SEARCH_BACKOFF_INTERVAL
406+
#error `OPENTHREAD_CONFIG_PARENT_SEARCH_BACKOFF_INTERVAL` is redefined.
407+
#endif
408+
#define OPENTHREAD_CONFIG_PARENT_SEARCH_BACKOFF_INTERVAL CONFIG_OPENTHREAD_PARENT_SEARCH_BACKOFF_INTERVAL_MINS * 60
409+
410+
/**
411+
* @def OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD
412+
*
413+
* Specifies the RSS threshold used to trigger a parent search.
414+
*
415+
* Applicable only if periodic parent search feature is enabled (see `OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE`).
416+
*/
417+
#ifdef OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD
418+
#error `OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD` is redefined.
419+
#endif
420+
#define OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD CONFIG_OPENTHREAD_PARENT_SEARCH_RSS_THRESHOLD
421+
422+
/**
423+
* @def OPENTHREAD_CONFIG_PARENT_SEARCH_RESELECT_TIMEOUT
424+
*
425+
* Specifies parent reselect timeout duration in seconds used on FTD child devices. When an attach attempt to a
426+
* neighboring router selected as a potential new parent fails, the same router cannot be selected again until this
427+
* timeout expires.
428+
*
429+
* Applicable only if periodic parent search feature is enabled (see `OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE`).
430+
*/
431+
#ifdef OPENTHREAD_CONFIG_PARENT_SEARCH_RESELECT_TIMEOUT
432+
#error `OPENTHREAD_CONFIG_PARENT_SEARCH_RESELECT_TIMEOUT` is redefined.
433+
#endif
434+
#define OPENTHREAD_CONFIG_PARENT_SEARCH_RESELECT_TIMEOUT CONFIG_OPENTHREAD_PARENT_SEARCH_RESELECT_TIMEOUT_MINS * 60
435+
436+
/**
437+
* @def OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_MARGIN
438+
*
439+
* Specifies the RSS margin over the current parent RSS for allowing selection of a neighboring router as a potential
440+
* new parent to attach to. Used on FTD child devices.
441+
*/
442+
#ifdef OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_MARGIN
443+
#error `OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_MARGIN` is redefined.
444+
#endif
445+
#define OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_MARGIN CONFIG_OPENTHREAD_PARENT_SEARCH_RSS_MARGIN
446+
385447
/*----The following options set fixed default values but can be overridden by the user header file.----*/
386448

387449
#if CONFIG_OPENTHREAD_BORDER_ROUTER

0 commit comments

Comments
 (0)