Intro to Bluetooth Generic Attribute Profile (GATT)
From Ellisys SIG Member (Better Analysis)
欢迎观看蓝牙低能耗技术系列的新视频。
在今天的视频中,我们将介绍蓝牙技术中最重要的概念--通用属性配置文件(简称 "GAP")。
我们将在本视频中讨论的一些主题包括属性协议或 att、通用属性配置文件或差距、服务和特性、配置文件以及对设备暴露的数据进行的不同操作。
Welcome to this new video in the series on bluetooth low energy technology.
In today's video we'll be going over what is arguably the most important concept in ble, the generic attribute profile or gap for short.
Some of the topics we'll address in this video include the attribute protocol or att, the generic attribute profile or gap, services and characteristics, profiles, as well as the different operations on the data exposed by devices.
要更好地理解什么是GAP,我们首先需要了解GAP的底层框架或基础设施,即属性协议。
属性协议定义了服务器如何向客户端公开数据,以及这些数据在服务器中的结构。
数据的结构是属性,而属性只是服务器公开的任何数据元素的总称。
To better understand what gap is, we first need to understand the underlying framework or infrastructure for gap which is the attribute protocol.
The attribute protocol defines how a server exposes its data to a client, and how this data is structured within that server.
The data is structured as attributes and an attribute is simply the generic term for any data element that is exposed by the server.
稍后我们将讨论不同类型的属性。
属性协议中有两种角色。第一种是服务器角色,它公开自己控制或包含的数据。它是接受来自对等设备的传入命令并发送其他类型数据包的设备,如响应、通知和指示,我们稍后将讨论这些数据包。
另一个角色是客户端角色,它与服务器对接,目的是读取服务器的公开数据或控制其行为。这种设备负责发送命令和请求,并监听来自服务器的通知和指示。
请记住,设备可以同时扮演服务器和客户端两种角色。
属性的结构如下。它包括一个句柄、一个属性类型或所谓的 uuid、一个值和一组权限。
We'll talk about the different types of attributes here shortly.
There are two roles within the attribute protocol. The first is the server role which exposes the data it controls or contains. It's the device that accepts incoming commands from my peer device and sends out other types of packets such as responses, notifications and indications which we'll talk about shortly.
The other role is the client role which interfaces with the server with the purpose of reading the server's exposed data or controlling its behavior. This is the device that sends out commands and requests, and listens for notifications and indications from a server.
Keep in mind that a device can act in both roles, a server and a client at the same time.
An attribute is structured as following. It includes a handle, an attribute type or what's called a uuid, a value and a set of perm