各种概念请参考:
官方版 https://developer.android.com/guide/topics/connectivity/bluetooth-le.html
中文版 http://blog.csdn.net/qinxiandiqi/article/details/40741269
中文版有官方demo 的解析
以下以另一个demo 为例子
这个demo 的github网址是:
https://github.com/movisens/SmartGattLib
关于 Service :
每一个设备 包含有 多个Services 每个service 对应一个uuid(可以根据Assign Number
生成,后面会提到), services 的 uuid 在attribute添加 就是在官方SmartGattLib 的
Characteristic(与以下的characteristic不同,这个只是作者这样命名)这个类里面。
关于Characteristic:
每一个Service 包含多个Characteristic, 每一个 Characteristic:对应一个uuid
(可以根据Assign Number 生成,后面会提到)),Characteristic uuid 在attribute 添加 就是在 SmartGattLib的Characteristic(与标题的characteristic不同,这个只是作者这样
命名)这个类里面。

本文详细介绍了蓝牙BLE在智能医疗设备开发中的应用,包括理解Service和Characteristic的概念,如何通过uuid获取数据,以及如何从蓝牙官网获取assigned number并生成UUID。通过示例项目SmartGattLib,阐述了如何读取和解析数据,如HeartRateMeasurement,以获取心率值。
最低0.47元/天 解锁文章
2018

被折叠的 条评论
为什么被折叠?



