diff --git a/components/openthread/port/esp_openthread_uart.c b/components/openthread/port/esp_openthread_uart.c index 4ad3a98eed..2400f24ee6 100644 --- a/components/openthread/port/esp_openthread_uart.c +++ b/components/openthread/port/esp_openthread_uart.c @@ -117,7 +117,9 @@ esp_err_t esp_openthread_uart_process(otInstance *instance, const esp_openthread int rval = read(s_uart_fd, s_uart_buffer, sizeof(s_uart_buffer)); if (rval > 0) { +#if CONFIG_OPENTHREAD_CLI || CONFIG_OPENTHREAD_RADIO otPlatUartReceived(s_uart_buffer, (uint16_t)rval); +#endif } else if (rval < 0) { if (errno != EAGAIN) { ESP_LOGW(OT_PLAT_LOG_TAG, "read uart failed: %d", errno); diff --git a/examples/openthread/ot_cli/main/esp_ot_cli.c b/examples/openthread/ot_cli/main/esp_ot_cli.c index bf7de1e2f5..6645a6aaec 100644 --- a/examples/openthread/ot_cli/main/esp_ot_cli.c +++ b/examples/openthread/ot_cli/main/esp_ot_cli.c @@ -70,7 +70,9 @@ static void ot_task_worker(void *aContext) (void)otLoggingSetLevel(CONFIG_LOG_DEFAULT_LEVEL); #endif // Initialize the OpenThread cli +#if CONFIG_OPENTHREAD_CLI esp_openthread_cli_init(); +#endif esp_netif_t *openthread_netif; // Initialize the esp_netif bindings @@ -81,7 +83,9 @@ static void ot_task_worker(void *aContext) #endif // CONFIG_OPENTHREAD_CLI_ESP_EXTENSION // Run the main loop +#if CONFIG_OPENTHREAD_CLI esp_openthread_cli_create_task(); +#endif esp_openthread_launch_mainloop(); // Clean up diff --git a/examples/openthread/ot_cli/sdkconfig.ci.disable_cli b/examples/openthread/ot_cli/sdkconfig.ci.disable_cli new file mode 100644 index 0000000000..fcb0e68ac2 --- /dev/null +++ b/examples/openthread/ot_cli/sdkconfig.ci.disable_cli @@ -0,0 +1,5 @@ +CONFIG_IDF_TARGET="esp32h4" +CONFIG_IDF_TARGET_ESP32H4=y +CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2=y +CONFIG_OPENTHREAD_CLI=n +CONFIG_OPENTHREAD_CLI_ESP_EXTENSION=n diff --git a/examples/openthread/ot_rcp/sdkconfig.defaults b/examples/openthread/ot_rcp/sdkconfig.defaults index 744223185e..f1ab6da317 100644 --- a/examples/openthread/ot_rcp/sdkconfig.defaults +++ b/examples/openthread/ot_rcp/sdkconfig.defaults @@ -35,6 +35,8 @@ CONFIG_OPENTHREAD_DIAG=y CONFIG_OPENTHREAD_COMMISSIONER=n CONFIG_OPENTHREAD_JOINER=n CONFIG_OPENTHREAD_BORDER_ROUTER=n +CONFIG_OPENTHREAD_CLI=n +CONFIG_OPENTHREAD_SRP_CLIENT=n # end of OpenThread