|
|
||
|---|---|---|
| main | ||
| .gitignore | ||
| CMakeLists.txt | ||
| README.md | ||
README.md
ESP32 iperf
Network performance testing tool for ESP32 based on iperf2.
Features
- TCP and UDP client/server modes
- Bandwidth measurement
- Packet loss detection (UDP)
- Console-based control interface
- WiFi station mode support
Hardware Requirements
- ESP32 development board
- WiFi network
Software Requirements
- ESP-IDF v5.0 or later
- iperf2 or iperf3 for testing with PC
Building
- Set up ESP-IDF environment:
. $HOME/Code/esp32/esp-idf/export.sh
- Configure WiFi credentials:
idf.py menuconfig
Navigate to "ESP32 iperf Configuration" and set your SSID and password.
- Build the project:
idf.py build
- Flash to ESP32:
idf.py -p /dev/ttyUSB0 flash monitor
Usage
TCP Server Mode
On ESP32:
iperf> iperf -s
On PC:
iperf -c <ESP32_IP>
TCP Client Mode
On PC:
iperf -s
On ESP32:
iperf> iperf -c <PC_IP>
UDP Mode
Add -u flag for UDP testing:
iperf> iperf -s -u
iperf> iperf -c <IP> -u
Options
-s: Run as server-c <ip>: Run as client, connecting to server IP-u: Use UDP instead of TCP-p <port>: Port number (default: 5001)-t <time>: Test duration in seconds (default: 30)-b <bw>: Bandwidth limit for UDP in Mbps-a: Abort running test
Examples
# TCP client test for 10 seconds
iperf -c 192.168.1.100 -t 10
# UDP server on port 5002
iperf -s -u -p 5002
# Stop running test
iperf -a
Project Structure
esp32-iperf/
├── CMakeLists.txt
├── main/
│ ├── CMakeLists.txt
│ ├── Kconfig.projbuild
│ ├── main.c # WiFi initialization and console
│ ├── iperf.c # iperf implementation
│ └── iperf.h # iperf header
└── README.md
Author
Bob - Creator of iperf2
License
Open source