Hardware Connection
- A USB Type-A female connector was soldered using a ribbon cable
- USB gamepad successfully connected
Connection diagram:
System Boot Information
Dynamic memory initialization successful, OCRAM heap size = 376 KB
Build Time: September 6, 2025 02:59:55
Copyright: Bouffalolab Team
LHal Component: V2.0.0-123-g811e8c1f-dirty
SDK Component: 2.2.0
USB Device Enumeration ProcessUSB host task started...
- [Info] EHCI Host Controller Version: 0100
- [Info] New low-speed device detected – Hub 1, Port 1 connected
- [Info] New device found – Vendor ID: 081f, Product ID: e401, Device Version: 0106
- [Info] Device contains 1 interface
- [Info] Enumeration successful, starting to load class driver
- [Info] HID class driver loaded
- [Info] Endpoint configuration: Ep=81 Attr=03 Mps=8 Interval=10 Mult=00
- [Info] HID device registered: /dev/input0
Test Results
✅ HID gamepad device detected successfully! Starting data collection...
✅ HID gamepad monitoring started successfully!
✅ Only changed data is displayed
Raw Data vs. Parsed Result Comparison
Raw Data: 0x7f 0x7f 0x00 0x80 0x80 0x0f 0x00 0x00 (Bytes: 8)
Raw Data: 0x7f 0x00 0x00 0x80 0x80 0x0f 0x00 0x00 (Bytes: 8)
Changes were observed in the serial output. USB peripheral data was successfully parsed:
Raw Data: 0x7f 0x7f 0x00 0x80 0x80 0x2f 0x00 0x00 (Bytes: 8)
Parsed Result: CENTER + A
[Repeated identical data multiple times, indicating stable button state]
- Successfully achieved: USB gamepad connection and recognition on the Ai-M61-32S development board
- Technical approach: Solder USB female connector via ribbon cable → Flash USB host demo → Automatically recognize HID device
- Key finding: USB peripheral data can be easily parsed with AI-assisted analysis, significantly simplifying the development process
- Data verification: Raw data and parsed results match accurately, with stable response
Test Completed — USB gamepad functions normally, and data parsing is accurate and reliable
Appendix: Original Log Output
dynamic memory init success, ocram heap size = 376 Kbyte
| _ \ / |/ | | | | | | |
| |) | ___ _ | || | __ | | ___ | | __ | |
| _ < / _ | | | | | / | |/ _ \| |/ _ | '
| |) | () | || | | | || (| | | () | | (| | |) |
|/ ___/ _,|| || _,||_/||_,|./
Build:02:59:55, Sep 6 2025
Copyright (c) 2022 Bouffalolab team
Version of used components:
Version: component_version_lhal: V2.0.0-123-g811e8c1f-dirty
Version: component_version_sdk: 2.2.0
Boot2 maybe not exist!
======== flash cfg ========
flash clock 80MHz
flash delay 115,125,1
flash size 0x00800000
jedec id 0x17405E
mid 0x5E
iomode 0x04
clk delay 0x01
clk invert 0x03
read reg cmd0 0x05
read reg cmd1 0x35
write reg cmd0 0x01
write reg cmd1 0x31
qe write len 0x01
cread support 0x01
cread code 0x20
burst wrap cmd 0x77
uart sig1:ffffffff, sig2:0000f32f
clock gen1:9ffffffd, gen2:0fff0c11
board init done
bouffalolab />Starting usb host task...
[I/USB] EHCI HCIVERSION:0100
[I/USB] EHCI HCSPARAMS:000001
[I/USB] EHCI HCCPARAMS:0006
[I/USB] New low-speed device on Hub 1, Port 1 connected
[I/USB] New device found,idVendor:081f,idProduct:e401,bcdDevice:0106
[I/USB] The device has 1 interface
[I/USB] Enumeration success, start loading class driver
[I/USB] Loading hid class driver
[I/USB] Ep=81 Attr=03 Mps=8 Interval=10 Mult=00
[I/USB] Register HID Class:/dev/input0
HID Gamepad Device Found! Starting data collection...
Only changes will be displayed.
HID Gamepad monitoring started successfully!
Raw: 0x7f 0x7f 0x00 0x80 0x80 0x0f 0x00 0x00 nbytes:8
Raw: 0x7f 0x00 0x00 0x80 0x80 0x0f 0x00 0x00 nbytes:8
Ai-Thinker