Name Last Update
..
3rd Loading commit data...
Assets.xcassets Loading commit data...
Base.lproj Loading commit data...
Basic Loading commit data...
Home Loading commit data...
LaunchSetting Loading commit data...
Mine Loading commit data...
Motion Loading commit data...
OTA Loading commit data...
RunScript Loading commit data...
Setting Loading commit data...
Tools Loading commit data...
de.lproj Loading commit data...
dial Loading commit data...
en.lproj Loading commit data...
es.lproj Loading commit data...
fr.lproj Loading commit data...
it.lproj Loading commit data...
ja.lproj Loading commit data...
ms.lproj Loading commit data...
pt-PT.lproj Loading commit data...
ru.lproj Loading commit data...
th.lproj Loading commit data...
zh-Hans.lproj Loading commit data...
20231111ReadMe.md Loading commit data...
20240110ReadMe.md Loading commit data...
20240126ReadMe.md Loading commit data...
20240301ReadMe.md Loading commit data...
AppDelegate.swift Loading commit data...
AppSettings.swift Loading commit data...
HDFwear-Bridging-Header.h Loading commit data...
HDFwear.entitlements Loading commit data...
Info.plist Loading commit data...
ReadMe.txt Loading commit data...
Sound1.wav Loading commit data...
test.h Loading commit data...
test.m Loading commit data...

ReadMe.txt

接口说明:

接口实现
BluetoothManager+Function

发送数据类
1. 通用应答
func response(frameNumber: [UInt8], messageId: [UInt8], success: Bool, completion: ((_ error: Int?) -> ())? = nil)

2. 查询设备信息
func queryDeviceInfo(queryItems: [UInt8], completion: ((_ error: Int?) -> ())? = nil)
发送: [237, 126, 0, 1, 0, 16, 0, 1, 0, 3, 2, 2, 3, 169, 70]
接收: [237, 126, 0, 1, 128, 1, 0, 37, 0, 5, 0, 1, 0, 16, 0, 129, 5]

3. 设置时间
func newSetTime(completion: ((_ error: Int?) -> ())? = nil)
发送: [237, 126, 0, 1, 0, 9, 0, 1, 0, 6, 23, 7, 1, 17, 3, 38, 32, 36]
接收: [237, 126, 0, 1, 128, 1, 0, 14, 0, 5, 0, 1, 0, 9, 0, 149, 41]

5. 设置温度单位
func newSetTemperatureUnit(unit: TemperatureUnit, completion: ((_ error: Int?) -> ())? = nil)
发送: [237, 126, 0, 1, 0, 17, 0, 1, 0, 1, 1, 231, 163]
接收: [237, 126, 0, 1, 128, 1, 0, 31, 0, 5, 0, 1, 0, 17, 0, 101, 148]

8. 设置触摸唤醒
func newSetTouchSense(bool: Bool, completion: ((_ error: Int?) -> ())? = nil)
发送: [237, 126, 0, 1, 0, 20, 0, 1, 0, 1, 1, 164, 162]

12. 设置心率过高提醒
func newSetHeartRateHighRemind(maxHr: UInt8, completion: ((_ error: Int?) -> ())? = nil)
发送: [237, 126, 0, 1, 0, 24, 0, 1, 0, 1, 120, 64, 255]
接收: [237, 126, 0, 1, 128, 1, 0, 33, 0, 5, 0, 1, 0, 24, 0, 7, 193]

13. 设置心率过低提醒
func newSetHeartRateLowRemind(minHr: UInt8, completion: ((_ error: Int?) -> ())? = nil)
发送: [237, 126, 0, 1, 0, 25, 0, 1, 0, 1, 120, 5, 95]

接受数据类
1. 通用返回数据
private func parseDefaultResponseData(_ bytes: [UInt8])
接收: [237, 126, 0, 1, 128, 1, 0, 14, 0, 5, 0, 1, 0, 9, 0, 149, 41]

2. 设备信息数据
private func parseDeviceInfoData (_ content:[UInt8])

5. 体温数据
func parseTemperaturData (_ content: [UInt8])

8. 睡眠数据
func parseSleepData (_ content: [UInt8])

9. 电量变化自动上报
0x8010

10. 电话挂断
0x8014

11. 找手机
0x8015

底层指令组包
BleMessage+Function
匹配上面的发送的数据与接受的数据