Merge branch 'feat/merge_ot_autostart_v5.3' into 'release/v5.3'

feat(openthread): optimized the autostart macro (v5.3)

See merge request espressif/esp-idf!48276
This commit is contained in:
Zhang Wen Xu
2026-05-08 08:46:09 +00:00
5 changed files with 7 additions and 21 deletions

View File

@@ -125,16 +125,13 @@ void app_main(void)
#if CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
esp_cli_custom_command_init();
#endif
#if CONFIG_OPENTHREAD_BORDER_ROUTER_AUTO_START
#if CONFIG_OPENTHREAD_STATE_INDICATOR_ENABLE
ESP_ERROR_CHECK(esp_openthread_state_indicator_init(esp_openthread_get_instance()));
#endif
#if CONFIG_OPENTHREAD_BORDER_ROUTER && CONFIG_OPENTHREAD_NETWORK_AUTO_START
ESP_ERROR_CHECK(esp_openthread_border_router_start());
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE && CONFIG_SOC_IEEE802154_SUPPORTED
ESP_ERROR_CHECK(esp_coex_wifi_i154_enable());
#endif
#endif
#if CONFIG_OPENTHREAD_STATE_INDICATOR_ENABLE
ESP_ERROR_CHECK(esp_openthread_state_indicator_init(esp_openthread_get_instance()));
#endif
#if CONFIG_OPENTHREAD_NETWORK_AUTO_START
ot_network_auto_start();
#endif
}

View File

@@ -0,0 +1,2 @@
CONFIG_OPENTHREAD_NETWORK_AUTO_START=y
CONFIG_OPENTHREAD_CLI_WIFI=n

View File

@@ -1,6 +1,5 @@
# Enable BR auto start for Ethernet builds
CONFIG_OPENTHREAD_NETWORK_AUTO_START=y
CONFIG_OPENTHREAD_BORDER_ROUTER_AUTO_START=y
# Enable PPP support as a workaround to ensure LWIP thread-lib compatibility for Ethernet builds
CONFIG_LWIP_PPP_SUPPORT=y

View File

@@ -1,6 +1,6 @@
set(srcs "")
if(CONFIG_OPENTHREAD_BORDER_ROUTER_AUTO_START)
if(CONFIG_OPENTHREAD_BORDER_ROUTER AND CONFIG_OPENTHREAD_NETWORK_AUTO_START)
list(APPEND srcs "ot_examples_br.c")
endif()

View File

@@ -1,12 +0,0 @@
menu "OpenThread Border Router Config"
depends on OPENTHREAD_BORDER_ROUTER
config OPENTHREAD_BORDER_ROUTER_AUTO_START
depends on OPENTHREAD_BORDER_ROUTER
bool 'Enable the border router auto start'
default n
help
If enabled, the program will automatically connect to the backbone network and
initialize the border router at startup.
endmenu