---
title: "RPi5- 2 Port Ethernet + PoE"
url: "https://maker.wiznet.io/louis_m/projects/rpi5-2-port-ethernet-poe/"
markdown_url: "https://maker.wiznet.io/louis_m/projects/rpi5-2-port-ethernet-poe/md"
type: "WCC: WIZnet Created Content"
author: "Louis"
original_author: "louis"
published: "2024-01-18"
language: "en"
hardware: ["WIZnet W5500", "Raspberry Pi 5"]
likes: 2
views: 3356
comments: 1
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# RPi5- 2 Port Ethernet + PoE

> RPi5- 2 Port Ethernet + PoE

Original author: louis

## Components

- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))
- **Raspberry Pi 5** x 1

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Article

## About Raspberry Pi 5

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

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

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

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

## About Raspberry Pi 5 - HAT PoE

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

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

The board is designed to use Ethernet using the WIZnet Chip. Of course, the existing Ethernet can also be used. In addition, the board is designed to use PoE+, which can be used not only through the WIZnet Connector but also through the existing Ethernet Connector.![](https://maker.wiznet.io/upload/ckeditor5/247830418%5F1705680431%2Epng)

## Hardware Connection

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

The Raspberry Pi GPIO used inside W5500 is as follows.

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

## Getting Start W5500 Ethernet

## Raspberry Pi update

Update the list of packages on the system with the following command.

```plaintext
sudo apt-get update
```

[![apt update](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/apt%20update.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/apt%20update.jpg)

## <https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/RPi5-w5500/Getting%20Start%20SPI%20Ethernet.md#install-gpiod>Install gpiod

**WiringPi** is **PRE-INSTALLED** with standard Raspbian systems. To update or install on a Raspbian-Lite system:

```plaintext
sudo apt-get install libgpiod2 libgpiod-dev
```

[![gpiod_install](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/gpiod_install.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/gpiod_install.jpg)

## <https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/RPi5-w5500/Getting%20Start%20SPI%20Ethernet.md#enable-the-spi-module>Enable the SPI Module

Enter raspi-config in the terminal to open the serial port I2C (refer to the configuration to open ssh Interface Options:

```plaintext
sudo raspi-config
```

[![raspi-config](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/raspi-config.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/raspi-config.jpg)

**"Interfacing Options" -> "SPI" enable**

[![RPi_SPI](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/RPi_SPI.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/RPi_SPI.jpg)

Test that the SPI is enabled:

```plaintext
ls -l /dev/spidev*
```

[![spi_enable](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/spi_enable.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/spi_enable.jpg)

## <https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/RPi5-w5500/Getting%20Start%20SPI%20Ethernet.md#get-w5500-loopback-source>get w5500 loopback source

Get the W5500 code:

```plaintext
git clone https://github.com/Wiznet-OpenHardware/RPi-w5500.git

cd RPi-w5500
```

## <https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/RPi5-w5500/Getting%20Start%20SPI%20Ethernet.md#build--run>build & run

**"make"** command to compile it. This will create an executable called W5x00_loopback.

```plaintext
make
```

[![RPI5_W5500_make](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/RPi5_make.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/RPi5_make.jpg)

When you run the executable, you can run the **Loopback** code as shown below.

```plaintext
./w5x00_loopback
```

[![RPI_loopback_run](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/RPI_loopback_run.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/RPI_loopback_run.jpg)

When you run the executable, you can run the **DHCP & DNS** code as shown below.

```plaintext
./w5x00_dhcp_dns
```

[![RPI_dhcpdns_run](https://github.com/Wiznet-OpenHardware/RPi-w5500/raw/main/images/SPI_ethernet/RPI_dhcpdns_run.jpg)](https://github.com/Wiznet-OpenHardware/RPi-w5500/blob/main/images/SPI_ethernet/RPI_dhcpdns_run.jpg)

[Source Code : https://github.com/Wiznet-OpenHardware/RPi-w5500/tree/main/RPi5-w5500](https://github.com/Wiznet-OpenHardware/RPi-w5500/tree/main/RPi5-w5500)

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

## Application field

1. Improve equipment reliability:
If IoT devices or industrial equipment play a critical role, losing connectivity due to a failed Ethernet port can be a big problem. In this case, you can utilize two Ethernet ports to automatically switch to the other port when one fails. This can increase the reliability of your equipment's connectivity.

2. Improve data processing performance:
IoT devices or industrial equipment often need to process large amounts of data. In this case, you can utilize two Ethernet ports to apply load balancing to distribute network traffic, or you can use both ports simultaneously to increase the overall network bandwidth to improve data processing performance.

3. Configure the network between equipment:
In industrial environments, multiple pieces of equipment often operate in conjunction with each other. In these cases, you may encounter situations where one piece of equipment needs to be directly connected to two or more other pieces of equipment. In these situations, 2-Port Ethernet can be utilized to efficiently connect each piece of equipment.

In this way, 2-Port Ethernet can be utilized in a variety of ways in IoT and industrial environments.

---

Source: https://maker.wiznet.io/louis_m/projects/rpi5-2-port-ethernet-poe/
