Communication Protocols and Command Index¶
Where do I start to control a product?
- Find the function command you need in the command tables below (grouped by functional domain, 57 business commands in total);
- Open the corresponding command reference page for byte-level command details and typical business flows — the same content is embedded in the "Product Control Commands" chapter of product datasheets;
- For frame format, startup handshake and other base specifications, see the corresponding base protocol.
Protocol Layering¶
| Layer | Document | Description |
|---|---|---|
| Base protocol | XU316 UART Base Protocol | XU316↔MCU: frame format (0x55AA, big-endian), startup interaction flow (0x00-0x05), common data structures |
| Base protocol | EQ UART Base Protocol | PC tool↔device serial: frame format (0x55AA, little-endian) |
| Base protocol | USB HID Base Protocol | PC tool↔device USB: 64-byte packets, sync header 0x77, timing conventions |
| Business commands | Product Configuration Commands (UART) | XU316↔MCU product configuration business commands (0x20-0x31, 0xF0-0xF1, 0xEE) |
| Business commands | EQ and Tone Control Commands | EQ/volume/LED/UAC/gain/filter/game mode (UART 0x40-0x5C ↔ HID 0x8A-0xA6 dual-code reference) |
| Business commands | HID Device Control Commands | Firmware upgrade / reboot / EQ band count / upsampling / EX3D (HID only) |
Business Command Tables¶
Product Configuration Commands (XU316↔MCU, big-endian frames)¶
| Command | Command Description | Direction | Applicability Notes |
|---|---|---|---|
| 0x20 | Report application status | XU316→MCU | Sent on status change or 15s timer |
| 0x21 | Media control | MCU→XU316 | Converted by XU316 to HID command sent to computer |
| 0x22 | Report playback audio stream format and type | XU316→MCU | For displaying PCM/DSD/MQA/DOP status |
| 0x23 | Set input/output mode | MCU→XU316 | Mode values in datasheet section 2.1 table |
| 0x24 | Send playback volume | XU316→MCU | Left/right channel, 1 byte each |
| 0x25 | Send recording volume | XU316→MCU | Reserved command, currently not used |
| 0x26 | Switch MCLK | MCU→XU316 | Internal/external master clock switching |
| 0x27 | Set unmute | MCU→XU316 | DAC unmute delay during mode switching |
| 0x28 | Send audio format time delay | MCU→XU316 | Audio format switching delay configuration |
| 0x29 | Report USB connection status | XU316→MCU | Proactively reported on USB connect/disconnect |
| 0x30 | Set Mute pin inversion | MCU→XU316 | Adapts hardware with inverted Mute polarity |
| 0x31 | Get current audio format | MCU→XU316 | Queries current audio stream format and type |
| 0xF0 | DAC configuration selection | MCU→XU316 | Product-specific, not supported by all products |
| 0xF1 | Get firmware version | MCU→XU316 | Queries XU316 firmware version (3-byte BCD major version) |
| 0xF3 | Query complete version number | MCU→XU316 | Returns complete ASCII version string (model_vMajor.Minor.Rev_bBuild) |
| 0xEE | HID data passthrough | XU316→MCU | HID passes data to MCU via XU316 (e.g. MCU OTA) |
Usage Prerequisites
The above commands can only be used after device startup is complete (after XU316 sends the 0x05 startup complete command and receives the response). All commands must follow the base protocol frame format (frame header 0x55AA, big-endian transmission, checksum = sum of all bytes from frame header modulo 256); each command requires acknowledgment from the recipient, with a default timeout of 300ms and up to 4 retries.
EQ and Tone Control Commands (UART/HID dual codes)¶
| UART Command | HID Command | Name | Function |
|---|---|---|---|
| 0x40 | 0x8A | SET_EQ_MODE | Switch EQ Mode |
| 0x41 | 0x8B | GET_EQ_MODE | Get EQ Mode Information |
| 0x42 | 0x8C | SET_MODE_GAIN_AND_NAME | Set Mode Overall Gain and Name |
| 0x43 | 0x8D | SET_EQ_PARAMS | Send EQ Parameters |
| 0x44 | 0x8E | GET_EQ_PARAMS | Read EQ Parameters |
| 0x45 | 0x8F | GET_DEVICE_INFO | Get Device Information |
| 0x46 | 0x90 | RESET_EQ_PARAMS | Reset EQ Parameters |
| 0x47 | 0x91 | GET_EQ_MODE_COUNT | Get Total EQ Mode Count |
| 0x48 | 0x92 | SET_AND_SAVE_EQ_MODE | Set and Save EQ Mode |
| 0x49 | 0x93 | SET_VOLUME | Set Volume Level (Disabled) |
| 0x4A | 0x94 | GET_VOLUME | Get Volume Level (Disabled) |
| 0x4B | 0x95 | GET_LED_INFO | Get LED Information (Disabled) |
| 0x4C | 0x96 | SET_LED_SWITCH | Set LED Switch (Disabled) |
| 0x4D | 0x97 | GET_LED_SWITCH | Get LED Switch (Disabled) |
| 0x4E | 0x98 | GET_LED_STATUS | Get LED Status (Disabled) |
| 0x4F | 0x99 | GET_LED_COUNT | Get LED Count (Disabled) |
| 0x50 | 0x9A | GET_UAC_MODE_INFO | Get UAC Mode Information (Disabled) |
| 0x51 | 0x9B | SET_UAC_MODE | Set UAC Mode (Disabled) |
| 0x52 | 0x9C | GET_CURRENT_UAC_MODE | Get Current UAC Mode (Disabled) |
| 0x53 | 0x9D | SET_EQ_ENABLE | Set EQ Enable Switch |
| 0x54 | 0x9E | GET_EQ_ENABLE | Get EQ Enable Switch |
| 0x55 | 0x9F | GET_SAMPLE_FORMAT | Get Sample Rate and Format |
| 0x56 | 0xA0 | SET_GAIN_MODE | Set Gain Mode (Disabled) |
| 0x57 | 0xA1 | GET_GAIN_MODE | Get Gain Mode (Disabled) |
| 0x58 | 0xA2 | SET_FILTER_MODE | Set Filter Mode (Disabled) |
| 0x59 | 0xA3 | GET_FILTER_MODE | Get Filter Mode (Disabled) |
| 0x5A | 0xA4 | SET_GAME_MODE | Set Game Mode (Disabled) |
| 0x5B | 0xA5 | GET_GAME_MODE | Get Game Mode (Disabled) |
| 0x5C | 0xA6 | GET_FIRMWARE_VERSION | Get Firmware Version |
| 0x5D | 0xB3 | SET_EQ_BAND_COUNT | Set EQ Band Count |
| 0x5E | 0xB4 | GET_EQ_BAND_COUNT | Get EQ Band Count |
HID Device Control Commands (HID only)¶
| Command Header | Name | Function | Applicability Notes |
|---|---|---|---|
| 0xA7 | FIRMWARE_UPGRADE_START | Start firmware upgrade | |
| 0xA8 | FIRMWARE_UPGRADE_DATA | Transmit firmware data block | 57 bytes per block |
| 0xA9 | FIRMWARE_UPGRADE_END | End firmware upgrade | Device verifies image integrity |
| 0xAA | FIRMWARE_UPGRADE_STATUS | Get upgrade status | |
| 0xAB | FIRMWARE_UPGRADE_ABORT | Abort firmware upgrade | |
| 0xAC | FIRMWARE_UPGRADE_ERASE | Erase upgrade image | |
| 0xAE | DEVICE_REBOOT | Device reboot | No response |
| 0xB3 | SET_EQ_BAND_COUNT | Set EQ band count | 8/16/24/32 bands, saved to Flash |
| 0xB4 | GET_EQ_BAND_COUNT | Get EQ band count | |
| 0x80 | SET_UPSAMPLE | Set sample rate upsampling | 0=disable 1=enable |
| 0x81 | GET_UPSAMPLE | Get upsampling status | |
| 0xB0 | SET_EX3D_CMD | Send EX3D set command | VID 0x20B1/PID 0x80D3 only |
| 0xB1 | GET_EX3D_CMD | Read EX3D command | VID 0x20B1/PID 0x80D3 only |
Command Applicability
Product firmwares may support different business command subsets (e.g. 0xF0 is product-specific; EX3D applies only to VID 0x20B1/PID 0x80D3 devices). The commands actually supported by each product are governed by the content embedded in the "Product Control Commands" chapter of its datasheet.
Name Mapping
Former names → current names: XU316 USB HiFi Decoder Zero-Code Product Configuration Protocol / Standard Product Configuration Protocol / MCU Serial Communication Protocol → XU316 UART Base Protocol + Product Configuration Commands; XMOS EQ UART Control Protocol and Command Set → EQ UART Base Protocol + EQ and Tone Control Commands; XMOS EQ HID Communication Protocol Specification → USB HID Base Protocol + EQ/HID Device Control Commands. Old links redirect automatically.

