From c2681f00aa2babe775846016383b5bc9f8260582 Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Mon, 24 Jul 2023 19:50:58 +0800 Subject: [PATCH 1/3] fix(openthread): Use the existing dataset for autostart --- examples/openthread/ot_br/main/esp_ot_br.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); From 31212f284a2eed8ed894371dece82b5d2e4821c0 Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Tue, 18 Jul 2023 19:23:30 +0800 Subject: [PATCH 2/3] feat(openthread): enable openthread border agent id support --- components/openthread/lib | 2 +- .../openthread-core-esp32x-ftd-config.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/openthread/lib b/components/openthread/lib index 785e946222..8943a3f95e 160000 --- a/components/openthread/lib +++ b/components/openthread/lib @@ -1 +1 @@ -Subproject commit 785e946222f6c6ab453d7d47c15c551d4a181f79 +Subproject commit 8943a3f95e316b1cdbca8680addf0474651235db 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 * From 12f1c165e341516d9a45b02f2e5d6e061cc31c0f Mon Sep 17 00:00:00 2001 From: zhangwenxu Date: Mon, 31 Jul 2023 15:16:05 +0800 Subject: [PATCH 3/3] feat(thread): update openthread lib --- components/openthread/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/openthread/lib b/components/openthread/lib index 8943a3f95e..c9c17a0b66 160000 --- a/components/openthread/lib +++ b/components/openthread/lib @@ -1 +1 @@ -Subproject commit 8943a3f95e316b1cdbca8680addf0474651235db +Subproject commit c9c17a0b6634af016111c9817f0be1fe0e7112f6