diff --git a/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/idf_component.yml b/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/idf_component.yml index 9fe802f328..21aa055cda 100644 --- a/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/idf_component.yml +++ b/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/idf_component.yml @@ -4,4 +4,4 @@ dependencies: example_init: path: ${IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_components/example_init espressif/iperf: - version: "~0.1.1" + version: "^1.0.2" diff --git a/examples/ethernet/iperf/main/ethernet_iperf_main.c b/examples/ethernet/iperf/main/ethernet_iperf_main.c index bd5b996ec1..71ddd7d15f 100644 --- a/examples/ethernet/iperf/main/ethernet_iperf_main.c +++ b/examples/ethernet/iperf/main/ethernet_iperf_main.c @@ -114,7 +114,7 @@ void app_main(void) /* Register commands */ register_system_common(); - app_register_iperf_commands(); + iperf_cmd_register_iperf(); register_ethernet_commands(); printf("\n =======================================================\n"); diff --git a/examples/ethernet/iperf/main/idf_component.yml b/examples/ethernet/iperf/main/idf_component.yml index 47e0d941b9..3afe76ea24 100644 --- a/examples/ethernet/iperf/main/idf_component.yml +++ b/examples/ethernet/iperf/main/idf_component.yml @@ -2,6 +2,6 @@ dependencies: cmd_system: path: ${IDF_PATH}/examples/system/console/advanced/components/cmd_system espressif/ethernet_init: - version: "~1.2.0" + version: "~1.3.0" espressif/iperf-cmd: - version: "~0.1.1" + version: "~1.0.2" diff --git a/examples/openthread/ot_common_components/ot_examples_common/idf_component.yml b/examples/openthread/ot_common_components/ot_examples_common/idf_component.yml index 64b8f724c2..ea03d0d861 100644 --- a/examples/openthread/ot_common_components/ot_examples_common/idf_component.yml +++ b/examples/openthread/ot_common_components/ot_examples_common/idf_component.yml @@ -1,5 +1,5 @@ ## IDF Component Manager Manifest File dependencies: - espressif/iperf-cmd: "^1.0.0" + espressif/iperf-cmd: "^1.0.2" cmd_system: path: ${IDF_PATH}/examples/system/console/advanced/components/cmd_system diff --git a/examples/wifi/iperf/main/idf_component.yml b/examples/wifi/iperf/main/idf_component.yml index 35dc881596..910a14dce7 100644 --- a/examples/wifi/iperf/main/idf_component.yml +++ b/examples/wifi/iperf/main/idf_component.yml @@ -2,7 +2,7 @@ dependencies: cmd_system: path: ${IDF_PATH}/examples/system/console/advanced/components/cmd_system espressif/iperf-cmd: - version: "~0.1.3" + version: "~1.0.2" esp-qa/wifi-cmd: version: "~0.2.7" esp-qa/ping-cmd: diff --git a/examples/wifi/iperf/main/iperf_example_main.c b/examples/wifi/iperf/main/iperf_example_main.c index a7fb3c3608..b9ec99bd1f 100644 --- a/examples/wifi/iperf/main/iperf_example_main.c +++ b/examples/wifi/iperf/main/iperf_example_main.c @@ -39,29 +39,29 @@ extern int wifi_cmd_clr_rx_statistics(int argc, char **argv); #include "esp_extconn.h" #endif -void iperf_hook_show_wifi_stats(iperf_traffic_type_t type, iperf_status_t status) +void iperf_hook_show_wifi_stats(iperf_id_t instance_id, iperf_state_data_t *data, void *priv) { - if (status == IPERF_STARTED) { + if (data->state == IPERF_STARTED) { #if CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS - if (type != IPERF_UDP_SERVER) { + if (data->traffic_type != IPERF_UDP_SERVER) { wifi_cmd_clr_tx_statistics(0, NULL); } #endif #if CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS - if (type != IPERF_UDP_CLIENT) { + if (data->traffic_type != IPERF_UDP_CLIENT) { wifi_cmd_clr_rx_statistics(0, NULL); } #endif } - if (status == IPERF_STOPPED) { + if (data->state == IPERF_STOPPED) { #if CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS - if (type != IPERF_UDP_SERVER) { + if (data->traffic_type != IPERF_UDP_SERVER) { wifi_cmd_get_tx_statistics(0, NULL); } #endif #if CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS - if (type != IPERF_UDP_CLIENT) { + if (data->traffic_type != IPERF_UDP_CLIENT) { wifi_cmd_get_rx_statistics(0, NULL); } #endif @@ -132,8 +132,8 @@ void app_main(void) /* From wifi-cmd */ wifi_cmd_register_all(); /* From iperf-cmd */ - app_register_iperf_commands(); - app_register_iperf_hook_func(iperf_hook_show_wifi_stats); + iperf_cmd_register_iperf(); + iperf_cmd_set_iperf_state_handler(iperf_hook_show_wifi_stats, NULL); /* From ping-cmd */ ping_cmd_register_ping(); diff --git a/examples/wifi/iperf/sdkconfig.defaults b/examples/wifi/iperf/sdkconfig.defaults index 3f9430a102..5911186722 100644 --- a/examples/wifi/iperf/sdkconfig.defaults +++ b/examples/wifi/iperf/sdkconfig.defaults @@ -7,10 +7,9 @@ CONFIG_ESP_INT_WDT=n CONFIG_ESP_TASK_WDT_EN=n CONFIG_LWIP_IRAM_OPTIMIZATION=y +CONFIG_LWIP_EXTRA_IRAM_OPTIMIZATION=y CONFIG_LWIP_TCPIP_TASK_PRIO=23 -CONFIG_IPERF_TRAFFIC_TASK_PRIORITY=23 -CONFIG_IPERF_REPORT_TASK_PRIORITY=24 CONFIG_COMPILER_OPTIMIZATION_PERF=y CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y diff --git a/tools/ci/python_packages/idf_iperf_test_util/IperfUtility.py b/tools/ci/python_packages/idf_iperf_test_util/IperfUtility.py index 632da99dbc..5a40b32032 100644 --- a/tools/ci/python_packages/idf_iperf_test_util/IperfUtility.py +++ b/tools/ci/python_packages/idf_iperf_test_util/IperfUtility.py @@ -387,10 +387,10 @@ class IperfTestUtility(object): self.dut.write('iperf -s -u -i 1 -t {}'.format(TEST_TIME)) # wait until DUT TCP server created try: - self.dut.expect('Socket bound', timeout=5) + self.dut.expect('Socket created', timeout=5) except pexpect.TIMEOUT: # compatible with old iperf example binary - logging.info('create iperf udp server fail') + logging.info('No "Socket created" confirmation received after starting UDP server') process = subprocess.Popen( ['iperf', '-c', dut_ip, '-u', '-b', str(bw_limit) + 'm', '-t', str(TEST_TIME), '-f', 'm'], stdout=f, @@ -412,10 +412,10 @@ class IperfTestUtility(object): ) # 4 sec for each bw step instance start/stop # wait until DUT TCP server created try: - self.dut.expect('Socket bound', timeout=5) + self.dut.expect('Socket created', timeout=5) except pexpect.TIMEOUT: # compatible with old iperf example binary - logging.info('create iperf udp server fail') + logging.info('No "Socket created" confirmation received after starting UDP server') for bandwidth in range(start_bw, stop_bw, step): process = subprocess.Popen( [