USB OTG Testing
2025-05-20
The qusb command configures USB working modes. Supported parameters for qusb are as follows:
init Initialize USB configuration (mount configfs, create device nodes, load default PID)
bind Bind USB device to configuration (activate current configuration)
unbind Unbind USB device (deactivate current configuration)
setpid <PID> Switch to USB composite mode with specified PID (e.g., setpid 901D enables DIAG+ADB)
setpid -p <PID> Set PID as default mode (persist to /etc/usb/usb_pid, takes effect after reboot)
showpid Display all supported PIDs and their corresponding function combinations
persist <PID> Persist PID only (without immediate switching)
Test USB NIC Emulation Features with qusb
View all supported USB features:
root@qcm6490-idp:/# qusb showpid A4A1: NCM 4EE7: ADB 900E: DIAG 901C: DIAG,UAC2 901D: DIAG,ADB 9015: MASS_STORAGE,ADB 9024: RNDIS,ADB 902A: RNDIS,MASS_STORAGE 902B: RNDIS,ADB,MASS_STORAGE 902C: RNDIS,DIAG 902D: RNDIS,DIAG,ADB 902F: RNDIS,DIAG,MASS_STORAGE 908C: NCM,ADB 90CA: DIAG,UAC2,ADB 90CB: DIAG,UVC,ADB 90CC: DIAG,UAC2,UVC,ADB 90DF: DIAG,UVC 90E0: DIAG,UAC2,UVC 9135: DIAG,QDSS,ADB 9136: DIAG,QDSS F000: MASS_STORAGE F00E: RNDIS
Switch USB mode:
qusb setpid 908C
#Enables NCM+ADB, then executeifconfig -a
in device shell to view usb0 interfaceConnect QuecPi Alpha's Type-C interface to PC's USB interface [Linux OS is recommended for PC]
Configure IP address for QuecPi Alpha's usb0 interface:
ip addr add dev usb0 192.168.0.5/24
Configure address for newly recognized USB NIC on PC:
ip addr add dev enp0s20f0u13 192.168.0.6/24
#enp0s20f0u13 should be modified according to actual interface nameNetwork test: Execute
ping 192.168.0.5
in PC's SHELL #Successfully pinging the destination address indicates proper network connectivity