ZP595 PCIe to Dual 2.5G Ethernet Port HAT Expansion Board

Overview

Introduction

This expansion board adds two 2.5G network port for Raspberry Pi 5, which can meet your various needs for those who need to use Raspberry Pi 5 as a router, gateway, firewall, and other network devices that need more than one network port.

 

 

Features

• Through the PCIe interface with PCIe Switch chip to expand into two PCIe interfaces and then through the RTL8125 chip to achieve the expansion of dual 2.5Gbps Ethernet.

• After power on, the expansion board can be automatically recognised as eth1 and eth2 without driver under Raspberry Pi official OS/OpenWrt system. However, when you use ubuntu system, you need to install the driver of RTL8125 and then you can use it.

• PCIe to Dual 2.5G Ethernet Port HAT expansion board, able to achieve high-speed reading/writing.

• Specially designed for Raspberry Pi 5, compatible with Raspberry Pi 5 8GB/4GB computer (NOT include Raspberry Pi 5).

 

 

 

Installation Guide

Installation of PCIe FPC Cable

Pay attention to the direction of the cable and connect it as shown in the figure:

 

 

Installation of adapter board

 

 

How to Use Ethernet Ports

Raspberry Pi OS

Open Terminal and use the following command:

ifconfig -a

 

If eth1 and eth2 appear, it means that our ZP595 hardware is connected successfully and the two network devices eth1 and eth2 appear. Otherwise, check whether the FPC cable is installed normally.

At this time, we can connect network cable to the two network ports, and then they can communicate normally.

 

 

Ubuntu

Use ifconfig -a command to see that there is no eth1 and eth2.

ifconfig -a

Use the following command to install:

sudo apt install net-tools

sudo apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms -y

sudo apt-get install r8125-dkms

sudo modprobe r8125

ifconfig -a

Use ifconfig -a command to see that there is an extra network device as shown below:

 

 

OpenWrt

OpenWRT is a highly modular and automated embedded Linux system with powerful networking components and extensibility, commonly used in industrial control devices, telephones, robots, smart homes, routers, gateways, firewalls, NAS and VOIP devices. The OpenWrt SDK is a great convenience for software developers who benefit from it, simplifying the work of developing software.

The following introduces the process of compiling the RTL8125 driver to OpenWrt, please customise it yourself if you have other needs.

 

1. Install required tools for compilation

Install required tools on the operating system of Ubuntu, Debian, Raspberry Pi OS; for most Linux-based systems, the following commands can be used:

sudo apt-get update

sudo apt-get install build-essential libncurses5-dev zlib1g-dev gawk git wget

 

2. Clone OpenWrt source code

git clone https://git.openwrt.org/openwrt/openwrt.git

 

3. Use the following command configuration to operate the system

cd openwrt

./scripts/feeds update -a

./scripts/feeds install -a

make menuconfig

Select the configuration corresponding to Raspberry Pi 5, select System Boardcom BCM27xx for Target, BCM2712 for subtarget and Raspberry Pi 5/500/CM5 for Target Profile.

 

Select “Kernel modules” to enter the kernel modules.

 

Select “Network Devices”.

 

The network chip we use is RTL8125, so select kmod-r8125 here, and the ‘*’ sign is on the left after you select it.

 

Save our configuration.

 

4. Compile

make V=s -j1

 

5. Copy the compiled firmware

cd bin/targets/bcm27xx/bcm2712/

ls

The arrows point to the generated firmware, you can select one of the files to copy out.

 

6. Write firmware

Use Raspberry Pi Imager to write operating system into Raspberry Pi 5. Use the method “Use custom” as the following picture shows:

 

After writing into the TF card, insert the TF card to Raspberry Pi 5, and then power it to run.

 

7. Run OpenWrt firmware

Checking with the ifconfig -a command after booting shows additional eth1 and eth2 device.

 

 

 

Packing List

Video Tutorial

Video link: https://youtu.be/agfGlZ2n0WI.

 

 

 

Support

If you have any question or need technical support, please contact: support@zde.plus.