2004 CM4 WiFi7 WiFi6 WLANPi EN

来自Mcuzone Wiki

切换语言为中文

Keywords

Raspberry Pi, CM4 Core board, WLAN Pi, WiFi6, WiFi7, BE200, AX210, AX200, RPiOS, Ubuntu, OpenWrt, Gigabit PoE Power Supply

I. Introduction

The CM4_WiFi7-PoE expansion board is a specially designed extension board based on the Raspberry Pi CM4 core board, dedicated to expanding the M.2-E KEY WiFi7 interface.

The CM4_WiFi7 expansion board features an E-KEY interface for external WiFi7 expansion, it includes a Gigabit Ethernet port that supports PoE power input, the board is equipped with a standard-sized HDMI interface supporting 4K output, and it provides one CSI interface. In terms of peripheral expansion, it adds a USB2.0 OTG port in USB Type-C form, supporting OS flashing for the eMMC version of CM4, and can also serve as a USB power supply interface. It also adds three USB 2.0 host interfaces (one featuring a 1.25mm port for CM4-sized 4G module expansion) and a 4-lane CSI interface. In addition, there is a 2.54mm pitch 2x20 GPIO pin header with the same definition as the Raspberry Pi 4B, designed for general peripheral expansion.

Our company also offers two other expansion boards, the CM4_WiFi6 and CM4_WiFi6-PoE, which feature an M.2 A-KEY interface. They have similar functionalities and are used in the same way.

II. Hardware Spec

2004_CM4_WiFi7_70.jpg

2004_CM4_WiFi7_64.jpg

2004_CM4_WiFi7_65.jpg

2004_CM4_WiFi7_66.jpg

2004_CM4_WiFi7_67.jpg

2004_CM4_WiFi7_68.jpg

III. Flash OS

We use the Raspberry Pi OS, the system 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

The CM4 core board with eMMC version only supports booting the OS from eMMC, the onboard TF card is invalid. The CM4 core board without eMMC version supports booting the OS from a TF card.

To flash the core board with eMMC, follow these hardware steps: Connect the USB-C port to the computer. For the CM4 WiFi6 series board, short the BOOT pin with a jumper cap. For the CM4 WiFi7, short both the BOOT and OTG jumpers with jumper caps. After flashing is complete, remove all jumper caps, then power the board to boot the OS.

2004_CM4_WiFi7_69.jpg

The specific method for flashing the OS to a TF card or eMMC, please click here.

IV. Work with Raspberry Pi OS

☆ 4.1 Install WiFi driver

This operation is based on the CM4_WiFi7 paired with the BE200 (WiFi7 module), and it is also applicable to the AX210 and AX200.

For the Raspberry Pi CM4 module with built-in WiFi functionality, after installing the WiFi7/WiFi6 driver, the module's WiFi will automatically shut down and become unusable. Therefore, it is recommended to use only the Raspberry Pi CM4 module without WiFi functionality.

4.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

4.1.2 Download and extract the source code

Execute the command in the terminal:

mkdir wifi && cd wifi

wget http://www.mcuzone.com/wiki/2004_CM4_WiFi7/backport-iwlwifi-20231029.tar.bz2

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

4.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

4.1.4 Compile source code

Execute the command in the terminal:

sudo make -j 4

sudo make install

Note: If the system freezes or reports errors during compilation when using -j 4, please try compiling with -j 2 or -j 1 instead.

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

4.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

☆ 4.2 Test WiFi7(BE200)

4.2.1 View wireless networks

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 :

We perform speed tests using the iperf3 network benchmarking tool.

Download iperf3(Windows version):

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

Install iperf3 on Linux:

sudo apt-get install iperf3

4.2.2 Speed test by connecting to a WiFi6 wireless router

Speed test results from connecting to a WiFi6 gigabit wireless router using a WiFi7 module are as follows:

Client mode reaches around 469Mbps, while server mode achieves about 443Mbps.

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.

4.2.3 Speed test by connecting to a WiFi7 wireless router

Note: Testing is performed via SSH connection to the development board.

The router is a Xiaomi BE6500 Pro (WiFi7 + four-port 2.5G router), and the CM5 WiFi7-PoE is about 1 meter away from the router.

Connect the BE200 to a WiFi7 wireless network and perform an iperf3 speed test with a PC (Windows OS, 2.5G USB Ethernet Adapter, ip: 192.168.8.197) under the same router.

(BE200) 30-thread speed test:

iperf3 -c 192.168.8.197 -P 30

The speed is about 1.81Gbps.

Single-thread speed test:

iperf3 -c 192.168.8.197

The speed is about 456Mbps.

As a comparison, we replaced the WiFi6 wireless module with the AX200 and conducted the same tests.

30-thread speed test:

The speed is about 781Mbps.

Single-thread speed test:

The speed is about 479Mbps.

☆ 4.3 Bluetooth test

CM4_WiFi6-PoE and CM4_WiFi7-PoE enable Bluetooth functionality. Testing is as follows (using BE200 as an example):

The BE200 WiFi7 module comes with a built-in USB Bluetooth interface, but additional Bluetooth driver installation is required for use.

Execute lsusb, and the Bluetooth module of the BE200 is indicated in the red box:

2004_CM4_WiFi7_59.jpg

Install Bluetooth driver

Execute the command in the terminal:

cd Downloads

wget http://www.mcuzone.com/wiki/5001_CM5_WiFi7-PoE/intel.zip

sudo cp intel.zip /lib/firmware/intel && cd /lib/firmware/intel

sudo unzip intel.zip

If there are file name conflicts while extracting, choose "A" (replace all).

5001_CM5_WiFi7-PoE_50.jpg

Then restart the OS:

sudo reboot

Bluetooth test:

Execute the command in the terminal:

hciconfig -a

2004_CM4_WiFi7_60.jpg

It can be seen that there are two devices: hci0 is the built-in Bluetooth of the core board (UART device), and hci1 is the Bluetooth of the BE200 (USB device). Currently, both Bluetooth devices are turned off.

Execute the following command to enable hci1:

rfkill unblock bluetooth

2004_CM4_WiFi7_61.jpg

Click the Bluetooth icon at the top-right of the desktop, then choose "Add Device..." from the menu

5001_CM5_WiFi7-PoE_53.jpg

Put the target device in discoverable mode, and the Bluetooth module will scan and find it shortly. This example uses a Bluetooth mouse:

5001_CM5_WiFi7-PoE_54.jpg

Select the mouse, click "Pair", and it will connect successfully after a short wait.

5001_CM5_WiFi7-PoE_55.jpg

We can operate this mouse in the Raspberry Pi OS.

Execute the command in the terminal:

hcitool -i hci1 con

You can view the status of the devices connected to this Bluetooth.

5001_CM5_WiFi7-PoE_57.jpg

V. Work with Ubuntu OS

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

You can download it in:

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

5.1 WiFi7(BE200) module test

On Ubuntu OS, the BE200 (WiFi7), AX210 (WiFi6E), and AX200 (WiFi6) are all plug-and-play without requiring additional drivers.

For example, with the BE200, the WiFi7 module will appear in the "Wi-Fi" menu at the top right of the screen once the OS boots.

2004_CM4_WiFi7_11.jpg

Select the hotspot to connect, and it will be available after a successful connection.

2004_CM4_WiFi7_12.jpg

Download iperf3(Windows version):

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

Install iperf3 on Linux:

sudo apt-get install iperf3

The speed test results via a WiFi7 module connected to a gigabit wireless router are as follows:

Client mode reaches around 484Mbps, while server mode achieves about 443Mbps.

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 runs very slowly or frequently becomes unresponsive, it is recommended to install the lightweight browser Falkon:

sudo apt install falkon

VI. Work with WLAN Pi

The WLAN Pi is a multifunctional Wi-Fi analysis tool built on single-board computers and open-source software, encompassing both its hardware and OS. The WLAN Pi M4 is developed by further expanding our CM4_WiFi-PoE extension board, so the CM4_WiFi7 extension board can smoothly run the WLAN Pi system.

The WLAN Pi OS version we tested is: v3.2.0-2024-02-19-wlanpi-os.zip;

Download link for WLAN Pi: https://www.wlanpi.com/downloads

The wireless modules compatible with WLAN Pi are:

WiFi6: AX200、AX210

WiFi7: BE200

☆ 6.1 Setup system

6.1.1 Set username and password

After the OS starts up, the default username and password are required for the first login. The default username and password are both wlanpi:

2004_CM4_WiFi7_14.jpg

Note the three characters following the hyphen in the red box: e4d (system-dependent, here it's e4d), then log in to the OS.

2004_CM4_WiFi7_15.jpg

For the first login, you need to change your password. Please enter your old password first, then enter the new password twice:

2004_CM4_WiFi7_16.jpg

6.1.2 Access the built-in server

The WLAN Pi OS starts network services through its built-in server, allowing users to access and operate it via a browser on devices within the local area network.

Requires a wired network connection:

Before OS startup, please insert the Ethernet cable connected to the upstream router into the native network port of the expansion board. After the OS starts, it will automatically obtain an IP address and connect to the network. During startup, the current device information will be displayed.

The IP of eth0 is the OS's internal IP: 192.168.8.103.

☆ 6.2 Enter the console page

After the built-in server successfully connects to the upstream router (no need to log in to the WLAN Pi OS), open the address http://wlanpi-xyz.local in the browser of a device on the local network, where xyz should be replaced with the 3 characters recorded in section 6.3.1. Therefore, in this example, the access address is http://wlanpi-e4d.local.

Note: This address is actually an internal network address, so it cannot be accessed through any proxy software. If you find that the address cannot be connected, in addition to checking the network connection, you should also verify whether the address is being accessed via a proxy. If so, please add it to the proxy software's exception list.

When opened for the first time, it will show "Your connection is not private". Take Chrome as an example, click "Advanced":

Click "Proceed to wlanpi-e4d.local (unsafe)":

Now you can open the console page:

☆ 6.3 Function introduction

6.3.1 Device Information

On the console homepage, the top orange area displays real-time information of the current device.

6.3.2 Speed test

LibreSpeed is a lightweight web-based speed test tool implemented with JavaScript that runs in web browsers. No client application is required.

On the console homepage, click "START" to begin the network speed test.

Click on the top menu "SPEED TEST - LIBRESPEED (DETAILS)", then click "START" to perform a more detailed test.

6.3.3 COCKPIT (Settings interface)

COCKPIT is the graphical configuration interface for the WLAN Pi OS, offering web-based terminal access to manage your WLAN Pi and access advanced features.

Click "COCKPIT" in the top menu to access the login page. Use the WLAN Pi OS's username and password to log in.

After logging in, the interface is as follows:

Here we can configure the WLAN Pi OS.

6.3.4 PROFILER (Wireless packet capture analysis)

PROFILER is a wireless device analyzer that can capture and analyze packets from wireless devices.

After logging into COCKPIT, we click the "Turn on administrative access" button, then enter the administrator password to authorize and gain administrator privileges.

Click on "Tools - Terminal" in the left sidebar to open the terminal window.

Execute in the terminal:

wifichannel 6

Set the wireless frequency to 2.4GHz.

Note: "wifichannel 6" switches the wireless frequency band to 2.4GHz, "wifichannel 5500" switches it to 5GHz, and "wifichannel 229" switches it to 6GHz. Please switch according to actual requirements, ensuring the selected frequency band is supported by the wireless module of the device being analyzed.

Then select the channel. In this example, Channel 12 is selected, but you can choose other channels based on actual requirements. The channel must correspond to the frequency band mentioned above.

sudo profiler -c 12

Now, enable the wireless function on the device to be analyzed (using a mobile phone in this example) and connect to a hotspot named "Profiler xyz" (where "xyz" should be replaced with the 3 characters noted in section 6.3.1). In this case, the hotspot name is "Profiler e4d".

You can enter any password (at least 8 characters) to connect to this hotspot. The connection will drop automatically after a short while, indicating the packet capture for the target device is complete.

After the packet capture is complete, click the "PROFILER - PROFILES" tab at the top to view the captured data of the device for analysis.

Click "PROFILE" to view device packet capture details.

Click "PCAP" to download the packet capture file, or click "CSV" to download the report in CSV format.

6.4.5 Device Network

Click the "NETWORK" tab at the top to view the current device's network information.

6.3.6 KISMET (Wireless network detection and packet sniffing detection)

KISMET is a network detector, packet sniffer, and intrusion detection system for 802.11 wireless LANs. Click the top menu item "KISMET - START" to enable the KISMET service.

Then click on the top menu item "KISMET - LAUNCH KISMET" to open the KISMET login page. The username and password for logging in are the same as those of the WLAN Pi OS.

The interface after logging in is as follows:

Here we can view and analyze nearby scanned wireless devices.

6.3.7 GRAFANA (Wireless and Network Monitoring Platform)

GRAFANA is a powerful open-source data visualization and monitoring platform. We have pre-installed some useful charts, graphs, and alerting features. This allows you to create and import your own dashboards, customizing the WLAN Pi into your ideal wireless and network monitoring platform. Click the top menu item "GRAFANA - START" to enable the GRAFANA service.

After GRAFANA is running, you can see the support information for GRAFANA:

Click on the top menu item "GRAFANA - LAUNCH GRAFANA NEW TAB" to open the GRAFANA login page in a new tab. The username and password for login are both wlanpi.

The interface after logging in is as follows:

We can monitor the nearby networks here.

VII. Power over Ethernet (PoE)

The CM4_WiFi7-PoE and CM4_WiFi6-PoE expansion boards support PoE and can provide a 5V2.4A output. Connect the Ethernet cable from the PoE-capable router to the expansion board’s gigabit Ethernet port to complete the hardware setup, enabling the board to be powered over the cable.

On-board PoE module parameters:

13W (5V 2.4A) Isolated PoE module, supports IEEE 802.3af/at Compliant.

Supports 37-57V input, with a typical value of 48V.

Featuring overheat, short-circuit, and overcurrent protection.

1.5KVrms insulation level.

PSE power supply equipment requirements:

Supports IEEE 802.3af/at Compliant.

Supports at least 20W output.

48V output, 1, 2+ / 3, 6- power supply.

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