BLE中的属性和服务之间的区别 [英] Difference between attributes and services in BLE

查看:448
本文介绍了BLE中的属性和服务之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道BLE规范中GATT中属性和服务之间的区别是什么,以及在哪里可以找到属性,它们是服务,特征还是描述符中的?

I would like to know what is the difference between attributes and service in GATT in BLE specification, and where we can find attributes, are they in service, characteristics or in descriptors?

推荐答案

总结...服务,特征和描述符...是属性:-)

In summary ... services, characteristics, and descriptors ... are attributes :-)

BLE标准提供了定义属性概念的ATT协议.所有属性都在表中定义,并且它们具有句柄,类型(带有UUID),值(和权限). 在BLE堆栈中的ATT协议之上,您具有GATT和GAP. GATT协议定义了服务,特征和描述符,它们中的每一个都是一个属性. 例如,特征是具有句柄的属性,类型(告诉我们该属性是特征的UUID)和值(具有属性值的句柄的特征属性等).在特征内部,您有一个特征值(即特征值)和一个或多个本身就是属性的描述符.

The BLE standard provides the ATT protocol that defines the concept of attributes. All attributes are defined inside a table and they have a handle, a type (with a UUID), a value (and permissions). On top of ATT protocol in the BLE stack, you have GATT and GAP. The GATT protocol defines services, characteristics, and descriptors and each of them is an attribute. For example, a characteristic is an attribute with a handle, a type (a UUID that tells us that the attribute is a characteristic) and a value (the characteristic properties with a handle to the attribute value and so on). Inside the characteristic, you have an attribute that is the value of the characteristic and one or more descriptors that are themselves attributes.

您可以将属性概念视为抽象类型,可以定义具体类型,例如服务,特征和描述符.

You can see the attribute concept as the abstract type you can define concrete types like service, characteristic and descriptors.

我建议您看一下Nordic的后续视频(BLE上的介绍).

I can suggest seeing the following video (intro on BLE) by Nordic.

这篇关于BLE中的属性和服务之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆