diff --git a/components/openthread/lib b/components/openthread/lib index 785e946222..c9c17a0b66 160000 --- a/components/openthread/lib +++ b/components/openthread/lib @@ -1 +1 @@ -Subproject commit 785e946222f6c6ab453d7d47c15c551d4a181f79 +Subproject commit c9c17a0b6634af016111c9817f0be1fe0e7112f6 diff --git a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h index 30dbe362ae..14479dac73 100644 --- a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h @@ -123,6 +123,16 @@ #define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 1 #endif +/** + * @def OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE + * + * Define to 1 to enable Border Agent ID support. + * + */ +#ifndef OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE +#define OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE 1 +#endif + /** * @def OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE * diff --git a/examples/openthread/ot_br/main/esp_ot_br.c b/examples/openthread/ot_br/main/esp_ot_br.c index 249ea27654..7ad9f7a6bd 100644 --- a/examples/openthread/ot_br/main/esp_ot_br.c +++ b/examples/openthread/ot_br/main/esp_ot_br.c @@ -71,7 +71,9 @@ static void ot_task_worker(void *aContext) #if CONFIG_OPENTHREAD_BR_AUTO_START ESP_ERROR_CHECK(esp_openthread_border_router_init()); - ESP_ERROR_CHECK(esp_openthread_auto_start(NULL)); + otOperationalDatasetTlvs dataset; + otError error = otDatasetGetActiveTlvs(esp_openthread_get_instance(), &dataset); + ESP_ERROR_CHECK(esp_openthread_auto_start((error == OT_ERROR_NONE) ? &dataset : NULL)); #endif // CONFIG_OPENTHREAD_BR_AUTO_START esp_cli_custom_command_init();