一.概述
The Generic Attribute Profile (GATT) defines a service framework using the
Attribute Protocol. This framework defines proceduresand formats of services
and their characteristics. The proceduresdefined include discovering, reading,
writing, notifying and indicating characteristics, as well asconfiguring the
broadcast of characteristics.
二.架构
三.ATT属性table
![蓝牙 BLE GATT 剖析(一)_第1张图片](http://img.e-com-net.com/image/info5/df984e22b9e6487f81450e52aa7b600f.jpg)
![蓝牙 BLE GATT 剖析(一)_第2张图片](http://img.e-com-net.com/image/info5/8dc87f83062d4289aa96fa94d04f7835.jpg)
四.GATT profile层次
1.SERVICE DEFINITION
2.INCLUDE DEFINITION
3.CHARACTERISTIC DEFINITION
1)Characteristic Declaration
Characteristic Declaration
2)Characteristic Value Declaration
3)Characteristic Descriptor Declarations
①Characteristic Extended Properties
![蓝牙 BLE GATT 剖析(一)_第5张图片](http://img.e-com-net.com/image/info5/9c062cc6d34e4e40a2245399fc09f301.jpg)
②Characteristic User Description
![蓝牙 BLE GATT 剖析(一)_第6张图片](http://img.e-com-net.com/image/info5/694b2caa4bfd4c3db25e1ef64eeac3da.jpg)
③Client Characteristic Configuration
④Server Characteristic Configuration
⑤Characteristic Presentation Format
![蓝牙 BLE GATT 剖析(一)_第7张图片](http://img.e-com-net.com/image/info5/344029a7112d4fb4a0b86af8ea0e7f32.jpg)
⑥Characteristic Aggregate Format
4.SUMMARY OF GATTPROFILE ATTRIBUTE TYPES
五.GATT FEATURE REQUIREMENTS
There are 11 features defined in the GATT Profile:
1. Server Configuration
2. Primary Service Discovery
3. Relationship Discovery
4. Characteristic Discovery
5. Characteristic Descriptor Discovery
6. Reading a Characteristic Value
7. Writing a Characteristic Value
8. Notification of a Characteristic Value
9. Indication of a Characteristic Value
10.Reading a Characteristic Descriptor
11.Writing a Characteristic Descriptor
具体GATT feature交互参照core4.2
GATT PROCEDURE MAPPING TO ATT PROTOCOL OPCODES
![蓝牙 BLE GATT 剖析(一)_第10张图片](http://img.e-com-net.com/image/info5/e0dc79ab61ec4d77bed7dd0b7743100d.jpg)
![蓝牙 BLE GATT 剖析(一)_第11张图片](http://img.e-com-net.com/image/info5/b6c864cb9a804a4a84ab04520bacb046.jpg)
![蓝牙 BLE GATT 剖析(一)_第12张图片](http://img.e-com-net.com/image/info5/3216f36fa8d645139b7446e3ff6a84d4.jpg)
![蓝牙 BLE GATT 剖析(一)_第13张图片](http://img.e-com-net.com/image/info5/51310cee65244f36969946cc5f813a4a.jpg)