mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
fix(openthread): Use the existing dataset for autostart
This commit is contained in:
parent
57c6c0a1a3
commit
90518676b1
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user