为保证良好的用户体验,与运动健康对接的体脂秤应满足以下要求:
标准蓝牙体脂秤应支持WSP协议,符合WSP协议第三章(Weight Scale Role Requirements)要求。
体脂秤在待机时应关闭蓝牙(停止广播,断开连接),用户测量时开启蓝牙并发起广播;蓝牙广播时应携带Public Device Address。
测量结束后,应立即传输数据,并且在数据传输成功后10s内关闭连接并进入待机状态。
支持测量体脂率的秤,应当在秤端计算体脂率并将结果传递给手机。
体脂秤应保证测量结果传输的完整性和原子性。
支持保存历史数据的体脂秤,最好支持时钟,以便在脱机状态下能够记录测量时间。
运动健康App接收到体脂秤蓝牙广播后,主动发起连接。如果连接成功,则开始发现服务流程。通常情况下,体脂秤应至少返回WSS、BCS、UDS和CTS这几项服务。接下来,App通过CTS服务与体脂秤同步时间。秤端应当以最后一次同步的时间为基准重新校准其时钟。然后App会通过UDS服务设置用户信息(身高、年龄和性别)。体脂秤应当缓存或永久保存用户信息以备计算体脂率。设置信息后,App会开启数据通知,允许体脂秤上传测量数据。

运动健康App 测量体重时,使用了下列 Service 和 Characteristic。
Service / Feature | UUID | Mandatory Field(s) |
|---|---|---|
Weight Scale Service | 0x181d | - |
Weight Scale Feature | 0x2a9e | - |
Weight Measurement | 0x2a9d | Flags, Weight-SI, Time Stamp |
Body Composition Service | 0x181b | - |
Body Composition Feature | 0x2a9b | - |
Body Composition Measurement | 0x2a9c | Flags, Body Fat Percent , Time Stamp |
User Data Service | 0x181c | - |
Age | 0x2a80 | Age |
Gender | 0x2a8c | Gender |
Height | 0x2a8e | Height |
Current Time Service | 0x1805 | - |
Current Time | 0x2a2b | Exact Time 256,Adjust Reason |
Weight Measurement 说明:
字节 | 格式 | 描述 |
|---|---|---|
Flags | Uint8 | 测量结果标志字节 |
bit0 | 测量单位,0:Kg meter,1:lb in。 | |
bit1 | 是否携带时间戳,0:不携带,1:携带。 | |
bit2 | 是否携带UserID,0:不携带,1:携带。 | |
bit3 | 是否携带BMI和Height,0:不携带,1:携带。 | |
bit4 – bit7 | 保留 | |
时间戳 | Uint8(7字节) | 年月日时分秒(年为2字节,其余为1字节)。 |
UserID | Uint8 | 十进制用户ID,255为 unknown user。 |
BMI | Uint16 | - |
Height | Uint16 | - |
Body Composition Measurement 说明:
字节 | 格式 | 描述 |
|---|---|---|
Flags | Uint16 | 测量结果标志字节 |
bit0 | 测量单位,0:Kg meter,1:lb in。 | |
bit1 | 是否携带时间戳,0:不携带,1:携带。 | |
bit2 | 是否携带UserID,0:不携带,1:携带。 | |
bit3 | 是否携带基础代谢,0:不携带,1:携带。 | |
bit4 | 是否携带肌肉百分比。0:不携带,1:携带。 | |
bit5 | 是否携带肌肉量,0:不携带,1:携带。 | |
bit6 | 是否携带脱脂量,0:不携带,1:携带。 | |
- | Soft Lean Mass | |
- | Body Water Mass | |
- | Impedance | |
- | Weight | |
- | Height | |
- | Multiple Packet Measurement 0: 1: | |
bit13 – bit15 | 保留 | |
体脂率 | Uint16 | - |
时间戳 | Uint8(7字节) | 年月日时分秒(年为2字节,其余为1字节)。 |
UserID | Uint8 | 十进制用户ID,255为 unknown user。 |
RR-Interval | Uint16 | 当Flags的bit4为1时,需有此字段,分辨率为1/1024秒。 |