---
title: "W55RP20-EVB-PICO Loopback example"
url: "https://maker.wiznet.io/Grace_Koo/projects/w55rp20-evb-pico-loopback-example/"
markdown_url: "https://maker.wiznet.io/Grace_Koo/projects/w55rp20-evb-pico-loopback-example/md"
type: "WCC: WIZnet Created Content"
author: "Grace"
author_url: "https://maker.wiznet.io/Grace_Koo/"
original_author: "Grace Koo"
published: "2024-09-26"
language: "en"
tags: ["C/C++", "ionic-contest-ref"]
hardware: ["WIZnet W55RP20-EVB-Pico"]
likes: 0
views: 3561
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# W55RP20-EVB-PICO Loopback example

> Execute the loopback example in PICO-C.

Original author: Grace Koo

## Components

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

## Documents and links

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

## Article

Execute the loopback code from the PICO-C examples in the WIZnet-ioNIC GitHub repository. This contents covers the setup and execution results.

> <https://github.com/WIZnet-ioNIC/WIZnet-PICO-C>

## Hardware Requirements

- W55RP20-EVB-PICO

- Desktop or Laptop

- USB Type-C Cable

## Software Tools

- Visual Studio Code

- Serial Terminal : Tera Term

- TCP Server / TCP Client / UDP : Hercules

#### Setup board

Need to set up the board in the 'WIZnet-PICO-C/CMakeLists.txt' file.

Activate the 8th line in this file by setting 'set(BOARD_NAME W55RP20_EVB_PICO)'.

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727275748%2Epng)

*WIZnet-PICO-C/CMakeLists.txt*

#### Setup Network Info

> WIZnet-PICO-C\examples\loopback\w5x00_loopback.c

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727276297%2Epng)

*Set up the desired network information.*

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727276940%2Epng)

*Set the port to be used.*

#### Run

The basic example runs a TCP server. To use a TCP client or UDP, refer to the functions in the path below and make the necessary modifications.

> WIZnet-PICO-C\libraries\ioLibrary_Driver\Application\loopback\loopback.c

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727281453%2EPNG)

*some parts of the UDP functions in the loopback.c*

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727284153%2EPNG)

*some parts of the TCP client functions in the loopback.c*

#### **1. TCP server**

The following is the execution screen of the TCP server example.

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727277434%2EPNG)

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727284865%2EPNG)

*Loopback Screen*

connected to the W55RP20 using another client.

#### **2. TCP client**

You need to modify the existing example to function as a TCP client.

The destIP of the server to connect to has been defined.

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727287250%2Epng)

*w5x00_loopback.c*

The following is the execution screen of the TCP client example.

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727279764%5F0%2EPNG)

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727286395%2EPNG)

*Loopback Screen*

connected to the W55RP20 using another TCP server.

when the server connection is lost.

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727279764%5F3%2EPNG)

#### **3. UDP**

![](https://maker.wiznet.io/upload/ckeditor5/469707427%5F1727343518%2Epng)

*w5x00_loopback.c*

The following is the execution screen of the TCP client example.

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727277166%5F0%2EPNG)

![](https://maker.wiznet.io/upload/ckeditor5/469704619%5F1727286458%2EPNG)

*Loopback Screen*

connected to the W55RP20 using another UDP.

---

Source: https://maker.wiznet.io/Grace_Koo/projects/w55rp20-evb-pico-loopback-example/
