跳转到内容

0016 MPW2.5G EN

来自Mcuzone Wiki

切换语言为中文

Keywords

Raspberry Pi 5, PCIe expansion, Switch, WiFi7, BE200, RL8125, 2.5Gbps Ethernet, iperf3 speed test

I. Introduction

The Raspberry Pi 5 is equipped with a 16-pin PCIe interface, through which we can attach various PCIe devices. This expansion board utilizes a PCIe interface paired with a PCIe Switch chip to expand into one 2.5Gbps Ethernet and one M.2-E WiFi7 slot, which also supports WiFi6(E) and WiFi5. In the Raspberry Pi OS, WiFi requires driver installation, whereas in the Ubuntu OS, it is plug-and-play without the need for drivers. The 2.5G Ethernet is automatically recognized as eth1 on the Raspberry Pi OS without requiring additional drivers upon power-up. However, on Ubuntu OS, the RTL8125 driver must be installed first before it can be used. It is recommended to add a heatsink to the onboard chip.

II. Hardware Spec

1) PCIe expansion board designed specifically for Raspberry Pi 5, connected using a 0.5mm 16P PCIe shielded cable.

2) Implement a one-to-two PCIe expansion for the Raspberry Pi 5 using a PCIe Switch chip.

3) 1* PCIe supports the M.2 E-Key interface for connecting the WiFi7 module BE200, while also being compatible with WiFi6(E) and WiFi5, such as AX210, AX200, MT7922, Intel 8265C, etc.

4) 1*PCIe is expanded to 2.5Gbps Ethernet through the RTL8125 chip.

5) 1*built-in USB Bluetooth interface (comes with the WiFi module), 1.25mm-4P. To use the Bluetooth function, this USB must be connected to the USB 2.0 port of the Raspberry Pi 5, along with the appropriate driver and profile.

6) 2*LEDs: the power LED ("PWR") and the WiFi activity LED ("ACT").

7) 4*M2.5 mounting holes with an indented design on the upper part of the board for convenient access to the 40-pin GPIO.

8) Utilizes high-efficiency DC-DC circuit, lead-free production, immersion gold process, PCB complies with UL and RoHS certifications, flame retardant rating 94V-0.

9) Optional PCB antenna or SMA antenna, IPEX4 interface.

10) Size: 85*56mm, with an optional aluminum alloy sheet metal casing.

0016_MPW2_5G_14.jpg

0016_MPW2_5G_15.jpg

0016_MPW2_5G_16.jpg

0016_MPW2_5G_17.jpg

0016_MPW2_5G_18.jpg

0016_MPW2_5G_19.jpg

III. Work with Raspberry Pi OS

We use the Raspberry Pi OS, the OS version is 2024-07-04-raspios-bookworm-arm64.img.xz.

You can download it in:

https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit

3.1 Install WiFi7 (BE200) driver

Note: Once the WiFi 7 driver is successfully installed, the original WiFi module of the Raspberry Pi 5 will no longer be available!

This step also applies to the AX210 and AX200.

3.1.1 Update OS and header files

Execute the command in the terminal:

sudo apt-get update

sudo apt install -y raspberrypi-kernel-headers firmware-iwlwifi flex yacc

3.1.2 Download and extract the source code

Execute the command in the terminal:

mkdir wifi && cd wifi

wget http://www.mcuzone.com/wiki/0011_MPW7/backport-iwlwifi-20231029.tar.bz2

sudo tar -xvf backport-iwlwifi-20231029.tar.bz2

3.1.3 Prepare the compilation environment

Execute the command in the terminal:

sudo make defconfig-iwlwifi-public

sudo sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config

3.1.4 Compile source code

Execute the command in the terminal:

sudo make -j 4

sudo make install

The OS is now prompting a restart. Please hold off on restarting for now.

3.1.5 Install the firmware (only for BE200)

AX200 or AX210, no need to install the firmware.

Execute the command in the terminal:

cd ..

cd Downloads

wget http://www.mcuzone.com/wiki/0011_MPW7/firmware_wifi7.zip

unzip firmware_wifi7.zip

sudo cp iwlwifi-gl-c0-fm-c0-86.ucode /lib/firmware

sudo cp iwlwifi-gl-c0-fm-c0.pnvm /lib/firmware

Restart the OS:

sudo reboot

3.1.6 Test WiFi7(BE200)

After restarting the OS, we can use the WiFi7 module to connect to the wireless AP:

In the network connection information, we can also see that this connection uses the iwlwifi driver :

Open https://test.ustc.edu.cn/, connect to the Internet (China Mobile 5G hotspot) via the WiFi7 module, and the results are as follows:

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

3.2 Test 2.5G Ethernet

3.2.1 Network test

The 2.5G Ethernet is plug-and-play without additional drivers under Raspberry Pi OS. When you enter the command ifconfig -a in the terminal, the 2.5G Ethernet is recognized as eth1:

Open https://test.ustc.edu.cn/, the speed test results for the 2.5G Ethernet connected to the Internet (200M broadband) are as follows:

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

3.2.2 Test network speed

Download iperf3 for Windows:

http://www.mcuzone.com/down/Software.asp?ID=10000634

Install iperf3 on Linux:

sudo apt-get install iperf3

Use iperf3 to perform speed tests between Raspberry Pi OS and a PC via a 2.5G router.

2.5G Ethernet speed test results:

When the Raspberry Pi OS acts as a client, the speed is about 2.11Gbps:

When the Raspberry Pi OS acts as a server, the speed is about 1.85Gbps:

0016_MPW2_5G_04.jpg

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

3.2.3 Fix the MAC address of the 2.5G Ethernet

The 2.5G Ethernet port uses the RTL8125 network card, and during use, the MAC address is not fixed. Each time the device is powered on again, the MAC address changes randomly. The following explains how to set a fixed MAC address for the RTL8125 network card.

This explanation also applies to the Ubuntu system.

First, check the identification information of the RTL8125 network card in terminal:

ipconfig -a

0015_MP2_5G_28.jpg

Here, the RTL8125 network card is identified as eth1, but in practice, the name recognized by the system might be different.

Then input:

sudo mousepad /etc/systemd/system/macspoof@eth1.service

Or:

sudo nano /etc/systemd/system/macspoof@eth1.service

eth1 is the name recognized by the system for the network card shown above.

Executing the above command will create a new document, then enter the following text:

[Unit]

Description=MAC Address Change %I

Wants=network-pre.target

Before=network-pre.target

BindsTo=sys-subsystem-net-devices-%i.device

After=sys-subsystem-net-devices-%i.device

[Service]

Type=oneshot

ExecStart=/usr/bin/ip link set dev %i address xx:xx:xx:xx:xx:xx

ExecStart=/usr/bin/ip link set dev %i up

[Install]

WantedBy=multi-user.target

Here, "xx:xx:xx:xx:xx:xx" represents the MAC address you wish to assign. You can determine it according to the MAC address format (make sure it does not duplicate the MAC address of other network devices). After setting it, save and exit.

Then execute the following commands to enable the service:

sudo systemctl enable macspoof@eth1.service

sudo systemctl start macspoof@eth1.service

This completes the fixation of the MAC address for eth1.

After completing all operations, restart the system. Once the system has finished rebooting, execute ipconfig -a to see that the MAC address has been successfully changed.

0015_MP2_5G_29.jpg

IV. Work with Ubuntu OS

We use the Raspberry Pi OS, the OS version is ubuntu-24.04-preinstalled-desktop-arm64+raspi.img.xz.

You can download it in:

https://ubuntu.com/download/raspberry-pi

4.1 Test WiFi7 (BE200)

This step also applies to the AX210 and AX200.

The WiFi7 (BE200) module is driver-free and plug-and-play on the Ubuntu OS. After the OS boots up, a "PCI Wi-Fi" option will appear in the "Wi-Fi" section at the top-right corner of the screen, this is the WiFi7 module.

After connecting to the wireless AP using this "PCI Wi-Fi", you can see a Wi-Fi network named "Intel" under "All Networks". This is the WiFi7 module.

The speed test results when connected to Internet via the WiFi7 module (200M broadband) are as follows:

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

If the built-in Firefox browser in Ubuntu system runs very slowly or frequently becomes unresponsive, it is recommended to install the lightweight browser Falkon:

sudo apt install falkon

4.2 Use of 2.5G Ethernet

4.2.1 Install the 2.5G Ethernet driver

The 2.5G Ethernet on the MPW2.5G expansion board is not plug-and-play in Ubuntu OS and requires the installation of the RTL8125 driver.

First, connect the Raspberry Pi to the network. You can use its built-in Gigabit Ethernet to connect to an upstream router, or connect via the Raspberry Pi's WiFi (the Raspberry Pi 5's WiFi is driver-free under the Ubuntu OS):

The ifconfig tool is not installed by default in Ubuntu OS, so it needs to be installed manually:

sudo apt install net-tools

Excute ifconfig -a, and you can see that the 2.5G Ethernet is not displayed at this time:

Next, we will begin installing the RTL8125 driver:

First, you need to update the OS:

sudo apt-get update

Next, prepare the compilation environment:

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

Then install the driver:

sudo apt-get install r8125-dkms

After installation is complete, excute:

sudo modprobe r8125

Enter ifconfig -a to see a network port called enxxx, which indicates that the 2.5G Ethernet driver has been successfully installed:

4.2.2 Test 2.5G Ethernet

The speed test results for the 2.5G Ethernet connected to the Internet (200M broadband) are as follows:

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

If the built-in Firefox browser in Ubuntu system runs very slowly or frequently becomes unresponsive, it is recommended to install the lightweight browser Falkon:

sudo apt install falkon

4.2.3 Test network speed of 2.5G Ethernet

Use iperf3 to perform speed tests between Ubuntu OS and a PC.

2.5G Ethernet speed test results:

When the Ubuntu OS acts as a client, the speed is about 2.34Gbps:

When the Ubuntu OS acts as a server, the speed is about 1.84Gbps:

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

V. Work with OpenWrt

The version of the OpenWrt we tested with is: openwrt-bcm27xx-bcm2712-rpi-5-squashfs-sysupgrade-linux-6.1.100-20240805.img.gz

Currently, there are no WiFi7 drivers available in the OpenWrt. What we are demonstrating here are the operations for 2.5G Ethernet.

By default, the OpenWrt uses the native Gigabit Ethernet on the Raspberry Pi as the LAN port. We can configure the 2.5G Ethernet as the LAN port and use the native Ethernet on the Raspberry Pi 5 as the WAN port, thereby leveraging the 2.5G Ethernet for high-speed file transfers within the local network.

5.1 Preparation

Connect the Raspberry Pi 5's native Gigabit Ethernet to the PC's network port. After the OS boots up, go to Windows Settings, find Network & Internet, and open the connected network under Ethernet to view the default gateway IP address. This address is the access address for the OpenWrt's configuration page. As shown in the figure, the tested address in this article is 192.168.198.1.

2001_CM4_Ultra_53.jpg

Then open a web browser, enter 192.168.198.1 to access the OpenWrt. The default username is root, and the default password is password:

5.2 Set up the 2.5G Ethernet as a LAN port

Click "System - TTYD Terminal", enter the command ifconfig -a, and you will see two network interfaces: eth0 and eth1. Here, eth0 is the Gigabit Ethernet of the Raspberry Pi 5, while eth1 is the 2.5G Ethernet of the expansion board:

Click "Network - Interfaces", then click "Edit" after "LAN":

In the "Physical Settings", select eth1, then click the "SAVE & APPLY" button:

Unplug the Ethernet cable from the Gigabit Ethernet of the Raspberry Pi 5 and insert it into the 2.5G Ethernet. After the connection is established, refresh the management page, click on "Network - Interfaces", and then click "Edit" next to "LAN":

In the "Physical Settings", remove the checkmark from in front of eth0, and then click the "SAVE" button:

This sets the 2.5G Ethernet as a LAN port. Then, go back to "Network - Interfaces" and click "Add new Interface...":

Set the "Name of the new interface" to "WAN"(You can customize the name.), select "DHCP Client" for the "Cover the following interface", choose "eth0" for the "Device", and click the "Submit" button.

In the "Firewall Settings", select the WAN and then click the "SAVE & APPLY" button:

At this point, the Gigabit Ethernet has been successfully configured as the WAN port. Next, connect the Gigabit Ethernet to the upstream router, then go back to "Network - Interfaces". After a short wait, you will see the newly created WAN interface obtain an IP address. In this way, the PC can connect to the internal network and access the internet through the 2.5G Ethernet. The network structure now has the Gigabit Ethernet (connected to the Internet) as the input and the 2.5G Ethernet (connected to the internal network) as the output:

We insert a USB 3.0-compatible flash drive or external hard drive into the USB 3.0 port of the Raspberry Pi 5, and then configure this flash drive or external hard drive as a shared directory by referring to the link below:

Set the SSD as a shared directory

After the setup is complete, enter \\192.168.198.1 (the address is that of the expansion board and may vary depending on the actual situation) in the file explorer, and you will see the mapped shared directory:

Drag and drop any file to the desktop to test its read speed:

0016_MPW2_5G_09.jpg

Drag and drop any file to the SSD to test its read speed:

0016_MPW2_5G_10.jpg

Note: Network speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

5.3 Other Applications

The wireless module of the Raspberry Pi 5 can function as a wireless AP or as a wireless WAN port. For the implementation of these applications, please refer to the following link:

1. Use the Raspberry Pi's built-in WiFi as a wireless AP (in master mode)

2. Use the Raspberry Pi's built-in WiFi as a Client

Contact Us

0001_x.jpg 0002_fb.jpg 0004_ytb.jpg 0003_bb.jpg 0005_qq.jpg QQ:8204136

Email: mcuzone@vip.qq.com

Tel: +86(0)13957118045

If there are any omissions, errors, or infringements on this page, please contact us through the above methods. Thank you!

Copyright 2004-2025 Wildchip