Wi-Fi throughput and range, 2.4 GHz versus 5 GHz on one chip
How we compare TCP throughput and RSSI on 2.4 and 5 GHz with the same ESP32-C5 board and access point, at recorded distances and obstructions, with the stock ESP-IDF iperf example.
| Instrument | ESP-IDF iperf example, iperf 2 on a wired host, access point with one SSID per band (see ops/BENCH.md) |
|---|---|
| Updated | 28 November 2026 |
The ESP32-C5 has a 2.4 and 5 GHz dual-band Wi-Fi 6 radio (datasheet v1.5). That makes it possible to compare the two bands with everything else held fixed: the same chip, board, antenna, firmware and access point. This method does that, at positions we describe, and reports TCP throughput and the received signal strength indicator (RSSI) for each trial. It does not produce a single “range” figure, because range depends on the building more than on the chip.
What we measure
For each position, band and direction we run three trials of 30 seconds. Each trial gives:
- the RSSI the board reports when it associates, in dBm
- TCP throughput in 1-second intervals, in Mbit/s, from which we take the mean and the median of the intervals after the first
Direction is named from the board: “tx” means the board sends to the host, “rx” means the board receives.
Firmware and host
We use Espressif’s own iperf example from ESP-IDF v6.1.1 (examples/wifi/iperf), unmodified, so anyone can repeat the test without our code. Its README lists the ESP32-C5 among the supported targets and says it is compatible with iperf version 2.x, so the host runs iperf 2, not iperf3. The example turns Wi-Fi power save off at start-up (esp_wifi_set_ps(WIFI_PS_NONE)); ESP-IDF’s default would be WIFI_PS_MIN_MODEM. It uses the buffer and window settings of its sdkconfig.defaults.esp32c5. We keep those defaults and say so with each result.
The example is driven from its serial console with sta_connect <ssid> <password> and iperf. The bench runner types these commands from a send file and takes the SSID and password from the gitignored .env, so no credentials enter the repository or the saved log.
ESP-IDF v6.1.1 also has esp_wifi_set_band_mode() with 2.4 GHz only, 5 GHz only and automatic modes. The stock example does not call it. We choose the band at the access point instead: one SSID on 2.4 GHz and a different SSID on 5 GHz, with band steering off.
RSSI comes from the Wi-Fi driver’s association line in the log (rssi: <dBm>). That is one value per connection. A dedicated logging example that calls esp_wifi_sta_get_rssi() once a second (the function returns the RSSI of the last received beacon) is planned. Until it exists, results give one RSSI per trial.
Access point and environment
Each result records, through --meta:
- access point model and firmware version
- band, channel and channel width for each SSID (20 MHz on both bands for the baseline; another width is a separate run)
- security mode
- the position name, the straight-line distance from the access point in metres, and what is in the way, described plainly (“one interior wall”, “open office, two desks”)
- the board’s height and orientation (we hold it in the RF test jig once that is printed and fitted)
- the host computer and how it is connected (wired to the access point’s LAN)
- room temperature, the time of day, and whether people were moving in the path
The board runs from the bench computer’s USB port, because the runner needs its console. The USB cable is routed away from the antenna end and the routing is the same for every trial.
Positions and order
- P1: 1 m from the access point, line of sight, same room. This is the reference.
- P2 and further: positions chosen on the bench, each described as above. We keep a position list in the run folder so the same positions can be used again.
At each position the trials alternate between bands (2.4, 5, 2.4, 5, 2.4, 5) so that slow drift in the environment affects both bands alike. Transmit runs come before receive runs.
Procedure
Run from the repository root with the iotfieldguide Python environment. Copy the keys in tools/bench/env.example into .env and set them.
- Flash the stock example:
python tools/bench/bench.py flash --port <port> --idf-example wifi/iperf --target esp32c5
- On the wired host, start an iperf 2 server:
iperf -s -i 1. - Run one transmit trial. Repeat with the 5 GHz send file and alternate as above. Every trial at one position goes into the same folder (
--append):
python tools/bench/bench.py capture --port <port> --seconds 60 --reset \
--send tools/bench/send/iperf-tx-2g4.txt --expect tools/bench/expect/idf-wifi-iperf.txt \
--board-rev "ESP32-C5-DevKitC-1 v1.2" --test throughput-and-range --example idf-wifi-iperf \
--unit u1 --run-id throughput-and-range-u1-p1 --append \
--meta position=p1 --meta distance_m=1.0 --meta obstruction="none, line of sight" \
--meta band=2.4 --meta direction=tx --meta ap_model="<model>" --meta ap_firmware="<version>" \
--meta channel=<n> --meta width_mhz=20
- Receive trials use
tools/bench/send/iperf-rx-2g4.txtoriperf-rx-5g.txtwith--meta direction=rx. The board starts an iperf server. When its log showssta ip, runiperf -c <board address> -i 1 -t 30on the host. - Summarise the folder and record it:
python tools/bench/iperf_summary.py content-data/measurements/throughput-and-range-u1-p1
python tools/bench/bench.py record --run throughput-and-range-u1-p1 --test throughput-and-range \
--device esp32-c5-devkitc-1 --units 1 --instrument "ESP-IDF iperf example, iperf 2 host" \
--settings "IDF v6.1.1 wifi/iperf defaults; 20 MHz; <channels>; P1 1.0 m" --summary "<see summary.csv>"
- Repeat for each position and, where the bench has them, for more units.
Raw data
| File | Content |
|---|---|
serial-NN.log |
Console log of trial NN; SSID, password and MAC addresses masked by the runner |
run-NN.json |
Date (UTC), firmware commit, ESP-IDF version, board and chip revision, unit, pass or fail, and the --meta fields |
summary.csv |
One row per trial from tools/bench/iperf_summary.py: RSSI, interval count, mean, median, minimum and maximum Mbit/s, and the metadata |
positions.md |
The position list, with distances and obstructions, and no address or other location detail |
Known sources of error
- Other networks and devices on the same channel. We record the channel and the time, and repeat trials.
- The access point’s own choices. Automatic channel, width or band steering would change the test under us, so they are off. We record the channel at the start and the end of each session.
- The host. A slow host or a wireless link on the host side would cap the result. The host is wired to the access point.
- The USB cable, the computer and the people near the board. Their routing and position are kept the same and recorded.
- RSSI is the chip’s own estimate. It is an integer in dBm, one value per connection, and its absolute calibration is not stated in the sources we read. Compare RSSI values from the same board, not across boards.
- TCP start-up. The first interval is excluded from the mean and median.
- One access point, one building. We say which, and we never generalise from them.
How results are reported
For each position, band and direction: the median, minimum and maximum of the per-trial mean throughput, the median RSSI, the number of trials and the number of units. The 2.4 and 5 GHz rows sit side by side for the same position. Every result names the access point model and firmware, the channel and width, the distance and the obstructions, the firmware commit and the ESP-IDF version, and repeats that results in another building will differ.
For makers
You can run this with one board, your home router and a laptop on Ethernet. Make two SSIDs, one per band, and fix their channels. Run P1 first: if the two bands look very different at 1 m, check the router settings before you walk to the far room.
For product teams
Customers’ access points, not yours, set the result in the field. Run the same positions with several access point models, and with the channel widths your product will meet. Keep throughput and RSSI per trial, so a change of module, antenna or enclosure can be compared against the same baseline.