---
title: "W55RP20 iperf3 Example (TOE, LwIP)"
url: "https://maker.wiznet.io/Hannah/projects/w55rp20-iperf3-support-toe-lwip/"
markdown_url: "https://maker.wiznet.io/Hannah/projects/w55rp20-iperf3-support-toe-lwip/md"
type: "WCC: WIZnet Created Content"
author: "Hannah Lee"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Hannah Lee"
published: "2025-03-04"
language: "en"
hardware: ["WIZnet W55RP20-EVB-Pico"]
likes: 0
views: 1606
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# W55RP20 iperf3 Example (TOE, LwIP)

> W55RP20 iperf3 Example (TOE, LwIP)

Original author: Hannah Lee

## Components

- **WIZnet W55RP20-EVB-Pico** x 1 ([docs](https://wiznet.io/products/powered-by-raspberry-pi/w55rp20-evb-pico))

## Documents and links

- [iPerf3 Example](https://github.com/WIZnet-ioNIC/WIZnet-PICO-IPERF-C) (code)

## Article

#### Changes from iperf2 to iperf3

1. **TCP Transmission Structure Changes**

`iperf2` and `iperf3` differ in the format of data packets and control messages. Specifically, `iperf3` handles an initial handshake by exchanging metadata in JSON format.

2. **Buffer Size Adjustment**

`iperf3` transmits larger data blocks by default. It is necessary to check the current `ETHERNET_BUF_MAX_SIZE` setting and increase the buffer size if needed.

3. **JSON Parser Addition**

Since `iperf3` uses JSON messages, a simple JSON parser must be added or a relevant library included.

4. **Speed Measurement and Report Processing**

- `iperf3` periodically sends performance reports, requiring additional logic for handling them.

- Add logic to calculate transmitted/received bytes.

- Send results in JSON format at each measurement interval.

#### Performance Reporting in iperf2 vs. iperf3

**iperf2 Performance Reporting**

- While **iperf2** does provide throughput reporting, the method is relatively simple between the client and server.

- It primarily calculates the periodic data transfer (in bytes) and elapsed time, with **output results displayed on the client side**.

- The server only receives data and **does not send separate performance reports** to the client.

**iperf3 Performance Reporting**

- **iperf3** periodically calculates performance data on the server and sends it to the client in **JSON-formatted reports**.

- The client parses these reports and displays periodic performance results.

- Reports include **transmitted/received bytes, duration, RTT, packet loss rate, retransmission rate, and more detailed metrics**.

- Therefore, **iperf3 server code requires logic to compute performance data and periodically generate and send reports**.

#### Requirements for iperf3 Testing

To test iperf3, the following are required:

**iperf3 Download Link:**
[Official iperf3 Download](https://iperf.fr/iperf-download.php)

**W55RP20 iperf3 TOE/LwIP Code:**
- TOE Code :<https://github.com/WIZnet-ioNIC/WIZnet-PICO-IPERF-C/tree/main/examples/iperf3/toe>

LwIP Code :<https://github.com/WIZnet-ioNIC/WIZnet-PICO-IPERF-C/tree/main/examples/iperf3/lwip>

Run command prompt to enter the iPerf command and move to iPerf path.

```
/* Change directory */
// change to the 'iperf-x.x.x-winxx' directory.
cd [user path]/iperf3.xx_xx

// e.g.
cd D:/iperf3.16_64
```

[![](https://github.com/WIZnet-ioNIC/WIZnet-PICO-IPERF-C/raw/main/static/images/iperf/move_to_iperf3_path.png)](https://github.com/WIZnet-ioNIC/WIZnet-PICO-IPERF-C/blob/main/static/images/iperf/move_to_iperf3_path.png)

In the command prompt, enter the following command to connect to Raspberry Pi Pico, W5100S-EVB-Pico or W5500-EVB-Pico running as a TCP server and test.

```
/* Network performance measurement test */
.\iperf3 -c [connecting to] -t [time in seconds to transmit for] -i [seconds between periodic bandwidth reports]

// e.g.
.\iperf -c 192.168.11.2 -t 10 -t 1
```

[![](https://github.com/WIZnet-ioNIC/WIZnet-PICO-IPERF-C/raw/main/static/images/iperf/iperf3_lwip_result.png)](https://github.com/WIZnet-ioNIC/WIZnet-PICO-IPERF-C/blob/main/static/images/iperf/iperf3_lwip_result.png)

---

Source: https://maker.wiznet.io/Hannah/projects/w55rp20-iperf3-support-toe-lwip/
