BLE制造商特定数据AD的最大长度是多少? [英] What's the maximum length of a BLE Manufacturer Specific Data AD?

查看:153
本文介绍了BLE制造商特定数据AD的最大长度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个BLE公告最多可以发送31个字节.在广告中,可能会有几个广告.

A BLE advertisement can send out 31 bytes at max. Inside an advertisement, there might be several ADs.

我想知道制作一个广告是否仅包含一个制造商特定数据广告是否有效,以及这种广告是否可以填满所有31个字节(长度字段为1个字节,类型字段为1个字节(0xff)),2个字节的CIC和27个字节的自定义数据).

I'm wondering whether it is valid to make an advertisement contains just one Manufacturer Specific Data AD, and whether this kind of AD can fill up all the 31 bytes(1 byte of length field, 1 byte of type field(0xff), 2 bytes of CIC and 27 bytes of custom data).

Bluetooth核心规范或其他规范指定了吗?

Is the Bluetooth Core Specification or any other specification specify this?

推荐答案

从规范-蓝牙核心规范补充版本4 A部分1.4 :

1.4.1说明

1.4.1 Description

特定于制造商的数据类型用于特定于制造商的数据数据.前两个数据八位字节应包含公司标识符分配的号码-公司标识符文档中的代码.这数据中任何其他八位位组的解释应定义为公司标识符指定的制造商.

The Manufacturer Specific data type is used for manufacturer specific data. The first two data octets shall contain a company identifier code from the Assigned Numbers - Company Identifiers document. The interpretation of any other octets within the data shall be defined by the manufacturer specified by the company identifier.

1.4.2格式数据类型<>

1.4.2 Format Data Type <>

说明:大小: 2个或更多八位字节前2个八位字节包含公司标识符代码,后跟其他制造商特定的代码数据

Description: Size: 2 or more octets The first 2 octets contain the Company Identifier Code followed by additional manufacturer specific data

表1.4:制造商特定的数据类型

Table 1.4: Manufacturer Specific Data Type

因此,除了广告包长度本身没有其他限制外,每个广告数据包的长度为31个字节,扫描响应的长度为另外31个字节.

So there is no limit except the advertising packet length itself, which is 31 bytes per advertising data and another 31 bytes for scan response.

在广告数据的开头,要求具有Flags广告类型的3个字节(对于任何非零长度广告都是必需的,请参见 Core V4.0第3卷C部分11.1.3 ),将您的广告数据长度减少了3.

There is the requirement for the 3 bytes at the beginning of advertising data that have the Flags ad type (required for any non-zero length advertising, see Core V4.0 Volume 3 Part C 11.1.3), reducing your advertising data length by 3.

然后会有制造广告类型标记和长度添加到制造数据中,再减去2个字节.这使您拥有:

Then there is the manufacturing ad type flags and length that get added to your manufacturing data, minus another 2 bytes. This leaves you with:

    广告数据中
  • 26个字节或
  • 扫描响应中的29个字节

用于制造数据本身(尽管应使用这些字节中的两个字节来指定公司标识符代码),这会将其带到:

for manufacturing data itself (although two of those bytes should be used for specifying the Company Identifier Code) which would bring it to:

    广告数据中
  • 24个字节的实际数据或
  • 扫描响应中
  • 27个字节.

这篇关于BLE制造商特定数据AD的最大长度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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