2001 RPi CM4 Ultra EN:修订间差异

来自Mcuzone Wiki
无编辑摘要
 
(未显示同一用户的12个中间版本)
第1行: 第1行:
[[2001 RPi CM4 Ultra|切换语言为中文]]
== '''Keywords''' ==
== '''Keywords''' ==
Raspberry, CM4 Core board, 2.5G Ethernet, NVME SSD, WiFi6, 5G, RPiOS, eMMC, OpenWrt, Video Capture
Raspberry, CM4 Core board, 2.5G Ethernet, NVME SSD, WiFi6, 5G, RPiOS, eMMC, OpenWrt, Video Capture
第151行: 第153行:
Connect the gigabit Ethernet port to the upstream router, and execute <code>ifconfig -a</code> on the terminal, which displays the following:
Connect the gigabit Ethernet port to the upstream router, and execute <code>ifconfig -a</code> on the terminal, which displays the following:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_128.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_136.jpg


eth0 is a native Gigabit network card and has obtained an IP address.
eth0 is a native Gigabit network card and has obtained an IP address.
第268行: 第270行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_122.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_122.jpg


测试结果:该硬盘的接口速度为360MB/s左右。
The test result shows that the SSD's interface speed is around 360MB/s.


===== 4.2.2.2 Install the SAMBA file sharing service =====
===== 4.2.2.2 Install the SAMBA file sharing service =====
第376行: 第378行:


===== 4.2.2.4 SSD R/W testing over a 2.5G Ethernet port =====
===== 4.2.2.4 SSD R/W testing over a 2.5G Ethernet port =====
将网线插在2.5G网口上,利用SAMBA文件共享服务,对SSD硬盘进行读写测试。
写:


Connect the network cable to the 2.5G Ethernet port, then conduct R/W speed tests on the SSD drive via the SAMBA file sharing service.
Connect the network cable to the 2.5G Ethernet port, then conduct R/W speed tests on the SSD drive via the SAMBA file sharing service.
第500行: 第498行:
In the terminal, execute the command <code>ifconfig -a</code>, and you can see the following network information:
In the terminal, execute the command <code>ifconfig -a</code>, and you can see the following network information:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_118.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_137.jpg


从上图可知,此时千兆有线网卡和5G模组均已获取了ip,我们ping网址成功:
From the figure above, it can be seen that both the Gigabit Ethernet card and the 5G module have obtained IP addresses, and we have successfully pinged the website.


http://www.mcuzone.com/wiki/0024_MP4GUSB/0024_MP4GUSB_02.jpg
<html><img src="http://www.mcuzone.com/wiki/0024_MP4GUSB/0024_MP4GUSB_02.jpg" width=640></html>


但是如果拔掉网线,则ping IP能通,但ping域名不通,如下图所示:
But if you disconnect the network cable, then pinging the IP succeeds, while pinging the domain name fails, as shown in the figure below:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_119.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_119.jpg


因此需要查看下系统的nameserver(即DNS服务器)是否正确。通过下面的命令打开resolv.conf文件:
Therefore, it is necessary to check whether the OS's nameserver (i.e., the DNS server) is correct. Use the following command to open the resolv.conf file:


<code>sudo nano /etc/resolv.conf</code>
<code>sudo nano /etc/resolv.conf</code>
第518行: 第516行:
http://www.mcuzone.com/wiki/0007_Zero_4G_Cat1/0007_Zero_4G_Cat1_17.jpg
http://www.mcuzone.com/wiki/0007_Zero_4G_Cat1/0007_Zero_4G_Cat1_17.jpg


查看此时的nameserver是否正确,如果不正确,请将其改为sim卡的nameserver(通常是其网关地址)或者一些通用的nameserver地址(如114.114.114.114等)。
Please check if the current nameserver is correct. If not, change it to the SIM card's nameserver (usually its gateway address) or some common nameserver addresses (such as 114.114.114.114, etc.).


不过,这种修改方式在系统重启后,resolv.conf文件内的DNS会被修改到默认地址,所以如果需要开机自动启动5G上网,还需要修改resolv.conf文件的权限,因为/etc/resolv.conf实际上是个软链接,所以需要重新生成resolv.conf文件才能修改权限,方法如下:
However, after a system reboot, the DNS entries in the resolv.conf file will revert to the default addresses. Therefore, if you need to enable 5G internet access automatically on startup, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a soft link, you must recreate the resolv.conf file to change its permissions. The method is as follows:


<code>sudo mv /etc/resolv.conf /etc/resolv.conf.link</code>
<code>sudo mv /etc/resolv.conf /etc/resolv.conf.link</code>
第526行: 第524行:
<code>sudo nano /etc/resolv.conf</code>
<code>sudo nano /etc/resolv.conf</code>


这样就重新建立了resolv.conf文件,在这个新建的文件中输入:
This recreates the resolv.conf file. Add the following content to the new file:


<code>nameserver 114.114.114.114</code>
<code>nameserver 114.114.114.114</code>


保存退出,然后执行:
Save and exit, then execute:


<code>sudo chattr +i /etc/resolv.conf</code>
<code>sudo chattr +i /etc/resolv.conf</code>


做完上述步骤后,重启系统,resolv.conf文件的内容也不会变化了。
After performing the above steps, the resolv.conf file will remain unchanged even after a system restart.
==== 4.6.2 网络优先级的修改 ====
如果同时插了网线和5G模块,默认情况下,优先通过5G网络上网。


执行<code>route</code>命令,查看路由表,usb0排在第一位,因此此时是通过5G模块上网:
==== 4.6.2 Modification of Network Priority ====
When both Ethernet and 5G are connected, the default preference is to use the 5G network for internet access.
 
Execute the <code>route</code> command to view the routing table. Since usb0 is listed first, the internet connection is currently through the 5G module.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_129.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_129.jpg


如果要优先使用有线网络上网的话,可以运行命令:
If you want to prioritize the wired network for internet access, you can execute the following command:


<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>
<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>


这两条命令(以“&&”分隔)的解释:
Explanation of these two commands (separated by '&&'):


<code>sudo ip route del default</code>:删除路由表中的默认路由;
<code>sudo ip route del default</code>: Remove the default route from the routing table.


<code>sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>:添加有线网络的网关为新的默认路由(网关地址以实际为准)。
<code>sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>: Add the gateway of the wired network as a new default route (ensure to use the actual gateway address).


执行完毕后,再执行<code>route</code>,查看路由表,目前的默认路由为有线网络的网关(eth0排第一位):
After the execution is completed, execute the <code>route</code> command to view the routing table. The current default route is the gateway of the wired network (eth0 ranks first):


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_130.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_130.jpg


这样网络就默认走有线网络了,如果需要改回默认走5G网络,请运行:
This way, the network will default to using the wired connection. If you need to switch back to defaulting to the 5G network, please execute the following command:
 
<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.42.1</code>
<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.42.1</code>


或者重启系统即可。
Or, you can reboot the system.


其中192.168.42.1为5G模组的默认网关,请以实际为准。
Note that 192.168.42.1 is the default gateway for the 5G module; please refer to the actual configuration.


'''''注意,重启后路由表还是会恢复原状,所以如果重启后要网络继续默认走有线网络,需要再执行一次<code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code>'''''
'''''Note: After a reboot, the routing table resets. To ensure the network continues to use the wired or wireless connection as the default route post-restart, you'll need to execute <code>sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1</code> again.'''''


==== 4.6.3 5G网络网速测试 ====
==== 4.6.3 5G network speed test ====
我们拔掉网线,只剩下5G网络连接,进入[https://www.speedtest.cn/ 测速网站]进行测速。
We unplugged the network cable, leaving only the 5G network connection, and then entered the [https://www.speedtest.cn/ speed test website] to conduct a speed test.


结果如下:
The results are as follows:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_131.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_131.jpg


'''''注意:5G模块网络测速受5G信号和测试方法影响,速度请以实际为准,本测试仅供参考。'''''
'''''Note: The 5G module network speed test is affected by 5G signal and testing methods. The actual speed may vary, and this test is for reference only.'''''


==== 4.6.4 AT命令的使用 ====
==== 4.6.4 AT command operation ====
将5G模块接入扩展板,系统启动后,我们输入<code>lsusb</code>,显示如下:
Connect the 5G module to the expansion board. After the system starts, we enter <code>lsusb</code>, and the display is as follows:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_47.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_47.jpg


记下5G模块的ID:2c7c 0900。
Note down the ID value of the 5G module: 2c7c 0900。


下载minicom工具:
Download minicom:


<code>sudo apt-get install minicom</code>
<code>sudo apt-get install minicom</code>
第587行: 第587行:
http://www.mcuzone.com/wiki/0007_Zero_4G_Cat1/0007_Zero_4G_Cat1_13.jpg
http://www.mcuzone.com/wiki/0007_Zero_4G_Cat1/0007_Zero_4G_Cat1_13.jpg


使用下列命令打开ttyUSB串口,其中echo后面的值就是上面记录的ID值:
Use the following command to enable the ttyUSB serial port of the 5G module, where the value after echo is the ID value recorded earlier:


<code>sudo modprobe option</code>
<code>sudo modprobe option</code>
第595行: 第595行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_48.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_48.jpg


执行下面命令,进入AT命令:
After executing the above two commands, execute the following:


<code>sudo minicom -D /dev/ttyUSB2</code>
<code>sudo minicom -D /dev/ttyUSB2</code>
第601行: 第601行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_49.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_49.jpg


进入minicom后我们输入AT命令进行测试:
After entering minicom, we input AT commands for testing:


如果需要查看回显,请键入命令:<code>ate1</code>,然后回车,继续键入其它命令,回车可以看到结果。
If you need to check the echo, type the command: <code>ate1</code>, then press Enter. Continue typing other commands and press Enter to see the results.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_120.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_120.jpg


常用AT命令:
Common AT commands:


1. 检查SIM卡是否识别到:
1) Check if the SIM card is detected:


<code>at+cpin?</code>
<code>at+cpin?</code>


返回ready表示卡已识别,返回error要检查硬件
If '''ready''' is returned, the card is recognized; if '''error''' is returned, check the hardware.


2. 检查天线信号质量:
2) Check antenna signal quality:


<code>at+CESQ</code>
<code>at+CESQ</code>


3. 检查注网情况:
3) Check network registration status:


<code>at+cops?</code>
<code>at+cops?</code>


正常应该返回运营商代码和一个数字,7代表4G,11代表5G。
Normally, it should return the network supporter's code: 7, where 7 represents 4G, and where 11 represents 5G.


注意,以上命令只有<code>at+CESQ</code>不要加问号,另外两条命令需要加问号。
Note: The above command <code>at+CESQ</code> should not include a question mark, while the other two commands require a question mark.


4. 查看5G模块的IMEI码:
4) View the SIM card's IMEI code:


<code>at+cgsn</code>
<code>at+cgsn</code>


5. 关闭射频:
5) Disable radio frequency:


<code>at+cfun=0</code>
<code>at+cfun=0</code>


开启射频:
Enable radio frequency:


<code>at+cfun=1</code>
<code>at+cfun=1</code>


上述两条命令成对使用,可以在不重启5G模组的情况下让模组重新注网。
The two commands mentioned above can be used in pairs to allow the module to re-register with the network without restarting the 5G module.


6. 切换SIM卡
6) Switch SIM card


使用SIM1(丝印标识):
Use SIM1 (silkscreen marking):


<code>AT+QUIMSLOT=1</code>
<code>AT+QUIMSLOT=1</code>


使用SIM2(丝印标识):
Use SIM2 (silkscreen marking):


<code>AT+QUIMSLOT=2</code>
<code>AT+QUIMSLOT=2</code>


切换时如果原来的卡槽有卡,Windows会提示卡弹出,请将模块断电,把卡插到另一个卡槽,然后重新上电;如果切换过去的卡槽有卡,则可直接使用。
When switching slots, if the original slot has a card, Windows will prompt for ejection. Power off the module, move the card to the other slot, and restart. If the target slot already contains a card, it will work directly.


7. USB口和以太网口不可同时使用,可以通过AT命令切换:
7) The USB port and Ethernet port cannot be used simultaneously, and can be switched via AT commands:


使用USB口:
Use USB port:


<code>AT+QMAPWAC=0</code>
<code>AT+QMAPWAC=0</code>


使用以太网口:
Use Ethernet port:


<code>AT+QMAPWAC=1</code>
<code>AT+QMAPWAC=1</code>


=== 4.7 WiFi6测试 ===
=== 4.7 WiFi6 test ===
树莓派CM4支持WiFi6(AX200)和WiFi6E(AX210)模块,都需要安装驱动才能使用。驱动的安装步骤如下:
The CM4_Ultra expansion board supports WiFi 6 (AX200) and WiFi 6E (AX210) modules, both of which require driver installation to function. The steps for installing the drivers are as follows:


==== 4.7.1 安装驱动 ====
==== 4.7.1 Install driver ====
首先要更新系统和头文件,打开树莓派终端,输入<code>sudo apt-get update</code>,更新系统:
First, update the system and header files. Open the terminal and execute <code>sudo apt-get update</code> to update the system:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_29.jpg
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_29.jpg" width=660></html>


然后输入<code>sudo apt-get upgrade</code>
Then input: <code>sudo apt-get upgrade</code>


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_30.jpg
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_30.jpg" width=660></html>


最后输入<code>sudo apt-get install raspberrypi-kernel-headers</code>安装头文件:
Finally, execute <code>sudo apt-get install raspberrypi-kernel-headers</code> to install the header files.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_31.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_31.jpg


把wifi驱动源码下载至本地,输入:
Download the WiFi driver source code to your local machine:


<code>git clone <nowiki>https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git</nowiki></code>
<code>git clone <nowiki>https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git</nowiki></code>
第685行: 第685行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_32.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_32.jpg


下载完成后,<code>cd backport-iwlwifi</code>进入源码文件夹,输入<code>make defconfig-iwlwifi-public</code>,输出.config配置文件:
After downloading, <code>cd backport-iwlwifi</code> to enter the source directory, then run <code>make defconfig-iwlwifi-public</code> to output the <code>.config</code> file.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_33.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_33.jpg


输入:
Execute:


<code>sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/<nowiki>#</nowiki> CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config</code>
<code>sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/<nowiki>#</nowiki> CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config</code>
第695行: 第695行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_34.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_34.jpg


输入<code>make -j4</code>,此处-j4表示用四核进行编译,如果出现死机卡死的情况,可以尝试用-j1或者-j2进行编译:
Execute <code>make -j4</code>, where <code>-j4</code> indicates compiling with four cores. If the system freezes or gets stuck, you can try compiling with <code>-j1</code> or <code>-j2</code>.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_35.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_35.jpg


编译完成后,输入<code>sudo make install</code>进行驱动安装:
After compiling, execute <code>sudo make install</code> to install the driver:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_36.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_36.jpg


安装完毕后提示重启,请先不要重启。
After the installation is complete, you will be prompted to restart. Please do not restart yet.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_45.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_45.jpg


==== 4.7.2 安装固件 ====
==== 4.7.2 Install firmware ====
不同的模组,固件不一样,我们这里用的是AX210.
Different modules have different firmware, and the one we use here is the AX210.


依次在树莓派终端执行:
Execute the following commands in the terminal one by one:


<code>cd ..</code>
<code>cd ..</code>
第724行: 第724行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_37.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_37.jpg


然后输入<code>cd /lib/firmware</code>,再输入<code>ls /lib/firmware iwl*.*</code>,若有iwlwifi-ty-a0-gf-a0-59.ucode这个文件,即表明固件安装成功:
Then enter `cd /lib/firmware`, followed by `ls /lib/firmware iwl*.*`. If the file `iwlwifi-ty-a0-gf-a0-59.ucode` is listed, it indicates that the firmware has been successfully installed.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_38.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_38.jpg


==== 4.7.3 测试WiFi6模块 ====
==== 4.7.3 Test WiFi6 module ====
固件安装完成后,重启系统,点击桌面右上角网络图标,然后点击“Click here to set Wi-Fi country”:
After the firmware installation is complete, restart the system, click the network icon in the upper right corner of the desktop, and then click "Click here to set Wi-Fi country".


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_39.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_39.jpg


我们选择CN:
We select CN:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_40.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_40.jpg


再次重启系统,然后在桌面右上角手动连接WiFi,输入密码:
Restart the system again, then manually connect to the WiFi in the upper right corner of the desktop and enter the password:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_41.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_41.jpg
第743行: 第743行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_42.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_42.jpg


显示WiFi成功连接后,查看网络参数:
Once WiFi is connected successfully, view the network parameters:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_43.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_43.jpg
第749行: 第749行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_44.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_44.jpg


在树莓派终端执行<code>ifconfig -a</code>,也可以查看网络参数(wlan0):
Executing <code>ifconfig -a</code> in the terminal can also display network parameters (wlan0).


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_46.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_46.jpg


== '''五、OpenWrt系统操作''' ==
== '''V. Work with OpenWrt''' ==
我们测试使用的OpenWrt系统版本为:openwrt-bcm27xx-bcm2711-rpi-4-squashfs-sysupgrade-linux-6.1.98-20240723.img.gz 此系统已经包含wifi6驱动和我们公司配套5G模组驱动。
The OpenWrt version we used for testing is: openwrt-bcm27xx-bcm2711-rpi-4-squashfs-sysupgrade-linux-6.1.98-20240723.img.gz. This system already includes the WiFi6 driver and the driver for our company's compatible 5G module.


CM4_Ultra扩展板在OpenWrt系统下可配置为一进一出的交换机模式,扩展板上的原生千兆口作为WAN口(连接Internet),2.5G网口配置为LAN口,用于连接PC。
The CM4_Ultra expansion board can be configured in OpenWrt as a one-in-one-out switch mode, with the native Gigabit port on the expansion board serving as the WAN port (connected to the Internet) and the 2.5G Ethernet port configured as the LAN port for connecting to a PC.


=== 5.1 登录系统 ===
=== 5.1 Login system ===
将扩展板上的原生千兆口连接网线至PC网口,系统上电启动后,我们在Windows设置中找到网络和Internet,在以太网中打开连接的网络查看默认网关的IP地址,这个地址就是OpenWrt系统的后台配置页面地址,如图所示,本文测试的地址为192.168.198.1:
Connect the native Gigabit port on the expansion board to the PC's Ethernet port. After powering on the system, go to Network & Internet settings in Windows, open the connected network under Ethernet, and check the default gateway IP address. This address is the backend configuration page address of the OpenWrt. As shown in the figure, the tested address in this article is 192.168.198.1:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_53.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_53.jpg


然后打开网页浏览器输入192.168.198.1进入OpenWrt系统。默认用户名为<code>root</code>,默认密码为<code>password</code>
Then open a web browser, enter '''192.168.198.1''' to access the OpenWrt system. The default username is '''<code>root</code>''', and the default password is '''<code>password</code>'''.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_54.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_54.jpg


=== 5.2 设置网络接口 ===
=== 5.2 Network interface configuration ===
打开“网络 - 接口”,点击“添加新接口”:
Open "Network - Interfaces", then click "Add new interface":


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_55.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_55.jpg


接口名称设置为“WAN”,接口协议选择“DHCP客户端”,接口选择“eth0”后点击“提交”按钮:
Set the interface name to "WAN", select "DHCP client" for the interface protocol, choose "eth0" for the interface, and then click the "Submit” button.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_56.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_56.jpg


在防火墙设置中选择WAN口后点击“保存”按钮。注意不要点“保存&应用”按钮:
In the firewall settings, choose the WAN port and click "Save". Do not click "Save & Apply".


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_57.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_57.jpg


然后点击“返回至概况”按钮,在接口处点击LAN口的“修改”按钮:
Then click the "Return to Overview" button, and at the interface, click the "Modify" button for the LAN port.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_58.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_58.jpg


在物理设置中将接口改为eth1:
In the physical settings, change the interface to eth1:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_59.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_59.jpg


随后点击“保存&应用”按钮,网络配置就完成了。
Then click the "Save & Apply" button, and the network configuration will be completed.


=== 5.3 2.5G网口测试 ===
=== 5.3 2.5G Ethernet port test ===
网络配置完成后,原生千兆网口就变成了WAN口,2.5G网口就变成了LAN口,将与电脑连接的网线切换到2.5G网口,再将原生千兆网口接到上级路由器。进入OpenWrt页面,点击“系统-TTYD终端”,登录后(默认用户名为<code>root</code>,默认密码为<code>password</code>)输入<code>ifconfig -a</code>查看IP地址:
After the network configuration is completed, the native Gigabit Ethernet port becomes the WAN port, and the 2.5G port becomes the LAN port. Switch the Ethernet cable connected to the computer to the 2.5G port, then connect the native Gigabit port to the upstream router.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_60.jpg
Access the OpenWrt page, click on "System - TTYD Terminal", after logging in (the default username is '''<code>root</code>''', and the default password is '''<code>password</code>'''), enter <code>ifconfig -a</code> to check the IP address.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_62.jpg
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_60.jpg" width=640></html>


其中eth0是2.5G网卡,eth1千兆网卡。
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_62.jpg" width=640></html>


也可以在“网络 - 接口”查看网口信息:
Here, eth0 is a 2.5G network card, and eth1 is a Gigabit network card.
 
You can also check the network port information under "Network - Interfaces".


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_61.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_61.jpg


接下来我们在TTYD终端使用iperf3测速软件(系统自带),与PC之间进行测速:
Next, we will use the iperf3 speed testing software (pre-installed in the system) on the TTYD terminal to conduct speed tests between the device and the PC:


扩展板作为client时:
When the expansion board acts as the client:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_63.jpg
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_63.jpg" width=640></html>


扩展板作为server时:
When the expansion board acts as the server:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_64.jpg
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_64.jpg" width=640></html>


'''''注意:网络测速受网络环境和测试方法影响,速度请以实际为准,本测试仅供参考。'''''
'''''Note: Network speed test results are influenced by network conditions and testing methods. Actual speeds may vary, and this test is for reference only.'''''


=== 5.4 SSD硬盘测试 ===
=== 5.4 SSD test ===
登录后台页面后,进入“系统 - 挂载点”,我们可以看到SSD硬盘已经被自动挂载:
After logging into the admin panel, go to "System > Mount Points" to see the SSD automatically mounted.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_71.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_71.jpg


点击“网络存储-网络共享”,注意有可能会有两个“网络共享”,要进标注Samba的网络共享,而不是Ksmbd的网络共享!
Click on "Network Storage - Network Sharing". Be aware that there may be two "Network Sharing" options; choose the one marked Samba, not Ksmbd!


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_72.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_72.jpg


添加一个共享目录,目录为硬盘挂载的地址:
Add a shared directory, with the directory being the mounted drive's address:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_73.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_73.jpg


随后点击“保存&应用”按钮。
Then click the "Save & Apply" button.


设置完毕后在资源管理器中输入<code>\\192.168.198.1</code>(地址为扩展板的地址,视实际情况而不同),我们就能看到那个共享目录了:
After the setup is complete, enter <code>\\192.168.198.1</code> (the address is that of the extension board; it may vary in practice) in the file explorer, and you will see the shared directory.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_74.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_74.jpg


将任意文件拖拽到桌面进行读取速度测试:
Drag any file to the desktop to test read speed:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_75.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_75.jpg


将任意文件拖拽到SSD进行写入速度测试:
Drag and drop any file onto the SSD to test write speed:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_76.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_76.jpg


'''''注意:测试速度受网络状况、硬盘质量、硬盘上的文件存储情况等多种因素影响,以上测试结果仅供参考,不作为实际产品的最终参数。'''''
'''''Note: Test speeds are affected by various factors such as network conditions, hard drive quality, file storage status on the drive, etc. The above test results are for reference only and do not serve as final parameters for the actual product.'''''


如果在访问共享时Windows提示无法访问:
If Windows prompts that access is denied when trying to access a shared resource:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_77.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_77.jpg


需要修改Windows网络策略。按window+R键输入gpedit.msc 来启动本地组策略编辑器。依次找到“计算机配置 - 管理模板 - 网络 - Lanman工作站”这个节点,在右侧内容区可以看到“启用不安全的来宾登录”这一条策略设置。状态是“未配置”:
The Windows network policy needs to be modified. Press Windows + R, then type gpedit.msc to launch the Local Group Policy Editor. Go to Computer Configuration → Administrative Templates → Network → Lanman Workstation step by step. In the right content area, you can see the policy setting "Enable insecure guest logons". The status is '"Not configured".


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_78.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_78.jpg


双击“启用不安全的来宾登录”这一条策略设置,将其状态修改为“已启用”并单击确定按钮:
Please double-click the policy setting "Enable insecure guest logons", set its status to "Enabled," and click the OK button.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_79.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_79.jpg


设置完成再次尝试访问发现可以正常访问了。
After setup, I retried and could access it successfully.


=== 5.5 WiFi6模块测试 ===
<!--=== 5.5 WiFi6模块测试 ===


==== 5.5.1 设置WiFi6 ====
==== 5.5.1 设置WiFi6 ====
第908行: 第910行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_93.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_93.jpg


无线AP名称可以自己定义,我们这里取名“ AX210”:http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_94.jpg
无线AP名称可以自己定义,我们这里取名“ AX210”:
 
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_94.jpg


点击“保存&应用”,随后点击“网络 - 接口”,删除WWAN:
点击“保存&应用”,随后点击“网络 - 接口”,删除WWAN:
第936行: 第940行:
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_100.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_100.jpg


'''''注意:网络测速受网络环境和测试方法影响,速度请以实际为准,本测试仅供参考。'''''
'''''注意:网络测速受网络环境和测试方法影响,速度请以实际为准,本测试仅供参考。'''''-->
=== 5.5 5G模块测试 ===
Insert the 5G module (this document uses the RM500U-CN as an example) and the SIM card, then connect from the computer to the 2.5G port, leaving the native Gigabit port unconnected.


=== 5.6 5G模块测试 ===
Start the system, click on "System - TTYD Terminal," log in, and enter <code>ifconfig -a</code> to check the network interfaces.
插上5G模块(本文档使用RM500U-CN为例)和sim卡,将与电脑连接的网线插到2.5G网口,原生千兆网口不插网线。


启动系统,点击“系统-TTYD终端”,登录后输入<code>ifconfig -a</code>查看网卡:
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_102.jpg" width=640></html>


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_102.jpg
<html><img src="http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_103.jpg" width=640></html>


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_103.jpg
You can see there is a network interface named usb0, which is the 5G module, but it has no IP address.


可以看到有一个名为usb0的网卡即为5G模组,但是无IP地址。
Go to "Network → Interfaces", and click "Add new interface":
 
进入“网络 - 接口”,点击“添加新接口”:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_108.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_108.jpg


按下图配置,添加一个新接口,本文档为其命名为“5GWAN”:
Please configure according to the diagram below to add a new interface, which this document names "5GWAN":


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_109.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_109.jpg


点击“提交”,然后进入“防火墙设置”,将防火墙区域设置为“WAN”:
Click "Submit", then go to "Firewall Settings" and set the firewall zone to "WAN".


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_110.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_110.jpg


然后点击“保存&应用”,成功后返回“网络 - 接口”,此时我们就能看到5G模块已经获取到了IP地址,PC也能通过该5G模块上网:
Then click "Save & Apply". After it succeeds, return to "Network - Interfaces". At this point, you will see that the 5G module has obtained an IP address, and the PC can access the internet through this 5G module.


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_111.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_111.jpg


在PC上测试网速结果如下:
[https://www.speedtest.cn/ The internet speed test] results on the PC are as follows:


http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_112.jpg
http://www.mcuzone.com/wiki/2001_CM4_Ultra/2001_CM4_Ultra_112.jpg


'''''注意:网络测速受网络环境和测试方法影响,速度请以实际为准,本测试仅供参考。'''''
'''''Note: Network speed test results are affected by the network environment and testing methods. The actual speed may vary, and this test is for reference only.'''''


== '''六、功耗测试信息''' ==
== '''VI. Power consumption test information''' ==
{| class="wikitable"
{| class="wikitable"
|+此功耗测试是用USB-C口接5V3A电源
|+'''This power consumption test uses a USB-C port connected to a 5V 3A power supply'''
!
!系统待机功耗
!使用时的功耗
!
!
!'''Standby powerconsumption'''
!'''Power usage''' '''during system operation'''
!
!
!模块之间相互使用
!Modules use each other
!系统功耗
!'''System powerconsumption'''
|-
|-
|不接外设
|No external devices
|0.756A
|0.756A
|
|
|
|
|
|Transferring files from the computer to the SSD over WiFi6
|WiFi6从电脑写文件到SSD
|1.25A
|1.25A
|-
|-
|单独接5G
|Use 5G only
|0.9A
|0.9A
|1.9A(测速时)
|1.9A (test speed)
|
|
|
|WiFi6从SSD拖文件到电脑
|Transferring files from the SSD to the computer over WiFi6
|1.72A
|1.72A
|-
|-
|单独接SSD
|Use SSD only
|0.847A
|0.847A
|
|
|
|
|
|Transferring files from the SSD to the computer over 2.5G
|2.5G从SSD拖文件到电脑
|1.588A
|1.588A
|-
|-
|单独接WiFi6
|Use WiFi6 only
|0.83A
|0.83A
|1.15A
|1.15A
|
|
|
|Transferring files from the computer to the SSD over 2.5G
|2.5G从电脑写文件到SSD
|1.668A
|1.668A
|-
|-
|外设全接
|All devices connected
|1.15A
|1.15A
|
|
|
|
|
|Download files from webpages to SSD over 5G
|5G从网页下载文件到SSD
|1.88A
|1.88A
|}
|}


'''''注意:上述数据为本公司的测试数据,仅供参考。'''''
'''''Note: The above data is our company's test data and is for reference only.'''''


{{联系我们_图标}}
{{Contact_Us_icon}}


[http://wiki.mcuzone.com/index.php?title=2001_RPi_CM4_Ultra%E6%89%A9%E5%B1%95%E6%9D%BF T]
[http://wiki.mcuzone.com/index.php?title=2001_RPi_CM4_Ultra%E6%89%A9%E5%B1%95%E6%9D%BF T]

2025年3月31日 (一) 17:09的最新版本

切换语言为中文

Keywords

Raspberry, CM4 Core board, 2.5G Ethernet, NVME SSD, WiFi6, 5G, RPiOS, eMMC, OpenWrt, Video Capture

I. Introduction

The CM4_Ultra expansion board is an expansion board designed based on the Raspberry Pi CM4 core board. It expands the single PCIe interface of the CM4 into four PCIe interfaces using a switch chip. The CM4_Ultra expansion board features one PCIe M.2 M-KEY interface for connecting an NVMe SSD, one PCIe 2.5G Ethernet port, one PCIe M.2 A-KEY interface for connecting WiFi 6, and one PCIe expansion for USB 3.0. Additionally, one of the USB 3.0 ports is connected to an M.2 B-KEY interface for external 5G expansion. The expansion board supports all versions of the Raspberry Pi CM4 core board. The expansion board is ideally suited for a variety of applications requiring high-speed data acquisition, processing, and communication, such as WiFi 6 testing terminals, remote image and video capture systems, live streaming, vehicle infotainment systems, TBOX-like vehicle data access devices, integrated media players, facial recognition, soft routers, gateways, remote image transmission, edge computing, and more.

II. Hardware Spec

Power Supply 1*DC input, wide voltage range of 7-24V, DC5.5-2.1 connector.

1*USB-C 5V3A port, supports PD charger; two power sources cannot be used simultaneously.

Nerwork 1*native Gigabit Ethernet port.

1*PCIe 2.5G Ethernet port (RTL8125 chip).

1*PCIe M.2 A-KEY interface for expanding WiFi 6.

1*USB 3.0 M.2 B-KEY interface for connecting 5G, with a Nano SIM card slot and onboard 4 SMA antenna connectors.

Storage 1*PCIe M.2 M-KEY slot, supporting 2280-sized NVMe SSD, does not support SATA/GNFF drives.

1*TF card slot, used for booting the system with the lite version of the Raspberry Pi CM4 core board; if using the CM4 core board with eMMC, this TF card slot will be unavailable.

USB Ports 2*USB 3.0-A host ports.

1*USB 2.0 port, 1.25mm-4P.

1*USB OTG port (USB-A), also the programming port for the eMMC core board.

Display 1*standard HDMI port supporting 4K resolution.

1*DSI1 (22PIN, 0.5mm, flip-down connection).

Camera 2*CSI1(22PIN, 0.5mm, flip-down connection).
Others 2*fan power supplies, 2.54mm-2P, 5V and 3.3V.

1*boot jumper, 2.54mm-2P, for flashing the eMMC core board.

40PIN GPIO, 2.54mm 20*2, fully compatible with the GPIO pins of Raspberry Pi 4B.

Size 111*135mm, immersion gold process, lead-free production, PCB board certified by UL and ROHS, flame retardant rating 94V-0.

Optional aluminum alloy case with 4 fixing holes for easy equipment installation, case size: 114*154*31mm.

The pin definitions for the 40-pin connector, from left to right:

5V 5V GND G14 G15 G18 GND G23 G24 GND G25 G08 G07 IDSC GND G12 GND G16 G20 G21
3V3 G02 G03 G04 GND G17 G27 G22 3V3 G10 G09 G11 GND IDSD G05 G06 G13 G19 G26 GND

2001_CM4_Ultra_114.jpg

III. System flashing

Raspberry Pi OS: 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 Boot from TF card

If the Raspberry Pi CM4 core board does not have eMMC, the system will boot from the TF card.

Click here to the burning method instructions

3.2 Boot from eMMC

If the Raspberry Pi CM4 core board has onboard eMMC, it can only boot from the eMMC, and the onboard TF card will be ineffective.

First, you need to install the driver package for the Raspberry Pi CM4 core board on your PC. You can download it from the official Raspberry Pi website or from our company's website:

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

Then, use a jumper cap to short the BOOT pin and the GND pin, and connect the USB 2.0 OTG interface on the expansion board to the computer using a USB Type-A cable (as shown in the figure below):

2001_CM4_Ultra_117.jpg

After connecting to the computer, open the Device Manager, and a new USB device will appear. In the image below, the USB device is named "BCM2711 Boot".

2007_CM4_LoRa_4G_63.jpg

Under the All Programs section of the PC's Start menu, there is an rpiboot under Raspberry Pi.

2001_CM4_Ultra_66.jpg

Open this software, and the computer will format and partition the eMMC or TF card.

2001_CM4_Ultra_68.jpg

Wait a moment, and a partition will appear in the file explorer (in this example, the partition is named bootfs, but the actual name may var

2001_CM4_Ultra_67.jpg

Next, we can use the balenaEtcher to flash the image to this partition.

Please open the balenaEtcher software, click on the first option "Flash from file," and select the file you want to flash to the eMMC. For the second option, choose the bootfs partition mentioned above, then click "Flash now" to start the flashing process.

2007_CM4_LoRa_4G_61.jpg

2007_CM4_LoRa_4G_62.jpg

After the burning process is completed, we need to remove the previously inserted short-circuit cap (otherwise the core board will not start properly), then power it on again to boot the system.

IV. Work with Raspberry Pi OS

4.1 Ethernet test

4.1.1 Ethernet connection

Connect the gigabit Ethernet port to the upstream router, and execute ifconfig -a on the terminal, which displays the following:

2001_CM4_Ultra_136.jpg

eth0 is a native Gigabit network card and has obtained an IP address.

eth1 is an extended 2.5G network card, but since no network cable is plugged in, it has not acquired an IP address.

4.1.2 2.5G Ethernet speed test

We plug the Ethernet cable into the 2.5G port, and the system will automatically obtain an IP address. Then, we open the terminal and install the speed-testing tool iperf3.

sudo apt-get install iperf3

2001_CM4_Ultra_01.jpg

2.5G Ethernet speed test results:

2.15Gbps (client mode).

2001_CM4_Ultra_02.jpg

1.75Gbps (server mode).

Note: The speed test results of 2.5G networks are affected by network conditions and testing methods. The actual speed may vary, and this test is for reference only.

4.1.3 Gigabit Ethernet speed test

We plug the network cable into the native Gigabit Ethernet port, and the system will automatically obtain an IP address. Then, we open the terminal and test using iperf3.

Native Gigabit Ethernet speed test results:

940Mb/s (client mode).

2001_CM4_Ultra_04.jpg

Note: The speed test results of 2.5G networks are affected by network conditions and testing methods. The actual speed may vary, and this test is for reference only.

4.2 SSD test

4.2.1 Basic operations of SSD drives

NVMe SSDs are for data storage only and cannot be used as a system boot drive.

In Raspberry Pi OS, when you open the File Manager, you can see the partitions of the SSD. The screenshot is shown below:

2001_CM4_Ultra_06.jpg

To operate the SSD, click the partition icon, enter the system password, and then click "Authenticate". After successful authorization, you can perform operations on the SSD.

2001_CM4_Ultra_07.jpg

Now, when you return to the desktop, you will see the shortcut icon for the SSD partition.

2001_CM4_Ultra_08.jpg

You can also enter df in the terminal to see the SSD partition and its mounting information. We can use this SSD as a storage device.

2001_CM4_Ultra_09.jpg

If you need to perform operations such as partitioning and permanently mounting an SSD, please refer to this page.

4.2.2 SSD speed test

4.2.2.1 SSD interface speed test

We use the hdparm to test the SSD drive interface speed.

Install the hdparm software:

sudo apt install hdparm

Run the command multiple times to test the SSD speed repeatedly.

sudo hdparm -t /dev/nvme0n1

2001_CM4_Ultra_122.jpg

The test result shows that the SSD's interface speed is around 360MB/s.

4.2.2.2 Install the SAMBA file sharing service

SAMBA is a software for sharing files between Windows and Linux. We can use it to transfer files between Windows and Raspberry Pi via Ethernet, which allows us to test network speed.

Install SAMBA:

sudo apt install samba

2005_CM4_NAS_22.jpg

Create a new folder under the SSD path for sharing files and modify the folder permissions.

cd /media/mcuzone/writable

sudo mkdir ssdfiles

sudo chmod +777 ssdfiles

2005_CM4_NAS_23.jpg

Modify the SAMBA configuration file to add a shared node.

sudo mousepad /etc/samba/smb.conf

Add the shared node at the end of the file:

[ssd]

# Shared folder instruction

comment = ssd

# Shared Folder Directory

path = /media/mcuzone/writable/ssdfiles/

# Mount path of the shared directory that needs to be mapped

browseable = yes

# Resource name publicly visible (content hidden, set to 'Yes')"

writable = yes

# Writable

create mask = 0777

# New files are created with 777 permissions.

directory mask = 0777

# New files are created with 777 permissions.

public = no

# Guest access without a password (set to "No" here)

2005_CM4_NAS_24.jpg

Note: If you need to add more mapped folders, please continue adding new shared nodes in the same format, ensuring that the shared folder description and shared folder directory are not duplicated. The local path should be filled in according to the mounted path.

Create a user named mcuzone1; you will be prompted to set a password afterward.

sudo smbpasswd -a mcuzone

2005_CM4_NAS_25.jpg

Restart SAMBA:

sudo systemctl restart smbd

2005_CM4_NAS_26.jpg

Then, map a network drive in Windows, using Windows 11 as an example here.

Open "This PC", then click "Map network drive".

2005_CM4_NAS_27.jpg

Fill in the relevant node information according to the diagram below (the IP is the Raspberry Pi OS IP):

2005_CM4_NAS_28.jpg

Enter the username and password you just set:

2005_CM4_NAS_29.jpg

Then, the shared folder that was set up was opened.

2005_CM4_NAS_32.jpg

Note: Before setting up a shared folder, you must grant permission to the SSD partition in the Raspberry Pi OS. Otherwise, you will encounter a "network name not found" error when configuring the shared folder.

4.2.2.3 SSD R/W testing over a Gigabit Ethernet port

Connect the network cable to the Gigabit Ethernet port, then conduct R/W speed tests on the SSD drive via the SAMBA file sharing service.

Write:

2001_CM4_Ultra_124.jpg

Read:

2001_CM4_Ultra_125.jpg

4.2.2.4 SSD R/W testing over a 2.5G Ethernet port

Connect the network cable to the 2.5G Ethernet port, then conduct R/W speed tests on the SSD drive via the SAMBA file sharing service.

Write:

2001_CM4_Ultra_126.jpg

Read:

2001_CM4_Ultra_127.jpg

Note: The speed of the SSD drive test is influenced by various factors such as network conditions, hard drive quality, file storage status, and OS environment. The above test results are for reference only and should not be considered as the final parameters of the actual product. In practical tests, the read speed can reach up to 270MB/s.

4.3 DSI test

The official Gen 1 Raspberry Pi LCD screen needs separate power and requires an adapter board and DSI-compatible expansion board.

After connecting, power on the board. Wait for the OS to run, then open the terminal and execute the following commands

sudo nano /boot/firmware/config.txt

2001_CM4_Ultra_16.jpg

Add the following statements at the end of the file:

dtoverlay=vc4-kms-dsi-7inch

2001_CM4_Ultra_17.jpg

After saving, restart the OS to use the official Raspberry Pi 7-inch touchscreen.

Upon restart, execute the following commands in the terminal in order.

wget http://www.mcuzone.com/wiki/2001_CM4_Ultra/Brightness.zip

unzip Brightness.zip

cd Brightness

sudo chmod +x install.sh

./install.sh

2001_CM4_Ultra_18.jpg

Then you can open the Brightness window from the Accessories menu to adjust the backlight of the 7-inch screen.

2001_CM4_Ultra_19.jpg

2001_CM4_Ultra_20.jpg

4.4 CSI test

We tested using the OV5467 camera, connecting it to either the CSI0 or CSI1 interface. After connecting, power on the board, open the terminal, and execute the following commands:

sudo nano /boot/firmware/config.txt

2001_CM4_Ultra_16.jpg

Add the following statements at the end of the file:

dtoverlay=ov5647,cam0

dtoverlay=ov5647,cam1

2001_CM4_Ultra_21.jpg

In actual use, add the configuration according to your model, save the changes, and then restart the system to enable the OV5647 camera.

After rebooting, execute the following command in the terminal:

ls /dev

You can then see the video0 and video1 devices (inserting one camera displays video0, inserting two cameras displays video0 and video1, regardless of whether they are connected to CSI0 or CSI1).

2001_CM4_Ultra_22.jpg

To preview the camera feed, execute libcamera-hello --camera 0 or libcamera-hello --camera 1 in the terminal (a single connected camera is camera 0, while two cameras are assigned as camera 0 and camera 1).

2001_CM4_Ultra_23.jpg

2001_CM4_Ultra_24.jpg

If a photo is required, please execute:

libcamera-jpeg -o test.jpg

2001_CM4_Ultra_25.jpg

Save the photo in the /home/mcuzone directory (i.e., the user's home directory). The photo effect is as follows:

2001_CM4_Ultra_26.jpg

4.5 USB test

After the system boots up, we plug the wireless keyboard and mouse into the OTG interface, insert two USB 3.0 SD card readers into the USB 3.0 ports, and enter lsusb to check the USB devices.

2001_CM4_Ultra_115.jpg

Bus 002 Device 003: USB3.0-A, USB3.0 SD card reader.

Bus 002 Device 004: USB3.0-A, USB3.0 SD card reader.

Bus 003 Device 002: USB2.0-A (OTG) interface, wireless keyboard and mouse.

Verify that all identifications are normal; then run lsusb -t to check the USB ports' operating mode.

2001_CM4_Ultra_116.jpg

Bus 02: 5000M USB interface (USB 3.0).

Bus 03: 480M USB interface (USB 2.0).

All operating modes are functioning normally.

4.6 5G module test

Testing based on the Quectel 5G module RM500U-CN. The 5G module is now configured, working plug-and-play with the official Raspberry Pi OS.

(If the user has their own 5G module, they need to configure it themselves or integrate the driver, otherwise plug-and-play will not be possible, and this section cannot be referenced.)

4.6.1 5G test

In the terminal, execute the command ifconfig -a, and you can see the following network information:

2001_CM4_Ultra_137.jpg

From the figure above, it can be seen that both the Gigabit Ethernet card and the 5G module have obtained IP addresses, and we have successfully pinged the website.

But if you disconnect the network cable, then pinging the IP succeeds, while pinging the domain name fails, as shown in the figure below:

2001_CM4_Ultra_119.jpg

Therefore, it is necessary to check whether the OS's nameserver (i.e., the DNS server) is correct. Use the following command to open the resolv.conf file:

sudo nano /etc/resolv.conf

0007_Zero_4G_Cat1_16.jpg

0007_Zero_4G_Cat1_17.jpg

Please check if the current nameserver is correct. If not, change it to the SIM card's nameserver (usually its gateway address) or some common nameserver addresses (such as 114.114.114.114, etc.).

However, after a system reboot, the DNS entries in the resolv.conf file will revert to the default addresses. Therefore, if you need to enable 5G internet access automatically on startup, you will also need to modify the permissions of the resolv.conf file. Since /etc/resolv.conf is actually a soft link, you must recreate the resolv.conf file to change its permissions. The method is as follows:

sudo mv /etc/resolv.conf /etc/resolv.conf.link

sudo nano /etc/resolv.conf

This recreates the resolv.conf file. Add the following content to the new file:

nameserver 114.114.114.114

Save and exit, then execute:

sudo chattr +i /etc/resolv.conf

After performing the above steps, the resolv.conf file will remain unchanged even after a system restart.

4.6.2 Modification of Network Priority

When both Ethernet and 5G are connected, the default preference is to use the 5G network for internet access.

Execute the route command to view the routing table. Since usb0 is listed first, the internet connection is currently through the 5G module.

2001_CM4_Ultra_129.jpg

If you want to prioritize the wired network for internet access, you can execute the following command:

sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1

Explanation of these two commands (separated by '&&'):

sudo ip route del default: Remove the default route from the routing table.

sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1: Add the gateway of the wired network as a new default route (ensure to use the actual gateway address).

After the execution is completed, execute the route command to view the routing table. The current default route is the gateway of the wired network (eth0 ranks first):

2001_CM4_Ultra_130.jpg

This way, the network will default to using the wired connection. If you need to switch back to defaulting to the 5G network, please execute the following command:

sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.42.1

Or, you can reboot the system.

Note that 192.168.42.1 is the default gateway for the 5G module; please refer to the actual configuration.

Note: After a reboot, the routing table resets. To ensure the network continues to use the wired or wireless connection as the default route post-restart, you'll need to execute sudo ip route del default && sudo route add -net default netmask 0.0.0.0 gw 192.168.8.1 again.

4.6.3 5G network speed test

We unplugged the network cable, leaving only the 5G network connection, and then entered the speed test website to conduct a speed test.

The results are as follows:

2001_CM4_Ultra_131.jpg

Note: The 5G module network speed test is affected by 5G signal and testing methods. The actual speed may vary, and this test is for reference only.

4.6.4 AT command operation

Connect the 5G module to the expansion board. After the system starts, we enter lsusb, and the display is as follows:

2001_CM4_Ultra_47.jpg

Note down the ID value of the 5G module: 2c7c 0900。

Download minicom:

sudo apt-get install minicom

0007_Zero_4G_Cat1_13.jpg

Use the following command to enable the ttyUSB serial port of the 5G module, where the value after echo is the ID value recorded earlier:

sudo modprobe option

sudo sh -c 'echo 2c7c 0900 > /sys/bus/usb-serial/drivers/option1/new_id'

2001_CM4_Ultra_48.jpg

After executing the above two commands, execute the following:

sudo minicom -D /dev/ttyUSB2

2001_CM4_Ultra_49.jpg

After entering minicom, we input AT commands for testing:

If you need to check the echo, type the command: ate1, then press Enter. Continue typing other commands and press Enter to see the results.

2001_CM4_Ultra_120.jpg

Common AT commands:

1) Check if the SIM card is detected:

at+cpin?

If ready is returned, the card is recognized; if error is returned, check the hardware.

2) Check antenna signal quality:

at+CESQ

3) Check network registration status:

at+cops?

Normally, it should return the network supporter's code: 7, where 7 represents 4G, and where 11 represents 5G.

Note: The above command at+CESQ should not include a question mark, while the other two commands require a question mark.

4) View the SIM card's IMEI code:

at+cgsn

5) Disable radio frequency:

at+cfun=0

Enable radio frequency:

at+cfun=1

The two commands mentioned above can be used in pairs to allow the module to re-register with the network without restarting the 5G module.

6) Switch SIM card

Use SIM1 (silkscreen marking):

AT+QUIMSLOT=1

Use SIM2 (silkscreen marking):

AT+QUIMSLOT=2

When switching slots, if the original slot has a card, Windows will prompt for ejection. Power off the module, move the card to the other slot, and restart. If the target slot already contains a card, it will work directly.

7) The USB port and Ethernet port cannot be used simultaneously, and can be switched via AT commands:

Use USB port:

AT+QMAPWAC=0

Use Ethernet port:

AT+QMAPWAC=1

4.7 WiFi6 test

The CM4_Ultra expansion board supports WiFi 6 (AX200) and WiFi 6E (AX210) modules, both of which require driver installation to function. The steps for installing the drivers are as follows:

4.7.1 Install driver

First, update the system and header files. Open the terminal and execute sudo apt-get update to update the system:

Then input: sudo apt-get upgrade

Finally, execute sudo apt-get install raspberrypi-kernel-headers to install the header files.

2001_CM4_Ultra_31.jpg

Download the WiFi driver source code to your local machine:

git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git

2001_CM4_Ultra_32.jpg

After downloading, cd backport-iwlwifi to enter the source directory, then run make defconfig-iwlwifi-public to output the .config file.

2001_CM4_Ultra_33.jpg

Execute:

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

2001_CM4_Ultra_34.jpg

Execute make -j4, where -j4 indicates compiling with four cores. If the system freezes or gets stuck, you can try compiling with -j1 or -j2.

2001_CM4_Ultra_35.jpg

After compiling, execute sudo make install to install the driver:

2001_CM4_Ultra_36.jpg

After the installation is complete, you will be prompted to restart. Please do not restart yet.

2001_CM4_Ultra_45.jpg

4.7.2 Install firmware

Different modules have different firmware, and the one we use here is the AX210.

Execute the following commands in the terminal one by one:

cd ..

cd Downloads

wget http://www.mcuzone.com/wiki/2001_CM4_Ultra/iwlwifi-ty-a0-gf-a0-59.zip

unzip iwlwifi-ty-a0-gf-a0-59.zip

sudo cp iwlwifi-ty-a0-gf-a0-59.ucode /lib/firmware

2001_CM4_Ultra_37.jpg

Then enter `cd /lib/firmware`, followed by `ls /lib/firmware iwl*.*`. If the file `iwlwifi-ty-a0-gf-a0-59.ucode` is listed, it indicates that the firmware has been successfully installed.

2001_CM4_Ultra_38.jpg

4.7.3 Test WiFi6 module

After the firmware installation is complete, restart the system, click the network icon in the upper right corner of the desktop, and then click "Click here to set Wi-Fi country".

2001_CM4_Ultra_39.jpg

We select CN:

2001_CM4_Ultra_40.jpg

Restart the system again, then manually connect to the WiFi in the upper right corner of the desktop and enter the password:

2001_CM4_Ultra_41.jpg

2001_CM4_Ultra_42.jpg

Once WiFi is connected successfully, view the network parameters:

2001_CM4_Ultra_43.jpg

2001_CM4_Ultra_44.jpg

Executing ifconfig -a in the terminal can also display network parameters (wlan0).

2001_CM4_Ultra_46.jpg

V. Work with OpenWrt

The OpenWrt version we used for testing is: openwrt-bcm27xx-bcm2711-rpi-4-squashfs-sysupgrade-linux-6.1.98-20240723.img.gz. This system already includes the WiFi6 driver and the driver for our company's compatible 5G module.

The CM4_Ultra expansion board can be configured in OpenWrt as a one-in-one-out switch mode, with the native Gigabit port on the expansion board serving as the WAN port (connected to the Internet) and the 2.5G Ethernet port configured as the LAN port for connecting to a PC.

5.1 Login system

Connect the native Gigabit port on the expansion board to the PC's Ethernet port. After powering on the system, go to Network & Internet settings in Windows, open the connected network under Ethernet, and check the default gateway IP address. This address is the backend configuration page address of the OpenWrt. 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 system. The default username is root, and the default password is password.

2001_CM4_Ultra_54.jpg

5.2 Network interface configuration

Open "Network - Interfaces", then click "Add new interface":

2001_CM4_Ultra_55.jpg

Set the interface name to "WAN", select "DHCP client" for the interface protocol, choose "eth0" for the interface, and then click the "Submit” button.

2001_CM4_Ultra_56.jpg

In the firewall settings, choose the WAN port and click "Save". Do not click "Save & Apply".

2001_CM4_Ultra_57.jpg

Then click the "Return to Overview" button, and at the interface, click the "Modify" button for the LAN port.

2001_CM4_Ultra_58.jpg

In the physical settings, change the interface to eth1:

2001_CM4_Ultra_59.jpg

Then click the "Save & Apply" button, and the network configuration will be completed.

5.3 2.5G Ethernet port test

After the network configuration is completed, the native Gigabit Ethernet port becomes the WAN port, and the 2.5G port becomes the LAN port. Switch the Ethernet cable connected to the computer to the 2.5G port, then connect the native Gigabit port to the upstream router.

Access the OpenWrt page, click on "System - TTYD Terminal", after logging in (the default username is root, and the default password is password), enter ifconfig -a to check the IP address.

Here, eth0 is a 2.5G network card, and eth1 is a Gigabit network card.

You can also check the network port information under "Network - Interfaces".

2001_CM4_Ultra_61.jpg

Next, we will use the iperf3 speed testing software (pre-installed in the system) on the TTYD terminal to conduct speed tests between the device and the PC:

When the expansion board acts as the client:

When the expansion board acts as the server:

Note: Network speed test results are influenced by network conditions and testing methods. Actual speeds may vary, and this test is for reference only.

5.4 SSD test

After logging into the admin panel, go to "System > Mount Points" to see the SSD automatically mounted.

2001_CM4_Ultra_71.jpg

Click on "Network Storage - Network Sharing". Be aware that there may be two "Network Sharing" options; choose the one marked Samba, not Ksmbd!

2001_CM4_Ultra_72.jpg

Add a shared directory, with the directory being the mounted drive's address:

2001_CM4_Ultra_73.jpg

Then click the "Save & Apply" button.

After the setup is complete, enter \\192.168.198.1 (the address is that of the extension board; it may vary in practice) in the file explorer, and you will see the shared directory.

2001_CM4_Ultra_74.jpg

Drag any file to the desktop to test read speed:

2001_CM4_Ultra_75.jpg

Drag and drop any file onto the SSD to test write speed:

2001_CM4_Ultra_76.jpg

Note: Test speeds are affected by various factors such as network conditions, hard drive quality, file storage status on the drive, etc. The above test results are for reference only and do not serve as final parameters for the actual product.

If Windows prompts that access is denied when trying to access a shared resource:

2001_CM4_Ultra_77.jpg

The Windows network policy needs to be modified. Press Windows + R, then type gpedit.msc to launch the Local Group Policy Editor. Go to Computer Configuration → Administrative Templates → Network → Lanman Workstation step by step. In the right content area, you can see the policy setting "Enable insecure guest logons". The status is '"Not configured".

2001_CM4_Ultra_78.jpg

Please double-click the policy setting "Enable insecure guest logons", set its status to "Enabled," and click the OK button.

2001_CM4_Ultra_79.jpg

After setup, I retried and could access it successfully.

5.5 5G模块测试

Insert the 5G module (this document uses the RM500U-CN as an example) and the SIM card, then connect from the computer to the 2.5G port, leaving the native Gigabit port unconnected.

Start the system, click on "System - TTYD Terminal," log in, and enter ifconfig -a to check the network interfaces.

You can see there is a network interface named usb0, which is the 5G module, but it has no IP address.

Go to "Network → Interfaces", and click "Add new interface":

2001_CM4_Ultra_108.jpg

Please configure according to the diagram below to add a new interface, which this document names "5GWAN":

2001_CM4_Ultra_109.jpg

Click "Submit", then go to "Firewall Settings" and set the firewall zone to "WAN".

2001_CM4_Ultra_110.jpg

Then click "Save & Apply". After it succeeds, return to "Network - Interfaces". At this point, you will see that the 5G module has obtained an IP address, and the PC can access the internet through this 5G module.

2001_CM4_Ultra_111.jpg

The internet speed test results on the PC are as follows:

2001_CM4_Ultra_112.jpg

Note: Network speed test results are affected by the network environment and testing methods. The actual speed may vary, and this test is for reference only.

VI. Power consumption test information

This power consumption test uses a USB-C port connected to a 5V 3A power supply
Standby powerconsumption Power usage during system operation Modules use each other System powerconsumption
No external devices 0.756A Transferring files from the computer to the SSD over WiFi6 1.25A
Use 5G only 0.9A 1.9A (test speed) Transferring files from the SSD to the computer over WiFi6 1.72A
Use SSD only 0.847A Transferring files from the SSD to the computer over 2.5G 1.588A
Use WiFi6 only 0.83A 1.15A Transferring files from the computer to the SSD over 2.5G 1.668A
All devices connected 1.15A Download files from webpages to SSD over 5G 1.88A

Note: The above data is our company's test data and is for reference only.

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

T