智能蓝牙:关贸总协定与。 ATT - 它们之间有什么区别?

Smart Bluetooth: GATT Vs. ATT - what are the differences between them?

任何人都可以为我定义 GATT 和 ATT 之间的区别是什么吗?没看懂。
我知道它们都是处理 BLE 服务的通用协议。但并没有真正理解它。请解释。
谢谢!

ATT 是一种低得多的机制,它基本上定义了如何传输一个数据单元(一个属性)。 GATT 建立在 ATT 之上,定义了更高级别服务的组成方式以及在这些服务上运行的框架。

您可以在此处找到蓝牙规格: Specification Adopted Documents

查看核心版本 4.2,规范卷 3 - 核心系统包 [主机卷]。 ATT 在 F 部分定义,GATT 在 G 部分定义。

A​​TT(第 2160 页):"This specification defines the Attribute Protocol; a protocol for discovering, reading, and writing attributes on a peer device."

GATT(第 2207 页):"This specification defines the Generic Attribute Profile that describes a service framework using the Attribute Protocol for discovering services, and for reading and writing characteristic values on a peer device."

是的,GATT 使用 ATT 作为其传输协议在设备之间交换数据,规范详细描述了如何定义这些协议中的每一个。大多数应用程序开发人员最关心的是 GATT,它也用于为某些 BLE 库定义 API。

ATT 是 GATT 的基石。服务、特征和描述符归根结底都是属性。

全部具有相同的格式:处理程序、type/UUID 和值。

现在,characteristic也是一种属性,只是一种具体的取值格式

GATT是说这个设备有xxx服务,有yyy和zzz特征,是ATT的上层。 有关低功耗蓝牙的更多信息,请查看这篇文章

https://atadiat.com/en/e-bluetooth-low-energy-ble-101-tutorial-intensive-introduction/