Moyoung Protocol¶
The Moyoung protocol is used by a lot of smart watches managed by the Da Fit app and by COLMI Fit.
There are two versions of the protocol, V1 and V2. This description is based on comments in MoyoungConstants.java and the Wireshark dissector.
Protocol version is determined by reading manufacturer name. MOYOUNG for old fixed-size or MOYOUNG-V2 for MTU. The non-MTU version uses packets of size 256 for firmware >= 1.6.5, and 64 otherwise.
Moyoung V2 Format¶
fe ea 20 0a 31 68a3100308
| | | | | +-- payload
| | | | +----- command
| | | +-------- size low byte
| | +----------- size high byte + 32
+--+-------------- UUID 0xfeea
The device communicates by writing to UUID_CHARACTERISTIC_DATA_OUT in MTU-sized chunks. The value of MTU seems to be somehow changeable (?), but the default is 20. Responses are received via notify on UUID_CHARACTERISTIC_DATA_IN in similar format. The write success notification comes AFTER the responses.
The size value includes the UUID, size and command bytes, so a command with no payload comes with size=5.
Commands¶
The command byte defines the basic action. The command structure has grown historically, thus is not very consequential. Some commands come as a pair of "set" and "get", where get is 0x10 higher than set, e.g:
0x11set alarms0x21get alarms
Typically, a "get" request doesn't have a payload, and its comes with the same command byte and the payload appended.
Furthermore, there are multiple commands that have a sub-command, and even a sub-sub-command, e.g.:
- Workout commands
0xb2 00workout list request0xb2 01workout list response
- Advanced command (
0xb9) sub-command eCard (0x12):0xb9 12 00 02eCard config request0xb9 12 00 03eCard content request
Generally, 0xb9 seems to be the "advanced command" with further functions, where the sub-command also follows the get=set+0x10 convention.
The Workout command 0xb2 does not have a "set" counterpart, but its requests and responses have different sub-command values (incremented by 1).
Watch Faces¶
The upload / download of watch faces is not supported by Gadgetbridge, but there are other FOSS tools:
- DaFup - UI/CLI uploader for MoYoung v2 watch face files (Python)
- extrathundertool - encoder / decoder for watch face files (Rust)