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

•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

特征值可能包含可选的”描述符“属性,”描述符“属性包含配置字段或描述字段。




•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。

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值