Skip to content

Commit

Permalink
Merge branch 'bugfix/use_default_dataset_if_exist' into 'main'
Browse files Browse the repository at this point in the history
fix(openthread): Use the existing dataset for autostart

See merge request espressif/esp-thread-br!69
  • Loading branch information
chshu committed Jul 25, 2023
2 parents 2d30afc + aa6e6ca commit 7fd29e7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ static void ot_task_worker(void *ctx)
esp_cli_custom_command_init();
#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_openthread_lock_release();

Expand Down

0 comments on commit 7fd29e7

Please sign in to comment.