OpenBand BLE Bridge Protocol Specification
Reverse-engineered communication protocol for Xiaomi Smart Band 7 (Zepp OS 1.0 / Dialog DA14697) and compatible Huami/Zepp wearables.
1. Overview & Multiplexing
Unlike official cloud-tethered apps, OpenBand connects directly over Bluetooth Low Energy (BLE) to the Band using Android's native GATT multiplexing:
[ Zepp OS Mini-App on Band ]
│ hmBle.send() / hmBle.createConnect()
▼
[ Dialog DA14697 BLE Firmware ]
│
BLE ACL Link (Authenticated by Zepp Life / Mi Fitness)
│
▼
[ OpenBand Companion (Android) ]
│ connectGatt(..., TRANSPORT_LE)
▼
[ Local Action Gateway / Home Assistant (127.0.0.1 or LAN) ]
Because Zepp Life maintains the bonded ACL link, OpenBand opens an independent client GATT handle without requiring root access or re-pairing keys.
2. GATT Service & Characteristics
Under the Huami primary service:
- Service UUID:
0000fee0-0000-1000-8000-00805f9b34fb
Communication occurs across two dedicated characteristics:
| Characteristic | UUID | Properties | Purpose |
|---|---|---|---|
| Chunked Read / Notify | 00000017-0000-3512-2118-0009af100700 | NOTIFY, READ | Wrist $\to$ Phone actions from hmBle.send() |
| Chunked Write | 00000016-0000-3512-2118-0009af100700 | WRITE, WRITE_NO_RESPONSE | Phone $\to$ Wrist data into hmBle.createConnect() |
| CCCD Descriptor | 00002902-0000-1000-8000-00805f9b34fb | WRITE | Client Characteristic Configuration |
3. Huami 2021 Chunked Framing Format
All payloads passing through 00000016 (write) and 00000017 (notify) are wrapped in an 11-byte Little-Endian binary header:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode (0x03)| Channel ID (0x0007) | Seq (2B) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Total Payload Length (4B) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Flags (0xA0) | Reserved(0x00)| Payload Bytes ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Header Fields:
Byte 0:0x03(Opcode for Chunked Transfer 2021)Bytes 1-2(uint16_le):0x0007(Channel ID: App Messaging)Bytes 3-4(uint16_le): Packet sequence counter (increments on every outbound transmission)Bytes 5-8(uint32_le): Length of payload in bytesBytes 9-10:0xA0, 0x00(Flags:0xA0indicates a complete single chunk)Bytes 11+: Application payload (e.g.OPENBAND:<action>orTemp: 24.5 C)
4. Transmission Flows
Flow A: Wrist Action $\to$ Phone
- User taps button on wrist mini-app.
- Mini-app calls
OpenBandBridge.sendAction("light_living_room"). - Band firmware wraps payload into the 11-byte frame and sends a BLE Notification on characteristic
00000017. - OpenBand receives
onCharacteristicChanged()on00000017. - OpenBand isolates
OPENBAND:<action>, discards binary headers, and dispatches to:- Android Testing Popup / Notification
- Home Assistant REST / Webhook (
127.0.0.1:8123or LAN) - Phone Automation (Find My Phone, Torch)
Flow B: Phone Data $\to$ Wrist (e.g. Temperature / Status)
- Phone constructs payload (e.g.
"Temp: 23.5 C\nStatus: Online"). - Android packages payload using
encodeHuamiFrame()(11-byte header). - Android writes packet to characteristic
00000016. - Band firmware strips header and delivers bytes to
hmBle.createConnect()callback. OpenBandBridgedecodesArrayBuffer/Uint8Arrayinto clean text and updates the on-screen widget.
5. Critical Implementation Gotchas
- Android CCCD Write Queue:
Android's
BluetoothGattdrops concurrent descriptor writes. Subscribing to notifications must use a sequential queue governed byonDescriptorWrite(). - Sensor Filtering:
Characteristic
00000007continuously streams real-time accelerometer and step data. Never enable notifications on0x0007for app messaging. - No Automatic Echo Loop:
When writing to
00000016, the band may emit a low-level protocol acknowledgment on00000017. Phone listeners must strictly filter forOPENBAND:and never echo automatic ACKs insideonActionReceived()to prevent infinite loops. - Connection Priority:
Request
BluetoothGatt.CONNECTION_PRIORITY_HIGHupon connect to reduce BLE packet interval from $\sim 100\text{ ms}$ to $\sim 11\text{ ms}$.