USB HID Base Protocol¶
Protocol Overview¶
Functional Scope and Purpose
This document specifies the base protocol for communication between XU316 zero-code firmware devices and PC-side GUI software over USB HID: data packet structure, device identification, communication mechanism and timing conventions.
Business commands carried over the HID channel are organized by functional domain: EQ and Tone Control Commands (HID codes 0x8A-0xA6) and HID Device Control Commands (firmware upgrade / reboot / EQ band count / upsampling / EX3D, 0xA7-0xB4, 0x80-0x81). For serial channel base protocols, see XU316 UART Base Protocol and EQ UART Base Protocol.
1. Protocol Foundation Specification¶
1.1 Underlying Communication Protocol¶
Based on USB HID (Human Interface Device) Protocol
| Parameter | Value |
|---|---|
| Transmission Method | USB HID |
| Data Packet Size | 64 bytes (including 1-byte Report ID 0x01) |
| Effective Data | 63 bytes |
| Byte Order | Little Endian |
| Sync Header | 0x77 (fixed at byte 1, Report ID at byte 0) |
1.2 HID Device Identification¶
| Parameter | Value | Description |
|---|---|---|
| Usage Page | 0xff82 or 0xff83 | HID device type identifier |
| Report ID | 0x01 | First byte (byte 0) when sending |
| Transmission Mode | Non-blocking mode | Prevents GUI freezing |
1.3 Communication Mechanism¶
Data Transmission Notes
- All data is transmitted in Little Endian byte order
- Sync header 0x77 is fixed at byte 1 (byte 0 is Report ID = 0x01)
- Recommend minimum 5ms interval between commands to avoid device processing delays
1.4 Data Packet Structure¶
64-Byte Packet Convention
- Both PC requests and device responses use fixed-length 64-byte packets
- Byte 0 is fixed as
report_id = 0x01 - Byte 1 is fixed as
sync_header = 0x77 - Byte 2 is
cmd_header(command header) - All unused bytes must be padded with 0
2. Timing Requirements¶
Timing Requirements
- Command interval: recommend 5ms or more
- Read delay: wait 100ms after sending a read request
- Mode switching: wait for internal device state to stabilize after completion
3. Parameter Format and Error Handling¶
3.1 Parameter Format¶
- Floating point parameters:
freq,q,bw,gainuse IEEE 754float(little-endian) - Overall gain:
int32(little-endian, range-50dB ~ 0dB)
3.2 Error Handling¶
- Data packet length check
- Sync header verification
- Re-establish connection and retry on communication failure

