5006 CM5 Tiny EN
Keywords
Raspberry Pi, CM5 Core board, RTC, CAM, DISP, PWM, PCIe, USB2.0 OTG, gadget, 4G, USB3.0, WLAN
I. Introduction
CM5_Tiny is a compact expansion board designed for the Raspberry Pi CM5 core board. It features standard interfaces including Micro HDMI, RTC, CAM, DISP, Fan, and USB 3.0, along with a power button, 1.25mm 4-pin USB, and a 16-pin PCIe interface. It features an independent USB2.0 OTG port, which can be used to flash the OS to eMMC/TF cards and can be configured as a USB network adapter under the OpenWrt. CM5_Tiny with OpenWrt can connect to a router via WiFi as WLAN, and connect to a PC via USB OTG as LAN.
The CM5_Tiny with 4G LTE enables 4G as WAN under OpenWrt, while the CM5 core board's built-in WiFi or USB OTG connection to a PC serves as LAN.
II. Hardware Spec
1) 1*USB 2.0 OTG port, which can be used to flash the OS to eMMC/TF card.
2) 1*TF card slot, used for booting the OS from a CM5 core board without eMMC. It can be flashed directly via the USB OTG port without removing it or using a USB card reader.
3) 1*USB 3.0 Type-C port, which does not support reversible insertion: one side is USB 3.0, the other is USB 2.0. Please pay attention to the insertion orientation.
4) 1*USB 2.0 port, 1.25mm-4Pin, which can be used to expand 4G modules.
5) 1*PCIe interface, 0.5mm-16Pin, which can be used to expand peripherals such as WiFi, SSD, USB, 2.5G Ethernet, AI, or TPU.
6) 1*RTC real-time clock, 1.25mm-2Pin.
7) 1*PWM fan interface, 1.0mm-4Pin.
8) 1*Micro HDMI output port.
9) 1*CSI/DSI combo interface, which can be used to connect a display or camera.
10) 1*Power on/off button.
11) 3*LEDs: Power LED, CM5 Power LED, and Operation LED.
12) 1*BOOT pin header, 2.54mm-2Pin, you can short-circuit with tweezers and power on to enter Boot mode (Rev1.1). Or 1*BOOT button that can be pressed while powering on to enter Boot mode (Rev1.3). They are used for flashing the OS to the eMMC core board.
13) Power supply: 5V3A, powered via USB-C. Can be supplied through the USB-C OTG port or the USB 3.0 Type-C port.
14) Size: 53.5x55mm, compact and lightweight without compromising expandability.
15) Optional 3D-printed base and heat sink.
The CM5_Tiny extension board, when used with our company's Raspberry Pi 5 PCIe adapter board, requires a PCIe same-direction cable.
III. Flash OS
We use the Raspberry Pi OS, the OS version is 2024-11-19-raspios-bookworm-arm64.img.xz.
You can download it in:
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
OpenWrt version is: openwrt-bcm27xx-bcm2712-rpi-5-squashfs-sysupgrade-linux-6.6.87-USBlan-20250421a.img.gz.
The CM5 core board with eMMC only supports booting the OS from eMMC, and the onboard TF card is inactive. The CM5 core board without eMMC supports booting the OS from a TF card.
▶ The TF OS card can be flashed on a computer using a USB writer before being inserted into the CM5_Tiny expansion board. Alternatively, it can be flashed directly on the CM5_Tiny expansion board using the same method as for the eMMC.
Figure 1 shows how to install a TF card on the core board without eMMC,
Figure 2 shows the installed state of the core board with eMMC.
Figure 3 is hardware operation of Rev1.1: Short-circuit the 2.54mm 2Pin Boot slot with tweezers, connect the USB-C OTG port to the computer, and power on. When the BCM2712 device appears in the device manager, the tweezers can be removed. Then proceed with OS flashing. After the flashing is complete, power cycle the OS to boot (the tweezers can also remain in place until the OS flashing is finished).
Figure 3 is hardware operation of Rev1.3: Hold the BOOT button, connect the USB-C OTG port to the computer, and power on. When the BCM2712 device appears in the device manager, you can release the button. Then proceed with OS flashing. After the flashing is complete, power cycle the OS to boot.
For the specific method of finishing the OS, please click here.
IV. Work with Raspberry Pi OS
The model of the CM5 core board used in this test is CM5104032.
4.1 USB test
▶ Test USB 2.0 Type-C port:
Power supplied via the USB 3.0 Type-C port, a USB 3.0 flash drive inserted into the USB 2.0 Type-C port, execute lsusb and lsusb -t, and the display is as follows:
In the red box, Bus 005 Device 002 is a USB 3.0 flash drive operating at 480M, i.e., USB 2.0, and functioning normally.
▶ Test USB 3.0 Type-C port (powered via USB 2.0):
(Positive test USB3.0) Insert a USB3.0 flash drive into the USB3.0 Type-C port in the correct orientation, execute lsusb and lsusb -t, the display is as follows:
In the red box, Bus 002 Device 002 is a USB 3.0 flash drive operating at 5000M, i.e., USB 3.0, and functioning normally.
(Reverse test USB3.0) Insert a USB3.0 flash drive reversely into the USB3.0-C port, execute lsusb and lsusb -t, the display is as follows:
In the red box, Bus 001 Device 003 is a USB 3.0 flash drive operating at 480M, i.e., USB 2.0, and functioning normally.
▶ Test USB2.0 (1.25mm-4Pin port):
For the USB 2.0 1.25mm-4p port paired with a 4G module, execute lsusb and lsusb -t, with the following display:
In the red box, Bus 003 Device 003 is a 4G module operating at 480M, i.e., USB 2.0, and functioning normally.
▶ Conclusion:
The USB 2.0-C OTG and USB 3.0-C ports can both be used for power supply. It is recommended to use the USB 2.0 OTG port for power supply, as it can theoretically be configured as a USB Ethernet using gadget components. The USB 3.0-C port can be used for high-speed peripheral expansion.
4.2 Connect to WiFi
Start the Raspberry Pi OS, click the network icon in the upper right corner of the desktop, connect to the WiFi hotspot. Once connected successfully, you can use the built-in WiFi module to access the internet through the upstream router.
Click "Advanced Options - Connection Information..." to view network connection information:
Execute ifconfig in the terminal, and the result is as follows:
wlan0 is the WiFi module of the core board and has obtained an IP address.
eth0 is the Gigabit Ethernet of the core board (not brought out, unavailable).
4.3 4G module test
Our company's compatible 4G modules are plug-and-play, requiring no drivers or dial-up. Our 4G models include CAT4 4G, ZTE CAT4/CAT4-EU, Qualcomm 4G/4G-GPS, NL668-EAU/EU/AM 4G, and EG25-G.
In Raspberry Pi OS, CAT4 4G and ZTE CAT4/CAT4-EU are automatically recognized as eth devices, while Qualcomm 4G/4G-GPS, NL668-EAU/EU/AM 4G, and EG25-G are automatically recognized as usb0 devices.
| Module | NL668-EU
(soc from Qualcomm) |
NL668-EAU
(soc from Qualcomm) |
NL668-AM
(soc from Qualcomm) |
Qualcomm 4G |
|---|---|---|---|---|
| BAND | • LTE FDD: B 1/3/5/7/8/20
• LTE TDD: B 38/40/41 • WCDMA: B 1/5/8 • GSM/GPRS/EDGE: 850/900/1800MHz |
• LTE FDD: B 1/3/5/7/8/20/28
• LTE TDD: B 38/40/41 • WCDMA: B 1/5/8 • GSM/GPRS/EDGE: 850/900/1800MHz |
• LTE FDD: B2/4/5/12/13/17/66/71
• WCDMA: B2/4/5 |
• LTE FDD: B1/3/5/8
• LTE TDD: B34/38/39/40/41 • WCDMA: B 1/8 • EVDO/CDMA1X: BC0 • GSM/GPRS/EDGE: 900/1800MHz |
| Module | Qualcomm 4G-GPS | CAT4 4G | ZTE CAT4 4G | EG25-G |
|---|---|---|---|---|
| BAND | • LTE FDD: B1/3/5/8
• LTE TDD: B34/38/39/40/41 • WCDMA: B 1/8 • TD-SCDMA: B 34/39 • EVDO/CDMA1X: BC0 • GSM/GPRS/EDGE: 900/1800MHz |
• LTE FDD: B1/3/5/8
• LTE TDD: B34/38/39/40/41 |
• LTE FDD: B1/3/5/8
• LTE TDD: B34/38/39/40/41 |
TE-FDD: B1/B2/B3/B4/B5/B7/B8/B12/B13/B18/
B19/B20/B25/B26/B28 LTE-TDD: B38/B39/B40/B41 UMTS: B1/B2/B4/B5/B6/B8/B19 GSM: B2/B3/B5/B8 |
For testing, using CAT4 4G as an example, execute lsusb in the terminal. The output is shown below, with the 4G module highlighted in the red box.
Execute the command ifconfig -a in the terminal, eth1 is the CAT4 4G:
In the terminal, executing the route command shows that eth1 is listed first, indicating that the default internet connection is currently through the CAT4 4G:
We can now successfully ping both the IP address and the domain name, confirming that the CAT4 4G is working correctly:
Open https://test.ustc.edu.cn/ to conduct a speed test, 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.
▶ For other operations with 4G module, please click the link below:
Modification of Network Priority
Modify the IP address of the 4G module
4.4 Fan test (PWM)
Correctly install the fan, then install the monitoring software s-tui:
sudo apt install s-tui
Then, execute s-tui in the terminal, and you can observe the changes in fan speed in the monitoring window:
If you need to customize the fan speed and operating temperature range, please open the terminal and execute the following commands:
sudo nano /boot/firmware/config.txt
Insert the following lines at the end of the file:
dtparam=cooling_fan=on
dtparam=fan_temp0=50000,fan_temp0_hyst=5000,fan_temp0_speed=255
Among them:
fan_temp0=50000, where 50000 represents the temperature, here it is 50°C.
fan_temp0_hyst=5000, where 5000 denotes the hysteresis temperature, here it is 5°C.
fan_temp0_speed=255, where 255 indicates the fan speed, with the maximum being 255.
You can input multiple temperature ranges and their corresponding fan speeds, with each segment on a separate line, differentiated by unique numbering (e.g., 1., 2., 3., etc.):
dtparam=fan_temp1=36000,fan_temp1_hyst=5000,fan_temp1_speed=128
4.5 DSI test
All the screens we tested are official LCD screens for Raspberry Pi, and each requires independent power supply.
Connect the LCD screen, power up the OS, open the terminal and execute the following commands:
sudo nano /boot/firmware/config.txt
If it is the 1st-gen LCD, insert the following lines at the end of the file:
dtoverlay=vc4-kms-dsi-7inch,dsi0
If it is the 2nd-gen LCD, insert the following lines at the end of the file:
dtoverlay=vc4-kms-dsi-ili9881-7inch,dsi0
After saving and restarting the OS, you can use the Raspberry Pi 7-inch touchscreen.
Notes
Note1: If both the HDMI display and the 7-inch touchscreen are connected simultaneously, the 7-inch touchscreen may become the secondary screen. Simply power off the system, disconnect the HDMI display, and restart; the 7-inch touchscreen will then function as the primary display.
Note2: he added command actually enables the second display, meaning a dual-screen setup. Whether the second screen's hardware is installed or not, the system may still recognize it as a dual-display configuration. If you use PrtScn (Print Screen) to take a screenshot, it may capture both screens. In some cases, this could even cause the system to fail to boot. Therefore, if you don’t need this screen, it is recommended to remove or comment out this line in config.txt.
4.6 CSI test
We are using the OV5647 camera with the CAM/DISP0 interface. Once the OS is running, open the terminal and execute the following commands:
sudo nano /boot/firmware/config.txt
Insert the following lines at the end of the file:
dtoverlay=ov5647,cam0
Add according to your model in practice. Save and restart the OS, then you can use the OV5647 camera.
Execute the following command in the terminal:
ls /dev/video*
You will then see the video0 device listed:
Execute libcamera-hello --camera 0 in the terminal to open the corresponding camera for preview:
If a photo is required, please excute:
libcamera-jpeg -o test.jpg
The photos are saved in the /home/mcuzone directory (i.e., the user's home directory). The photo effects are as follows:
4.7 Button test
CM5_Tiny expansion board comes with a button that functions as a power switch. When the device is on, pressing the button once will bring up the shutdown menu:
Press the button again to power off immediately.
Power on by pressing the button once while in the shutdown state (requires power connection).
Note: The power on/off function of the button requires support from the OS software. It is enabled by default in Raspberry Pi OS and Ubuntu OS, but the current version of OpenWrt does not support the power on/off function.
4.8 HAILO 8L AI module test
The PCIe interface is connected to a HAILO 8L AI module via an adapter board, and the CAM/DISP0 interface is connected to a camera, as shown in the figure:
【加图】
▶ Both the Raspberry Pi OS versions 2024-07-04-raspios-bookworm-arm64.img.xz and 2025-05-13-raspios-bookworm-arm64.img.xz can be installed and used with the AI module without issues. Moreover, when installing on 2025-05-13-raspios-bookworm-arm64.img.xz, no firmware configuration is required. When installing on the 2024-11-19-raspios-bookworm-arm64.img.xz, an error occurs when executing the command hailortcli fw-control identify, and the AI module cannot be recognized. So we consider this version unusable.
For specific operating steps of the Hailo 8L AI, please refer to here.
▶ The OS boots from the TF card or eMMC, and executing lspci in the terminal displays the following:
The red box indicates the HAILO 8L AI module.
▶ Using the OV5647 camera:
Execute the following commands to begin image recognition and detection:
rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov6_inference.json --lores-width 640 --lores-height 640
▶ Using the IMX219 camera:
Open the terminal and execute the following commands:
sudo nano /boot/firmware/config.txt
Insert the following lines at the end of the file:
dtoverlay=ov5647,cam0
If there is a configuration for OV5647, please delete or comment it out:
# dtoverlay=ov5647,cam0
Change camera-auto-detect=1 to camera_auto_detect=0:
Reboot the OS and execute the following commands to begin image recognition and detection:
rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov6_inference.json --lores-width 640 --lores-height 640
V. Work with OpenWrt
The version of the OpenWrt is: openwrt-bcm27xx-bcm2712-rpi-5-squashfs-sysupgrade-linux-6.6.87-USBlan-20250421a.img.gz.
In our OpenWrt, the USB OTG port has been configured as a USB network adapter. Please connect the USB 2.0 Type-C OTG port to your PC. On Windows 11, Linux, and macOS, the OS will recognize the CM5_Tiny expansion board as a USB network adapter, as shown in the following image:
Note: This USB network adapter currently does not have fully functional drivers for Windows 10, and customers may need to explore driver solutions on their own.
This extension board has two configuration methods in OpenWrt:
One configuration is WiFi as WAN and USB LAN as output. That is, the built-in WiFi of the Raspberry Pi CM5 connects to an upstream router for internet access as WAN, while the USB 2.0-C port is connected to a computer to function as LAN.
The other configuration is 4G module as WAN and USB LAN or wireless AP as output. That is, the extension board connects to a 4G module as WAN, and uses the USB 2.0 Type-C port to connect to a computer as LAN. It can also configure the built-in WiFi of the Raspberry Pi CM5 as a wireless AP, allowing mobile devices to connect to this AP and access the internet via the 4G module.
5.1 Preparation
Plug the USB Type-C port of the CM5_Tiny extension board into the PC. 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, and the IP address obtained by the PC is 192.168.198.123.
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 Bandwidth testing of USB network adapter
Use iPerf3 speed testing software to measure the network speed between the PC and the expansion board. This speed can indicate the bandwidth of the virtual USB network adapter.
OpenWrt comes with iperf3 software. Download the Windows version of iperf3 here:
http://www.mcuzone.com/down/Software.asp?ID=10000634
Click on "Services - Terminal," then log in to the terminal. The default username is root, and the password is the "Router Password" of OpenWrt (by default, there is no password):
The CM5_Tiny expansion board achieves a speed of about 340Mbps in Client mode:
The CM5_Tiny expansion board achieves a speed of about 227Mbps in Server mode:
Note: The bandwidth tests of the virtual USB network adapter are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.
5.3 WiFi as WAN, USB network adapter as LAN
After logging into OpenWrt, go to "Network - Wireless" and click "Scan" as shown in the figure below:
On the scanning interface, we select the desired AP to connect to and tap "Join Network":
Configure the settings as shown in the figure, enter the AP password in the "WPA passphrase" field, set a custom name for the new network, and click "Submit" when finished:
Note: If you need to use the WiFi module as an AP later, do not check "Replace wireless configuration". Instead, simply disable the existing hotspot with the SSID "rpi5" under "Network - Wireless":
On the next page, click "Save":
After saving, return to "Wireless Overview" and click "Save & Apply":
Just a moment, the WiFi module will connect to the selected AP:
Meanwhile, in the "Interfaces" section, we can see that the WiFi module has now obtained an IP address:
View the connection properties of the virtual USB network adapter, and you will see that it now has internet access:
Using the "SpeedTest.cn" app, the speed test results on the PC are as follows (200M broadband):
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 your PC has a wireless network card, you can use the built-in hotspot feature of Windows 11 to share the internet through your PC's wireless network card. The steps are as follows:
Go to "Settings - Network & Internet - Hotspot" and turn on the "Mobile hotspot" switch to generate a hotspot:
Mobile devices such as mobile phones can connect to this hotspot for internet access. Open https://test.ustc.edu.cn/ to conduct a speed test, 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.
5.4 4G module as WAN, WiFi as LAN
The operations in this section involve resetting the OpenWrt completely and reconfiguring it, which is unrelated to the settings in Section 5.3.
5.4.1 Configure 4G module as WAN
The tested 4G module is a CAT4 4G LTE. Once the OS is running, click on "Services - Terminal," then log in to the terminal. The default username is root, and the password is the "Router Password" of OpenWrt (by default, there is no password). After logging in, execute lsusb to identify the 4G module:
Execute ifconfig -a, and you will see eth1, which is the CAT4 4G LTE:
If it is a Qualcomm 4G LTE, then identify it as usb0.
Click "Network - Interfaces" - "Add new interface...":
Configure as shown in the figure, where the "Name" can be customized, and then click the "Create Interface" button:
In the "Firewall Settings", set "Create / Assign firewall-zone" to "wan", then click "Save":
Save and return to the previous page, then click "Save & Apply":
Wait a moment, and you will see the extended CAT4 4G LTE obtain an IP address:
Pinging the domain name in the terminal was successful, so the CAT4 4G LTE is working properly:
5.4.2 Configure CM5's WiFi as LAN
OpenWrt has a pre-configured LAN connection for CM5's WiFi, which is the access point named rpi5 in the diagram below:
We can directly connect to this hotspot with our phones (no password):
If you need to set up a personal hotspot, please follow these steps:
Click "Network - Wireless" to enter the wireless settings, click the "Add" button, and the "Edit Wireless Network" page will pop up:
Set the "Operating Frequency" as shown in the figure. Under "Interface Configuration - General Setup", enter the hotspot name (which can be customized) in the "ESSID" field, and check "lan" in the "Network" field:
Click on "Wireless Security", then set the encryption type (e.g., "WPA2-PSK (strong security)") and the password:
Click on "Interface Configuration - Advanced Settings", enter "wlan1" (the name can be customized) in the "Interface name" field, then click "Save":
Return to the previous page, click "Save & Apply":
Click the "Disable" button in the red box to turn off the default hotspot, as only one hotspot can be active at a time:
5.4.3 WiFi sharing network as an AP
Wait a moment, and you can connect to this hotspot using mobile devices such as mobile phones:
Open https://test.ustc.edu.cn/ to conduct a speed test, 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.
5.4.4 Configure the USB network adapter as LAN
In OpenWrt, the USB network adapter is set as LAN by default. When you go to "Network - Interfaces", it appears as follows:
The "LAN" includes the virtual USB network adapter.
View the connection properties of the virtual USB network adapter, and you will see that it now has internet access:
On the PC, open https://test.ustc.edu.cn/ to conduct a speed test, 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.
Contact Us
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




QQ:8204136