---
title: "micropython iPerf on W55RP20"
url: "https://maker.wiznet.io/josephsr/projects/iperf-on-w55rp20/"
markdown_url: "https://maker.wiznet.io/josephsr/projects/iperf-on-w55rp20/md"
type: "WCC: WIZnet Created Content"
author: "Joseph"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Joseph"
license: "MIT license (MIT)"
published: "2024-11-04"
language: "en"
tags: ["iperf"]
hardware: ["WIZnet W55RP20-EVB-Pico"]
likes: 0
views: 1311
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# micropython iPerf on W55RP20

> This Python code is an iperf3-compatible network performance test client. It measures network throughput using TCP/UDP and collects performance statistics.

Original author: Joseph

## Components

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

## Documents and links

- [iperf3 implementation in ioNIC examples](https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-micropython/blob/master/WIZnet-ioNIC_examples/iperf3.py) (code)

## Article

This Python code implements a client for network performance testing, compatible with iperf3.

It connects to a server using either TCP or UDP to measure network performance, including metrics like throughput and latency.

The code supports sending and receiving data, gathering statistics, and handling commands exchanged with the server. The `Stats` class collects data about the number of bytes transferred and handles timing to evaluate network throughput.

### Usage

## iPerf Server for W55RP20-EVB-Pico

<https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-micropython/tree/master/WIZnet-ioNIC_examples#iperf-server-for-w55rp20-evb-pico>

**File:** `iperf3.py`

When executed as a server process, this script performs the following actions:

1. Obtains an IP address via DHCP

2. Opens and listens on port 5201

### Performance Note

<https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-micropython/tree/master/WIZnet-ioNIC_examples#performance-note>

Due to the nature of MicroPython execution, the test results may show lower performance compared to the board's actual capabilities. This is an inherent limitation of the interpreted language environment.

### Recommendation for Accurate Performance Testing

<https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-micropython/tree/master/WIZnet-ioNIC_examples#recommendation-for-accurate-performance-testing>

For more accurate iPerf test results that reflect the true performance of the W55RP20-EVB-Pico board, we recommend using the C language implementation.

Please refer to the following repository for a C-based iPerf implementation:

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

This C implementation will provide more representative performance metrics for the W55RP20-EVB-Pico board.

## Windows iPerf3 Test Script for W55RP20

<https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-micropython/tree/master/WIZnet-ioNIC_examples#windows-iperf3-test-script-for-w55rp20>

**File:** `iperf3_test.py`

This script is designed to test the `iperf3.py` running on the W55RP20 board from a Windows environment.

### Purpose

<https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-micropython/tree/master/WIZnet-ioNIC_examples#purpose>

The primary purpose of this script is to facilitate iPerf3 testing between a Windows machine and a W55RP20 board running the `iperf3.py` script.

### Usage Instructions

<https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-micropython/tree/master/WIZnet-ioNIC_examples#usage-instructions>

To use this script, follow these steps:

1. Ensure the `iperf3.py` script is running on your W55RP20 board.

2. Note the IP address displayed by the W55RP20 board.

3. Open a command prompt or PowerShell window on your Windows machine.

4. Navigate to the directory containing this script.

5. Run the script using the following command format:

---

Source: https://maker.wiznet.io/josephsr/projects/iperf-on-w55rp20/
