Merge branch 'backport/openthread_feature_to_v51' into 'release/v5.1'

Openthread: backport some features

See merge request espressif/esp-idf!25113
This commit is contained in:
Jiang Jiang Jian
2023-08-02 10:47:32 +08:00
3 changed files with 14 additions and 2 deletions

View File

@ -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
*

View File

@ -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();