QCC300x笔记(4) -- 蓝牙地址的规则

哈喽大家好,这是该系列博文的第四篇~ 篇~



<<【系列博文索引】快速通道 >>

蓝牙地址分为三部分:

LAP(24位地址低端部分)、UAP(8位地址高端部分)和NAP(16位无意义地址部分)。

其中,NAP和UAP是生产厂商的唯一标识码,必须由蓝牙权威部门分配给不同的厂商。

而LAP是由厂商内部自由分配。

以下是CSR官方文档有关蓝牙地址的描述:

The local device's Bluetooth address.  This should be unique to this device.  It is allocated during manufacturing.
The type bdaddr can be viewed as a uint16[4] array:

    1st uint16:  The top 8 bits of the LAP are in the bottom 8 bits of this word. The top 8 bits of this word must be zero.
    2nd uint16: The lower 16 bits of the LAP
    3rd uint16:  The 8-bit UAP is in the bottom 8 bits of this word. The top 8 bits of this word must be zero.
    4th uint16:  16-bit NAP

For example, the Bluetooth address 0002  5b  00a5a5 is encoded as 0000, a5a5, 005b, 0002.


The default value of this key is one of CSR's legal addresses: 0002  5b  00a5a5.
As stated in the Bluetooth specification, LAP values from 9e8b00 up to, and including, 9e8b3f must not be used as this range is reserved for inquiry access codes (IACs).

Bluetooth module manufacturers must obtain their own block of addresses from the Bluetooth SIG/IEEE. If CSR's experience is typical, these authorities define the NAP and UAP, allowing manufacturers to set the 24-bit LAP.

对于某一种型号的手机或者设备,所有个体的NAP、UAP是固定的,可变的是LAP。

LAP共有24位,一般来说厂家在制造时会从0开始分配地址直到2的24次方,以保证个体之间地址的区别。

但是当产品数量太多,导致2的24次方都用完之后,或者在写地址的时候出了问题,就会出现蓝牙地址重复使用的情况, 但是概率非常小。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

文化人Sugar

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值