低功耗蓝牙BLE对应Gatt的UUID
參考http://blog.csdn.net/zhangjs0322/article/details/39048939?
參考http://code.taobao.org/p/watch_demo/diff/2/trunk/yqc_watch/Components/ble/include/gatt.h
1、在BLE中UUID由32個Hex字符組成(共16字節)。格式為?
88888888-4444-4444-4444-CCCCCCCCCCCC
2、TI協議棧在Components/ble/include/gatt_uuid.h文件中。
3、1800和1801服務UUID為TI藍牙協議棧的GATT層服務。
?
/**
?* WARNINGS: The 16-bit UUIDs are assigned by the Bluetooth SIG and published in the Bluetooth Assigned Numbers page. Do not change these values. Changing them will cause Bluetooth interoperability issues.
?*/
/**
?* GATT Services
?*/
?#define GAP_SERVICE_UUID ? ? ? ? ? ? 0x00001800 // Generic Access Profile 通用接入規范
?#define GATT_SERVICE_UUID ? ? ? ? ? ?0x00001801 // Generic Attribute Profile 通用屬性規范12345678
4、gatt_uuid.h文件中characteristics定義如下
/**
?* GATT Characteristics
?*/
?#define DEVICE_NAME_UUID ? ? ? ? ? ? ?0x00002A00 // Device Name 設備名稱
?#define APPEARANCE_UUID ? ? ? ? ? ? ? 0x00002A01 // Appearance 外貌特征
?#define PERI_PRIVACY_FLAG_UUID ? ? ? ?0x00002A02 // Peripheral Privacy Flag 外圍設備隱蔽標志
?#define PECONNECT_ADDR_UUID ? ? ? ? ? 0x00002A03 // Peconnection Address 連接地址
?#define PERI_CONN_PARAM_UUID ? ? ? ? ?0x00002A04 // Peripheral Preferred Connection Parameters 外圍設備首選連接參數?
?#define SERVICE_CHANGED_UUID ? ? ? ? ?0x00002A05 // Service Changed 服務改變123456789
5、手機的BLE默認有2個服務?
? ? (1)Service 通用屬性規范 00001801-0000-1000-8000-00805f9b34fb (null)?
? ? ? ? ? ? ?a)Characteristic 服務改變 00002a05-0000-1000-8000-00805f9b34fb?
? ? (2)Service 通用接入規范 00001800-0000-1000-8000-00805f9b34fb?
? ? ? ? ? ? ?a)Characteristic 設備名稱 00002a00-0000-1000-8000-00805f9b34fb?
? ? ? ? ? ? ?b)Characteristic 設備外觀 00002a01-0000-1000-8000-00805f9b34fb (00 00)?
? ? ? ? ? ? ?c)Characteristic 設備外觀 00002aa6-0000-1000-8000-00805f9b34fb (01)?
注意:因為00002aa6不在定義中,因此可以認為是廠商或者用戶自定義的特征(或服務)
?
?
?
作者:福州-司馬懿?
來源:CSDN?
原文:https://blog.csdn.net/chy555chy/article/details/52229670?
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!
總結
以上是生活随笔為你收集整理的低功耗蓝牙BLE对应Gatt的UUID的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Bluetooth GAP介绍
- 下一篇: NRF51822之动态广播使用