蓝牙规范 Core v5.2 GAP 文档解读第11章 广播和扫描响应数据格式

11 广播和扫描响应数据格式

广播、周期性广播和扫描响应数据格式如Figure 11.1所示。数据由重要部分和不重要部分组成。重要部分包含一系列的AD结构。每个AD结构都有一个1 octet的长度值和Length octets的数据字段。数据字段的第一个octet是AD类型,剩下的Length - 1 octets是AD数据,具体数据依赖AD类型。不重要部分用于在必要时扩充数据,全为0。

如果长度值设置为0,那么数据字段的字节数为零。这种情况只会发生在允许重要部分提前终止的情况下。

只有重要部分的数据应该播送。

主机广播数据放在ADV_IND、ADV_NONCONN_IND、ADV_SCAN_IND、AUX_ADV_IND和AUX_CHAIN_IND PDUs的AdvData字段中。
额外的控制器广播数据放在AUX_ADV_IND、AUX_SYNC_IND和AUX_SCAN_RSP PDUs的ACAD字段中。
周期性广播数据放在AUX_SYNC_IND和AUX_CHAIN_IND PDUs的AdvData字段中。
扫描响应数据放在SCAN_RSP PDUs的ScanRspData字段或AUX_SCAN_RSP PDUs的AdvData字段中发送。
如果完整的数据无法放入AUX_ADV_IND、AUX_SYNC_IND或AUX_SCAN_RSP PDU的AdvData字段,则使用AUX_CHAIN_IND PDUs发送数据的剩余片段。一个AD结构可能会分在两个或多个PDUs上。

数据类型和定义:参见 Core Specification Supplement,Part A,Section 1

数据类型值:https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/

广播数据-Advertising Data (AD), 扫描响应数据-Scan Response Data (SRD),额外的控制器广播数据-Additional Controller Advertising Data (ACAD)

Data type 大分类ADSRDACADData type 小分类类型值描述
Service UUIDOOO«Incomplete List of 16-bit Service UUIDs» 0x02More 16-bit Service UUIDs available
«Complete List of 16-bit Service UUIDs»0x03Complete list of 16-bit Service UUIDs
«Incomplete List of 32-bit Service UUIDs»0x04More 32-bit Service UUIDs available
«Complete List of 32-bit Service UUIDs»0x05Complete list of 32-bit Service UUIDs
«Incomplete List of 128-bit Service UUIDs»0x06More 128-bit Service UUIDs available
«Complete List of 128-bit Service UUIDs»0x07Complete list of 128-bit Service UUIDs
Local NameC1C1X«Shortened Local Name»0x08Shortened local name
«Complete Local Name»0x09Complete local name
FlagsC1XX«Flags»0x01参见下表
Manufacturer Specific DataOOO«Manufacturer Specific Data»0xFFSize: 2 or more octets
The first 2 octets contain the Company Identifier Code followed by additional manufacturer specific data
TX Power LevelOOX«TX Power Level»0x0ASize: 1 octet
0xXX: -127 to +127 dBm
Slave Connection Interval RangeOOX«Slave Connection Interval Range»0x12Size: 4 Octets
The first 2 octets defines the minimum value for the connection interval
The other 2 octets defines the maximum value for the connection interval
Service SolicitationOOX«List of 16 bit Service Solicitation UUIDs» 0x14List of 16 bit Service Solicitation UUIDs
«List of 32 bit Service Solicitation UUIDs» 0x1FList of 32 bit Service Solicitation UUIDs
«List of 128 bit Service Solicitation UUIDs» 0x15List of 128 bit Service Solicitation UUIDs
Service DataOOO«Service Data - 16 bit UUID»0x16Size: 2 or more octets
The first 2 octets contain the 16 bit Service UUID followed by additional service data
«Service Data - 32 bit UUID»0x20Size: 4 or more octets
The first 4 octets contain the 32 bit Service UUID followed by additional service data
«Service Data - 128 bit UUID»0x21Size: 16 or more octets
The first 16 octets contain the 128 bit Service UUID
followed by additional service data
AppearanceC2C2X«Appearance»
0x19
The Appearance value shall be the enumerated value as defined by Assigned Numbers.
2 octets in length. A device shall have only one instance of the Appearance characteristic
Public Target AddressC2C2X«Public Target Address»0x17Size: Multiples of 6 octets
The format of each 6 octet address is the same as the Public Device Address defined in [Vol 6] Part B, Section 1.3.
The Public Target Address value shall be the enumerated value as defined by Assigned Numbers.
Random Target AddressC2C2X«Random Target Address»0x18Size: Multiples of 6 octets
The format of each 6 octet address is the same as the Random Device Address defined in [Vol 6] Part B, Section 1.3.
The Random Target Address value shall be the enumerated value as defined by Assigned Numbers.
Advertising IntervalC1C1X«Advertising Interval»0x1ASize: 2 octets (UINT16)
Units: 0.625 ms
advInterval value
Uniform Resource IdentifierOOX«URI»0x24Scheme name string and URI as a UTF-8 string
LE Supported FeaturesC1C1X«LE Supported Features»0x27The format is the same as the FeatureSet defined in
[Vol 6] Part B, Section 4.6.
Channel Map Update IndicationXXC1«Channel Map Update Indication»0x280-4 octet:ChM
5-6 octet:Instant
BIGInfoXXC1«BIGInfo»0x2CThe format for BIGInfo is described in [Vol 6] Part B, Section 4.4.6.11.
O:可选的,一个block中可以出现多次。
C1:可选的,一个block中不应出现超过一次。
C2:可选的,一个block中不应出现超过一次,并且同一扩展广播间隔中不应在AD和SDR中都出现。
X:预留未来使用。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值