diff --git a/CMakeLists.txt b/CMakeLists.txt index 091079e..9673e51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ # The following lines of boilerplate have to be in your project's # CMakeLists in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.22) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(esp32-iperf) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) +project(hello_world) diff --git a/README.md b/README.md index 5889f45..2fb7dff 100644 --- a/README.md +++ b/README.md @@ -1,130 +1,60 @@ -# ESP32 iperf +# esp32-iperf (ESP-IDF 6.x) -Network performance testing tool for ESP32 based on iperf2. +Minimal ESP32/ESP32-S3 iPerf firmware with **station mode** and optional **static IP**. +Tested on **ESP-IDF 6.0** (dev snapshot). -## Features +## Repo layout -- TCP and UDP client/server modes -- Bandwidth measurement -- Packet loss detection (UDP) -- Console-based control interface -- WiFi station mode support +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | Linux | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | ----- | -## Hardware Requirements +# Hello World Example -- ESP32, ESP32-S2, or ESP32-S3 development board -- WiFi network +Starts a FreeRTOS task to print "Hello World". -## Software Requirements +(See the README.md file in the upper level 'examples' directory for more information about examples.) -- ESP-IDF v5.0 or later -- iperf2 or iperf3 for testing with PC +## How to use example -## Building +Follow detailed instructions provided specifically for this example. -1. Set up ESP-IDF environment: -```bash -. $HOME/Code/esp32/esp-idf/export.sh -``` +Select the instructions depending on Espressif chip installed on your development board: -2. Set the target chip (choose one): -```bash -# For ESP32 -idf.py set-target esp32 +- [ESP32 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/stable/get-started/index.html) +- [ESP32-S2 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html) -# For ESP32-S2 -idf.py set-target esp32s2 -# For ESP32-S3 -idf.py set-target esp32s3 -``` +## Example folder contents -3. Configure WiFi credentials: -```bash -idf.py menuconfig -``` -Navigate to "ESP32 iperf Configuration" and set your SSID and password. +The project **hello_world** contains one source file in C language [hello_world_main.c](main/hello_world_main.c). The file is located in folder [main](main). -4. Build the project: -```bash -idf.py build -``` +ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt` files that provide set of directives and instructions describing the project's source files and targets (executable, library, or both). -5. Flash to your device: -```bash -idf.py -p /dev/ttyUSB0 flash monitor -``` - -## Usage - -### TCP Server Mode -On ESP32: -``` -iperf> iperf -s -``` - -On PC: -```bash -iperf -c -``` - -### TCP Client Mode -On PC: -```bash -iperf -s -``` - -On ESP32: -``` -iperf> iperf -c -``` - -### UDP Mode -Add `-u` flag for UDP testing: -``` -iperf> iperf -s -u -iperf> iperf -c -u -``` - -### Options -- `-s` : Run as server -- `-c ` : Run as client, connecting to server IP -- `-u` : Use UDP instead of TCP -- `-p ` : Port number (default: 5001) -- `-t