当前位置: 首页> 汽车> 报价 > Bluetooth: att protocol

Bluetooth: att protocol

时间:2025/7/11 10:55:04来源:https://blog.csdn.net/wuzengfengjing1/article/details/141751072 浏览次数: 0次

一篇搞懂 ATT 支持的东西都有什么。

READ_BY_GROUP_TYPE_REQ/RSP

如下是 Spec 内容:
The attributes returned shall be the attributes with the lowest handles within the handle
range. These are known as the requested attributes.If the attributes with the requested type within the handle range have attribute
values that have the same length, then these attributes can all be read in a
single request. However, if those attributes have different lengths, then multiple
ATT_READ_BY_GROUP_TYPE_REQ PDUs must be issued.The ATT Server shall include as many attributes as possible in the response in order to
minimize the number of PDUs required to read attributes of the same type.翻译一下:
不是逐字逐句的翻译哈,将其表达的意思说明清楚:
按照查找的范围,找到符合type的所有attibute 的 handle + value + group_end_handle;
因为 value 的长度可能会各有区别,每个 RSP packet 需要将相同长度的放在一起才可以;
但是考虑到 MTU 的限制,有时必须要进行多次请求回应才可以拿到所需范围内的attibutes;
实际中,往往是这样来实现:这些找到的attributes按照handle从小打到排列,例如 group_end_handle<=20的,其value都是同样长度,那么就先回应出去;然后对方下一个请求的起始handle就会从21开始,Server收到后,发现21 ~ group_end_handle 为80 的attributes 的 value都是同样的长度,那么就再回应出去,以此类推。

READ_BY_TYPE/RSP

来自于 Spec:
The attributes returned shall be the attributes with the lowest handles within the handle
range. These are known a
关键字:Bluetooth: att protocol

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: