星期六, 19 12月 2020 21:37

高通QCC300X 与QCC512x_302X蓝牙地址异同

输入的蓝牙地址会以与输入相反的顺序显示,常称反序,这不是系统的BUG.蓝牙地址的显示是遵循Bluetooth的规范(GAP Profile Section 3.2.1)。

1、QCC300X 与QCC512x_302X的蓝牙地址

输入的蓝牙地址会以与输入相反的顺序显示,常称反序,这不是系统的BUG.蓝牙地址的显示是遵循Bluetooth的规范(GAP Profile Section 3.2.1)。蓝牙地址6bytes,分为LAP,UAP,NAP三部分,输入时,是从LSB->MSB(LAP UAP NAP),而显示时则为MSB->LSB(NAP UAP LAP).如输入1234567890ab,显示则为ab:90:78:56:34:12.如果需要将蓝牙地址以与输入方式一致的方式显示,需要转换

 

QCC300X名字地址修改要用 PSkey,QCC512x_302X 没有明显的PSkey可供修改,这是其不同点。

 Bluecore内部有些配置寄存器,称为PSKEY,这些寄存器不可随意更改,当然也有些是可以自定义修改的。量产时经常在ADK 与 Application 中修改,用Pstool 可以查看到名字与地址的PSkey 值

2 、QCC300X 与QCC512x_302X的蓝牙地址不同点

2.1 QCC300X地址的PSkey

Bluetooth address

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 123456789abc is encoded as 0078, 9abc, 0056, 1234.

The default value of this key is one of CSR's legal addresses: 00025b00a5a5.

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.

如果把PSKEY_BDADDR = { 42405 /* lap */, 91 /* uap */, 2 /* nap */} 转成PSkey 的参数uint16数组,也可以实现

QCC300X也可以用Pstool 查询地址

2.2  QCC512x_302X地址的存储形式

QCC512x_302X 的地址存储方式在qcc512x_qcc302x\common\subsys1_config2.htf中

file=bt2

# Change bluetooth address and device name to appropriate values

# using variable markers from the template.xml file.

pskey_bdaddr={0x00ff01,0x5b,0x0002}

pskey_device_name="QCC5124-AA_L"

查看 3743
麻喆

专栏编辑