Author: aegisSoft

Reverse Engineering the QCY Wuqi SoC BLE GATT Protocol: Inside QCYbutMOD

Deep dive into Wuqi WQ7033/WQ7034 BLE GATT reverse engineering for QCY earbuds: 0000A001 vs 00007033 routing, 0xFF framed packets, ANC Echo Guard, derived LE address fallback, and DSP-level tone muting.

#reverse-engineering#bluetooth-le#gatt#wuqi#kotlin#android#qcybutmod

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) and 00001002-... (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), and 0000000f-... (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:

  • 0x05 Find Device, 0x06 In-Ear Detection, 0x07 Firmware Version, 0x09 Game Mode (FF 03 09 01 01/02), 0x10 Sleep Mode, 0x11 Fit Test (CMD_FIT_TEST).
  • 0x17 ANC 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].
  • 0x1D Hardware 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 (6 sys_eq baseline filters + 10 user bands), Left/Right Channel EQ.
  • 0x23 LDAC Switch, 0x24/0x4D Multipoint, 0x2B Key Functions (verified by reading back 0000000d), 0x2F Battery Query, 0x54 Adaptive AI ANC, 0xFE Request 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): A 2500 ms sliding window filter on 0x17 notifications canonicalizes [mode, subScene, byte2] (normalizing Adaptive subScene 0 vs 5 when mode == 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.

Command Palette

Search for a command to run...