Skip to content

Commit

Permalink
Merge branch 'tbr/fix_duplicate_initial' into 'master'
Browse files Browse the repository at this point in the history
thread_br: avoid duplicate initialization for border router and increase mqtt task stack size

Closes RMN-2001 and RMN-2047

See merge request app-frameworks/esp-rainmaker!479
  • Loading branch information
shahpiyushv committed Nov 5, 2024
2 parents b3357fe + 592c25f commit 6c28590
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ static void thread_br_event_handler(void* arg, esp_event_base_t event_base, int3
}
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED) {
esp_openthread_lock_acquire(portMAX_DELAY);
ESP_ERROR_CHECK(esp_openthread_border_router_init());
// Create link local address for Wi-Fi Station interface
esp_netif_create_ip6_linklocal(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"));
static bool border_router_initialized = false;
if (!border_router_initialized) {
ESP_ERROR_CHECK(esp_openthread_border_router_init());
border_router_initialized = true;
}
esp_openthread_lock_release();
}
}
Expand Down
4 changes: 4 additions & 0 deletions examples/thread_br/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ CONFIG_ESP_RMAKER_LOCAL_CTRL_STACK_SIZE=8096
# Application Rollback
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y

# Increase the MQTT task stack size to use generate new Thread dataset command
CONFIG_MQTT_USE_CUSTOM_CONFIG=y
CONFIG_MQTT_TASK_STACK_SIZE=7168

# mbedTLS
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
Expand Down

0 comments on commit 6c28590

Please sign in to comment.