2.5 Gbps Ethernet on WLAN Pi M4

WLAN Pi is primarily a Wi-Fi tool, but occasionally I need an iperf server that would be able to deliver more than 1 Gbps of TCP throughput. In a controlled lab environment, I normally use PoE powered NanoPi R5S. I know the IP address of the iperf server by heart. Outside of the lab, I could really do with a WLAN Pi, its preinstalled software, display, buttons and everything it does out of the box. So the question is: “Can we add 2.5 GbE to WLAN Pi M4?”

M.2 slot to the rescue

WLAN Pi M4 doesn’t have any USB 3 ports. How do we add 2.5 Gbps Ethernet to it? If you don’t mind losing the Wi-Fi adapter in favour of 2.5 GbE mGig port, we can install this 2.5 Gbps Ethernet adapter in M4’s PCIe M.2 slot. It is based on Realtek RTL8125B chipset. I paid £17 for it including shipping to the UK.

M.2 A+E KEY 2.5G Ethernet RTL8125B PCI Express Network Adapter

It just works*

To my surprise, it just works*. Yes, I hear you, no one likes these asterisks, do you? 😉 Continue reading, it’s not the end of the story.

WLAN Pi M4 with 2.5 Gbps Ethernet
2.5 Gbps full duplex

The underwhelming default driver

Linux (and WLAN Pi image) has a driver for this adapter, but upload speeds, that is from iperf client to WLAN Pi iperf server, are very poor. We are talking 300 Mbps poor.

Poor 300 Mbps upload speed

Install Realtek’s latest driver to fix performance

Downloading, compiling and installing the latest Linux driver from Realtek’s website fixes the performance issue. We get symmetric 2.35 Gbps of TCP throughput with standard packet size.

2.35 Gbps of iperf3 TCP throughput

Installation of this driver isn’t as straightforward as it might look. I ended using vanilla Raspberry Pi OS image instead of the WLAN Pi one. Mainly because it is not easy to get the kernel headers for WLAN Pi image and we need them to be able to compile the new driver.

Summary

Yes, it is possible to achieve 2.35 Gbps symmetric TCP throughput on the WLAN Pi M4 with this adapter. But you should be aware of these facts:

  • This Ethernet adapter doesn’t fit inside WLAN Pi M4 case
  • You will have to give up the M.2 Wi-Fi adapter in favour of mGig Ethernet
  • From software perspective, the Realtek driver that ships in WLAN Pi image doesn’t unlock full performance of this adapter (iperf client pushing traffic to WLAN Pi iperf server). Installing the latest driver isn’t trivial on WLAN Pi.
  • We, WLAN Pi team, currently don’t support this setup. If you have a use case for 2.5 GbE support on the M4, please let us know.

Published by

Jiri Brejcha

Jiri is passionate about mobility ranging from Wi-Fi to folding bikes;-) He is a Wi-Fi Technical Solutions Architect at Cisco UK, proud member of the Cisco Live Network Operations Center deployment team, and WLAN Pi development team. If he is not working, he is most likely riding his Brompton bike.

Leave a Reply

Your email address will not be published. Required fields are marked *