博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【转】Android低功耗蓝牙应用开发获取的服务UUID
阅读量:4522 次
发布时间:2019-06-08

本文共 1781 字,大约阅读时间需要 5 分钟。

原文网址:http://blog.csdn.net/zhangjs0322/article/details/39048939

Android低功耗蓝牙应用程序开始时获取到的蓝牙血压计所有服务的UUID如下所示:

08-28 09:05:48.488: D/BluetoothGatt(4251): onGetService() - Device=08:7C:BE:21:D1:24 UUID=00001800-0000-1000-8000-00805f9b34fb

08-28 09:05:48.489: D/BluetoothGatt(4251): onGetService() - Device=08:7C:BE:21:D1:24 UUID=00001801-0000-1000-8000-00805f9b34fb

08-28 09:05:48.490: D/BluetoothGatt(4251): onGetService() - Device=08:7C:BE:21:D1:24 UUID=ba11f08c-5f14-0b0d-10a0-007cbe21d124

08-28 09:05:48.491: D/BluetoothGatt(4251): onGetService() - Device=08:7C:BE:21:D1:24 UUID=0000cc03-0000-1000-8000-00805f9b34fb

总共4个服务UUID,其中“ba11f08c-5f14-0b0d-10a0-007cbe21d124”为血压测量服务的UUID,通过该UUID可获取其拥有的characteristics。

而1800和1801服务UUID为TI蓝牙协议栈的GATT层服务。TI协议栈在Components/ble/include/gatt_uuid.h文件中对应定义如下:

GATT的1800和1801服务的characteristic值如下:

08-28 09:05:48.492: D/BluetoothGatt(4251): onGetCharacteristic() - Device=08:7C:BE:21:D1:24 UUID=00002a00-0000-1000-8000-00805f9b34fb

08-28 09:05:48.494: D/BluetoothGatt(4251): onGetCharacteristic() - Device=08:7C:BE:21:D1:24 UUID=00002a01-0000-1000-8000-00805f9b34fb
08-28 09:05:48.495: D/BluetoothGatt(4251): onGetCharacteristic() - Device=08:7C:BE:21:D1:24 UUID=00002a02-0000-1000-8000-00805f9b34fb
08-28 09:05:48.495: D/BluetoothGatt(4251): onGetCharacteristic() - Device=08:7C:BE:21:D1:24 UUID=00002a04-0000-1000-8000-00805f9b34fb
08-28 09:05:48.496: D/BluetoothGatt(4251): onGetCharacteristic() - Device=08:7C:BE:21:D1:24 UUID=00002a03-0000-1000-8000-00805f9b34fb
08-28 09:05:48.498: D/BluetoothGatt(4251): onGetCharacteristic() - Device=08:7C:BE:21:D1:24 UUID=00002a05-0000-1000-8000-00805f9b34fb

其中0x2a05特征值为1801服务的characteristic,其余为1800服务的characteristic。

 

对应在gatt_uuid.h文件中characteristics定义如下:

转载于:https://www.cnblogs.com/wi100sh/p/5188980.html

你可能感兴趣的文章
如何简单解释 MapReduce算法
查看>>
从 0 到 1 实现 React 系列 —— 1.JSX 和 Virtual DOM
查看>>
面向接口编程详解(二)——编程实例
查看>>
解决java.lang.NoClassDefFoundError: org/apache/log4j/Level
查看>>
端口号
查看>>
mysql for macOS安装
查看>>
iOS中的KeyChain的用途
查看>>
jquery与checkbox的checked属性的问题
查看>>
HDU5092——Seam Carving(动态规划+回溯)(2014上海邀请赛重现)
查看>>
java 格式化字符串
查看>>
[.Net]轻量ORM——Dapper
查看>>
语言基础
查看>>
C# : 操作Word文件的API - (将C# source中的xml注释转换成word文档)
查看>>
C#中字符串转换成枚举类型的方法
查看>>
psplash
查看>>
git的安装和简单使用
查看>>
Airplace平台
查看>>
TinyOS实例介绍
查看>>
css hack 尽我所见
查看>>
[转]ORACLE联机日志文件无故全部消失
查看>>