蓝牙研发网

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7167|回复: 0

Generic Attribute Profile (GATT) 通用属性协议

[复制链接]
发表于 2014-7-31 21:14:45 | 显示全部楼层 |阅读模式
本帖最后由 router 于 2014-7-31 21:30 编辑

•Designed for use by the application or a profile, so that an attribute client can communicate with attribute server
为应用程序或配置而设计,使属性客户端可以和属性服务端通讯。

•GATT defines: 通用属性配置的定义

–Procedures for using the attribute protocol (ATT) to discover, read, write, and obtain indications of these attributes
程序使用ATT进行搜索、读写和获取属性指明。

–The grouping and relationship of characteristics within a service or profile
在服务或配置中的分组和关系特征

–Procedures for configuring the broadcast of attributes
程序配置广播属性

•A profile is composed of one or more “services” necessary to fulfill a use-case
一个配置由一个或更多服务组成!
•A service may contain certain attributes called “characteristic values”, which are values used by a service (example: in a temperature sensor, the attribute containing the temperature itself is the characteristic value)
一个服务包含特定的属性称为”特征值“,这些值被服务所用。例如:在一个温度传感器中,属性包含温度本身就是特征值。
•A characteristic value must have a mandatory “characteristic declaration” attribute immediately before the value, containing the properties of the characteristic
一个特征值有受托者”特征声明“属性...包含的属性特征
•Characteristics may also contain optional “descriptor” attributes, with fields such as a configuration or a description
特征值可能包含可选的”描述符“属性,”描述符“属性包含配置字段或描述字段。

GATT profile hierarchy

•When two BLE devices are in the connected state, the GATT client device can perform several different sub-procedures to communicate with the GATT server device:
当两个BLE设备处于连接状态,GATT客户端设备可以执行很多不同子程序去和GATT服务端设备通讯
–Discover Characteristic by UUID –search the GATT server for all attributes with type that matches the specified UUID 通过UUID搜索特征
–Read Characteristic Value –read the value of the characteristic at the specified handle 读取特征值
–Write Characteristic Value –write a new value to the characteristic at the specified handle 写特征值

•A GATT server device, when configured to do so, can send out messages to the GATT client device without being prompted:
GATT服务端设备,当这样配置,可以发送消息给GATT客户端设备,没有提示
–Notification –The value a characteristic is sent from the server to the client without receiving a read request, and does not need to be acknowledged
通知——特征值从服务端发送到客户端,没有接收到读请求,以及不需要“承认”      ?
–Indication –The value a characteristic is sent from the server to the client without receiving a read request, but must be acknowledged before any further data can be sent
指示——特征值从服务端发送到客户端,没有接收到读请求,但在之后的数据被发送之前必须“承认”。

总结:GATT包含若干个Profile,一个Profile包含若干个Services,一个Service包含若干个Characteristics,一个Characteristic包含Properties字段和若干个Descriptor(可选)。
GATT调用下层的ATT,ATT的attirbute在GATT中表现为Characteristic。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|蓝牙研发网 ( 粤ICP备14052215号-1 )

GMT+8, 2024-12-22 22:23 , Processed in 0.062500 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表