Android低功耗蓝牙应用开发获取的服务UUID
2014-09-04 10:52
836 查看
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定义如下:
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定义如下:
相关文章推荐
- 【转】Android低功耗蓝牙应用开发获取的服务UUID
- Android BLE蓝牙开发-读写数据 获取UUID
- 【Android应用开发】Android 蓝牙低功耗 (BLE) ( 第一篇 . 概述 . 蓝牙低功耗文档 翻译)
- Android BLE低功耗蓝牙开发(下) BLE客户端(中央设备)与GATT服务的通讯
- 【Android应用开发】Android 蓝牙低功耗 (BLE) ( 第一篇 . 概述 . 蓝牙低功耗文档 翻译)
- 【Android应用开发】Android 蓝牙低功耗 (BLE) ( 第一篇 . 概述 . 蓝牙低功耗文档 翻译)
- 【Android应用开发详解】第01期:第三方授权认证(一)实现第三方授权登录、分享以及获取用户资料
- Android菜鸟开发之蓝牙(Bluetooth)---设置应用源码分析
- Android应用开发之获取网络数据
- HAL(4) -- 开发android源码硬件访问服务和应用测试程序
- Android应用开发实战第二版 demo 基于服务的微博照片分享(修改版)
- Android应用开发提高篇(1)-----获取本地IP
- Android开发16——获取网络资源之基础应用 推荐
- Android中的蓝牙Bluetooth应用开发基础
- Android开发传感器应用---获取加速度
- Android应用开发系列课程------获取中国传统节日
- 【Android应用开发详解】第01期:第三方授权认证(一)实现第三方授权登录、分享以及获取用户资料
- Android应用开发之利用服务实现电话监听
- Android应用开发之获取web服务器xml数据
- Android开发16——获取网络资源之基础应用