Reverse Engineering the QCY Wuqi SoC BLE GATT Protocol: Inside QCYbutMOD
Most wireless earbuds lock hardware features—ANC modes, 10-band EQ, touch mappings, and game mode—behind closed-source companion apps packed with telemetry and mandatory accounts.
QCYbutMOD is a privacy-first, offline-capable Android companion suite written in Kotlin and Jetpack Compose for Wuqi SoC (WQ7033 / WQ7034) QCY earbuds, covering MeloBuds Pro, N20, H4, and 199+ models listed in products.json.
1. BLE GATT Services, Characteristics, and Routing Fix
In QcyProtocol.kt and BleConnectionManager.kt, the mapped services and characteristics include:
- Primary QCY Service (
SERVICE_UUID):0000a001-0000-1000-8000-00805f9b34fb - Wuqi Service / SPP (
SERVICE_WUQI/SPP_UUID_WUQI):00007033-0000-1000-8000-00805f9b34fb - BES Service (
SERVICE_BES):66666666-6666-6666-6666-666666666666 - Standard SPP:
00001101-0000-1000-8000-00805f9b34fb
Under 0000A001:
00001001-...(CHAR_COMMAND_TX) and00001002-...(CHAR_NOTIFY_RX) handle framed command TX/RX.- Direct read/write characteristics include
00000008-...(3-byte raw Battery: Left, Right, Case),00000007-...(Firmware),0000000b-...(EQ Config),0000000d-...(Key Mapping), and0000000f-...(V1 Setting). - Wuqi secondary TX/RX (
00002001-...,00002002-...), BES RW (77777777-7777-7777-7777-777777777777), and manufacturer beacon IDs (0x521C,0x522C,0x05D6) are also supported.
When both 0000A001 and 00007033 expose 00001001/00001002, BleConnectionManager prioritizes 0000A001 first for TX/RX subscriptions so commands never misroute.
2. 0xFF Framed Packet Structure and Commands
QcyProtocol.kt (packFrame) encodes commands as:
[0xFF, bodyLength, cmdId, paramLength, ...params]
└─ bodyLength = 2 + paramLength
Key command IDs include:
0x05Find Device,0x06In-Ear Detection,0x07Firmware Version,0x09Game Mode (FF 03 09 01 01/02),0x10Sleep Mode,0x11Fit Test (CMD_FIT_TEST).0x17ANC Setting ([mode, subScene, noiseValue]): Off[0x02, 0x00, 0x00]; ANC Adaptive[0x01, 0x05, 0x00], Anti-Wind[0x01, 0x04, 0x00], Indoor/Commuting/Crowd[0x01, 1..3, 0..2]; Transparency[0x03, 0x01..0x02, 1..6].0x1DHardware DSP Tone Volume (CMD_TONE_VOLUME = 0x1D) — mutes built-in English voice prompts at the DSP level (Tone Volume = 0).0x1E/0x20/0x22/0x46/0x47: EQ Select, 10-band Multi-EQ (6sys_eqbaseline filters + 10 user bands), Left/Right Channel EQ.0x23LDAC Switch,0x24/0x4DMultipoint,0x2BKey Functions (verified by reading back0000000d),0x2FBattery Query,0x54Adaptive AI ANC,0xFERequest All Data.
3. Key Engineering Solutions
- Derived LE Address (
AutoConnectDecision.deriveLeAddress): Dual-address Wuqi earbuds do not answer GATT on their classic BR/EDR MAC. The app tries direct LE, falls back to the derived LE address from the paired classic MAC, and falls back to BLE scanning if needed. - ANC Echo Guard (
AncEchoGuard.kt): A2500 mssliding window filter on0x17notifications canonicalizes[mode, subScene, byte2](normalizing Adaptive subScene0vs5whenmode == 1) and drops stale out-of-order echoes that would otherwise snap the UI back. - Dual-Engine Live Translation: Offline 59-language ML Kit plus optional Gemini Live AI with 180° face-to-face mode and Bluetooth SCO mic routing.
Source code: MrSpy00/QCYbutMOD on GitHub.