Skip to content

USB Type-A / C

Rhino Pi X1 is equipped with one Type-C port and four USB3.0 Type-A ports.

  • USB3.0 Type-A Support HOST mode, with a theoretical maximum transfer rate of 5 Gbps.

  • Type-C The Type-C port supports USB 3.0 OTG and DP output.

Hardware Connection

To test the HOST mode function of the USB ports, we can verify the basic functions of devices connected to the USB ports and test the read/write speed of a USB flash drive.

Basic Functions

We can connect card readers, mice, keyboards, and other devices to the USB ports, and test whether the devices are properly recognized and usable by plugging and unplugging them.

Note

All the following tests are performed in the Ubuntu system Web desktop. Please refer to the Web Login section to log into the system.

No Peripherals Connected Use the lsusb command to view the devices recognized by the current system.

bash
lsusb

Example terminal output:

bash
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Peripherals Connected Connect devices such as a card reader, mouse, or keyboard to the USB port, and use the lsusb command to check if new devices are added.

bash
lsusb

Example terminal output (a USB flash drive is connected to the USB port):

bash
Bus 002 Device 002: ID 0781:55a9 SanDisk Corp.  SanDisk 3.2Gen1
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

By comparing the output information of the two scenarios, we can confirm that the newly connected USB device is properly recognized (the new device ID is 0781:55a9). After the USB device is recognized normally, you can use the device to verify that its functions work properly.

Read/Write Test

Connect a USB flash drive to the USB port and use the dd command to test the read/write speed of the USB flash drive.

Confirm the Storage Device Use the command lsblk | egrep "sdi|NAME" to confirm the device name of the USB flash drive.

bash
lsblk | egrep "sdi|NAME"

Example terminal output (where sda is the device name of the current USB flash drive; replace it according to the actual situation):

bash
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sdi       8:128  1 114.6G  0 disk 
└─sdi1    8:129  1 114.6G  0 part

Test Write Performance

bash
sudo dd if=/dev/zero of=/dev/sdi1 bs=1M count=100
  • dd: A command-line tool in the Linux system used for copying and converting files.
  • if=/dev/zero: Specifies the input file as /dev/zero, a special file that provides an infinite stream of null bytes.
  • of=/dev/sdi1: Specifies the output file as /dev/sdi1 (the USB flash drive device).
  • bs=1M: Specifies the block size as 1MB.
  • count=100: Specifies copying 100 blocks.

This command writes 100MB of null bytes to the USB flash drive and displays the write speed.

Example terminal output:

bash
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.816923 s, 128 MB/s

Test Read Performance

bash
sudo dd if=/dev/sdi1 of=/dev/null bs=1M count=100
  • dd: A command-line tool in the Linux system used for copying and converting files.
  • if=/dev/sdi1: Specifies the input file as /dev/sdi1 (the USB flash drive device).
  • of=/dev/null: Specifies the output file as /dev/null, a special file that discards all data written to it.
  • bs=1M: Specifies the block size as 1MB.
  • count=100: Specifies copying 100 blocks.

This command reads 100MB of data from the USB flash drive to /dev/null and displays the read speed.

Example terminal output:

bash
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.327596 s, 320 MB/s