USB Type-A / C Ports
The Radxa CM4 IO Board comes with the following USB ports:
- 1 × USB 3.0 Type-C port
- 1 × USB 3.0 Type-A port
- 2 × USB 2.0 Type-A ports
USB 3.0 Type-C Port
- Supports both OTG and HOST modes
- Blue color-coded internal connector
- Theoretical maximum transfer rate: 5Gbps
USB 3.0 Type-A Port
- Supports HOST mode only
- Blue color-coded internal connector
- Theoretical maximum transfer rate: 5Gbps
USB 2.0 Type-A Ports
- Support HOST mode only
- Black color-coded internal connectors
- Theoretical maximum transfer rate: 480Mbps
Hardware Connection
Connect USB devices such as mice, keyboards, or flash drives to the USB Type-A/C ports. The Type-C port also supports OTG mode, which can be verified by enabling ADB functionality.
Refer to the Hardware Information tutorial to locate the corresponding hardware interfaces.
HOST Mode
To test the HOST mode functionality of the USB ports, you can verify basic device connectivity and measure flash drive read/write speeds.
Basic Functionality Test
Connect devices like card readers, mice, or keyboards to test if they are properly recognized and functional.
Check Connected Devices (Before Connection)
Use the lsusb
command to view currently recognized USB devices.
lsusb
Example output:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID a69c:8d81 AICSemi AIC 8800D80
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Check After Connecting a Device
After connecting a device (e.g., card reader, mouse, keyboard), run lsusb
again to check for the new device.
lsusb
Example output after connecting a card reader:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID a69c:8d81 AICSemi AIC 8800D80
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 067b:2731 Prolific Technology, Inc. USB SD Card Reader
By comparing the outputs, you can confirm that the new USB device (ID: 067b:2731
) has been properly recognized. Once recognized, you can proceed to test the device's functionality.
Read/Write Speed Test
Connect a USB flash drive and use the dd
command to test read/write speeds.
Identify the Storage Device
Use lsblk
to identify your flash drive's device name.
lsblk
Example output (in this case, the flash drive is sda
):
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 58G 0 disk
mtdblock0 31:0 0 16M 0 disk
mmcblk1 179:0 0 58G 0 disk
├─mmcblk1p1 179:1 0 16M 0 part /config
├─mmcblk1p2 179:2 0 300M 0 part /boot/efi
└─mmcblk1p3 179:3 0 57.6G 0 part /
zram0 253:0 0 1.9G 0 disk [SWAP]
Test Write Performance
sudo dd if=/dev/zero of=/dev/sda bs=1M count=100
dd
: A command-line utility for copying and converting files in Linuxif=/dev/zero
: Specifies the input file as/dev/zero
, which provides an infinite stream of null bytesof=/dev/sda
: Specifies the output file as the USB flash drive (replacesda
with your device)bs=1M
: Sets the block size to 1MBcount=100
: Specifies to copy 100 blocks (total 100MB)
This command writes 100MB of zero bytes to the flash drive and displays the write speed.
Example output:
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 3.40424 s, 30.8 MB/s
Test Read Performance
sudo dd if=/dev/sda of=/dev/null bs=1M count=100
dd
: A command-line utility for copying and converting files in Linuxif=/dev/sda
: Specifies the input file as the USB flash driveof=/dev/null
: Directs output to/dev/null
, discarding all databs=1M
: Sets the block size to 1MBcount=100
: Specifies to copy 100 blocks (total 100MB)
This command reads 100MB of data from the flash drive and displays the read speed.
Example output:
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 4.0582 s, 25.8 MB/s
OTG Mode
Verify the OTG functionality of the Radxa CM4 by enabling ADB (Android Debug Bridge).
Enable ADB Functionality
Use the rsetup
tool to enable ADB functionality.
For more information about using Rsetup, refer to the Rsetup Usage tutorial.
rsetup
Navigate to Hardware
-> USB OTG services
and enable the [email protected]
option to activate ADB functionality.
Test OTG Functionality
Connect your PC to the Radxa CM4's USB 3.0 Type-C port using a Type-C cable, then test the OTG functionality using ADB commands.
Install ADB Tools
sudo apt install adb
Check ADB Devices
Use the adb devices
command to list connected ADB devices.
adb devices
Example output (showing one ADB device connected):
List of devices attached
0123456789ABCDEF device
Test ADB Shell
Access the Radxa CM4's terminal shell using the adb shell
command.
adb shell
If you successfully enter the Radxa CM4's terminal, the OTG functionality is working correctly. You can now use various commands to check system information on the Radxa CM4.
Interface Pin Definitions
For detailed pin definitions, please refer to the hardware schematics available on the Downloads page.