#Test requirements:
- ESP32 turns on WiFi AP + Server mode
- Connect mobile phone to ESP32 WiFi AP hotspot
- Test the Iperf rate of the ESP32 WiFi hotspot through the Iperf test APP on the mobile phone
Test case:
- Can be tested based on the "esp-idf/examples/wifi/iperf" routine.
- After the ESP32 device downloads the Iperf routine, turn on the WiFi AP mode and Server mode
1. ESP32 turns on Wifi AP mode
ap esp32 12345678
-
Parameter meaning:
ap
means openWiFi AP
mode ;sta
means openWiFi Station 模式
esp32
and represent ESP32 open WiFi AP mode and12345678
respectivelyssid
password
- If the ESP32 needs to be set to
WiFi Station 模式
connect the router, the following command can be used
sta cc2.4 espressif
2. ESP32 opens TCP Server mode
iperf -s -i 3 -t 200
-
Parameter meaning:
-
-s
Indicates openServer 模式
, the default isTCP Server
mode .-c
Indicates openClient 模式
-
-i 3
represent每 3 秒打印一次速率
-
-t 200
represent总共测试 200 秒
time -
If you want to test
UDP Server
the rate , increase-u
the parameter, as follows:
-
iperf -s -u -i 3 -t 200
3. Download the mobile terminal Iperf test APP
Please refer to "iperf3 network detection detailed explanation (android, iOS, windows"
- Mobile terminal test steps:
- Connect the mobile phone to the ESP32 WiFi hotspot first
- Open the Iperf test APP and set the Iperf test command as follows:
iperf -c 192.168.4.1 -i 2 -t 60
- Parameter meaning
-c
representIperf 测试 APP 为 Client 端
192.168.4.1
forESP32 作为 Server 端的 IP 地址
_-i 2
on behalf每 2 秒打印一次测试速率
of-t 60
represent总共测试 60 秒时间