From 7372fdf3f966079c65950945224e5abb79e346ac Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Wed, 1 Apr 2026 14:54:10 +0800 Subject: [PATCH] feat(coex): enable external coexistence command --- examples/openthread/ot_br/main/esp_ot_br.c | 7 +++++++ examples/openthread/ot_br/main/idf_component.yml | 2 ++ examples/openthread/ot_cli/main/esp_ot_cli.c | 7 +++++++ examples/openthread/ot_cli/main/idf_component.yml | 2 ++ examples/openthread/ot_rcp/main/esp_ot_rcp.c | 8 +++++++- examples/openthread/ot_rcp/main/idf_component.yml | 2 ++ examples/wifi/iperf/main/idf_component.yml | 2 ++ examples/wifi/iperf/main/iperf_example_main.c | 7 +++++++ examples/wifi/iperf/sdkconfig.ci.ext_coex | 1 + 9 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 examples/wifi/iperf/sdkconfig.ci.ext_coex diff --git a/examples/openthread/ot_br/main/esp_ot_br.c b/examples/openthread/ot_br/main/esp_ot_br.c index c9bb84eff0d..dc668f95983 100644 --- a/examples/openthread/ot_br/main/esp_ot_br.c +++ b/examples/openthread/ot_br/main/esp_ot_br.c @@ -42,6 +42,10 @@ #include "ot_led_strip.h" #endif +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE +#include "ext_coex_cmd.h" +#endif + #define TAG "esp_ot_br" #if CONFIG_OPENTHREAD_SUPPORT_HW_RESET_RCP @@ -98,6 +102,9 @@ void app_main(void) #if CONFIG_OPENTHREAD_CLI ot_console_start(); ot_register_external_commands(); +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE + register_cmd_extcoex(); +#endif #endif #if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE diff --git a/examples/openthread/ot_br/main/idf_component.yml b/examples/openthread/ot_br/main/idf_component.yml index 3dca30645e1..d5db00de3c7 100644 --- a/examples/openthread/ot_br/main/idf_component.yml +++ b/examples/openthread/ot_br/main/idf_component.yml @@ -14,3 +14,5 @@ dependencies: path: ${IDF_PATH}/examples/openthread/ot_common_components/ot_examples_br ot_examples_common: path: ${IDF_PATH}/examples/openthread/ot_common_components/ot_examples_common + esp-qa/coexist-cmd: + version: "~0.0.1" diff --git a/examples/openthread/ot_cli/main/esp_ot_cli.c b/examples/openthread/ot_cli/main/esp_ot_cli.c index 0d49da7ef59..c05d8b2cc5d 100644 --- a/examples/openthread/ot_cli/main/esp_ot_cli.c +++ b/examples/openthread/ot_cli/main/esp_ot_cli.c @@ -39,6 +39,10 @@ #include "esp_ot_cli_extension.h" #endif // CONFIG_OPENTHREAD_CLI_ESP_EXTENSION +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE +#include "ext_coex_cmd.h" +#endif + #define TAG "ot_esp_cli" void app_main(void) @@ -61,6 +65,9 @@ void app_main(void) #if CONFIG_OPENTHREAD_CLI ot_console_start(); ot_register_external_commands(); +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE + register_cmd_extcoex(); +#endif #endif static esp_openthread_config_t config = { diff --git a/examples/openthread/ot_cli/main/idf_component.yml b/examples/openthread/ot_cli/main/idf_component.yml index 49621895d6b..9c97cdf21b0 100644 --- a/examples/openthread/ot_cli/main/idf_component.yml +++ b/examples/openthread/ot_cli/main/idf_component.yml @@ -8,3 +8,5 @@ dependencies: path: ${IDF_PATH}/examples/openthread/ot_common_components/ot_led ot_examples_common: path: ${IDF_PATH}/examples/openthread/ot_common_components/ot_examples_common + esp-qa/coexist-cmd: + version: "~0.0.1" diff --git a/examples/openthread/ot_rcp/main/esp_ot_rcp.c b/examples/openthread/ot_rcp/main/esp_ot_rcp.c index 0da81bd75be..22c40969a79 100644 --- a/examples/openthread/ot_rcp/main/esp_ot_rcp.c +++ b/examples/openthread/ot_rcp/main/esp_ot_rcp.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: CC0-1.0 * @@ -34,6 +34,9 @@ #if CONFIG_IEEE802154_DEBUG #include "ieee802154_debug.h" #endif +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE +#include "ext_coex_cmd.h" +#endif #endif #define TAG "ot_esp_rcp" @@ -73,6 +76,9 @@ void app_main(void) #if CONFIG_IEEE802154_DEBUG register_ieee802154_debug_cmd(); #endif +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE + register_cmd_extcoex(); +#endif #endif ESP_ERROR_CHECK(esp_openthread_start(&config)); diff --git a/examples/openthread/ot_rcp/main/idf_component.yml b/examples/openthread/ot_rcp/main/idf_component.yml index a434cd02ac7..96af39ed440 100644 --- a/examples/openthread/ot_rcp/main/idf_component.yml +++ b/examples/openthread/ot_rcp/main/idf_component.yml @@ -4,3 +4,5 @@ dependencies: path: ${IDF_PATH}/examples/openthread/ot_common_components/ot_examples_common cmd_ieee802154_debug: path: ${IDF_PATH}/examples/ieee802154/components/cmd_ieee802154_debug + esp-qa/coexist-cmd: + version: "~0.0.1" diff --git a/examples/wifi/iperf/main/idf_component.yml b/examples/wifi/iperf/main/idf_component.yml index 910a14dce78..323545a022e 100644 --- a/examples/wifi/iperf/main/idf_component.yml +++ b/examples/wifi/iperf/main/idf_component.yml @@ -19,3 +19,5 @@ dependencies: version: "~0.3.0" rules: - if: "target in [esp32p4]" + esp-qa/coexist-cmd: + version: "~0.0.1" diff --git a/examples/wifi/iperf/main/iperf_example_main.c b/examples/wifi/iperf/main/iperf_example_main.c index b9ec99bd1fd..1c27ae25c3c 100644 --- a/examples/wifi/iperf/main/iperf_example_main.c +++ b/examples/wifi/iperf/main/iperf_example_main.c @@ -39,6 +39,10 @@ extern int wifi_cmd_clr_rx_statistics(int argc, char **argv); #include "esp_extconn.h" #endif +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE +#include "ext_coex_cmd.h" +#endif + void iperf_hook_show_wifi_stats(iperf_id_t instance_id, iperf_state_data_t *data, void *priv) { if (data->state == IPERF_STARTED) { @@ -136,6 +140,9 @@ void app_main(void) iperf_cmd_set_iperf_state_handler(iperf_hook_show_wifi_stats, NULL); /* From ping-cmd */ ping_cmd_register_ping(); +#if CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE + register_cmd_extcoex(); +#endif printf("\n ==================================================\n"); diff --git a/examples/wifi/iperf/sdkconfig.ci.ext_coex b/examples/wifi/iperf/sdkconfig.ci.ext_coex new file mode 100644 index 00000000000..6b04e74e9d4 --- /dev/null +++ b/examples/wifi/iperf/sdkconfig.ci.ext_coex @@ -0,0 +1 @@ +CONFIG_ESP_COEX_EXTERNAL_COEXIST_ENABLE=y