bluetooth-lowenergy – 蓝牙LE:地址类型

我正在研究iBeacon技术,我找不到有关地址类型的特定点的任何答案.

我找到了解释什么是地址类型的文档(蓝牙规范),但我似乎无法找到如何在两种类型(公共和随机)之间进行选择.

这是我发现它的一个例子(它是由Raspberry PI上的iBeacon传输的嗅探包):

http://i.stack.imgur.com/QF5gf.png
http://i.stack.imgur.com/NHY6x.png(抱歉,由于我的声誉,我无法发布图片)

让我们尝试提问并使其更具体:

>由于公共地址必须有效,可能是有一个命令生成一个随机的(但格式化地址正确)将其分配给相关设备?
>如果以上情况属实:命令是什么?你如何回滚(到主要公共地址)?
>或者是否有“开关”允许在(有效)公共地址之间进行选择或生成随机地址?

谢谢.

最佳答案 这是一个看起来非常像你想要的命令.
See here for details.

Set Static Address Command
==========================

Command Code:       0x002B
Controller Index:   <controller id>
Command Parameters: Address (6 Octets)
Return Parameters:

This command allows for setting the static random address. It is
only supported on controllers with LE support. The static random
address is suppose to be valid for the lifetime of the
controller or at least until the next power cycle. To ensure
such behavior, setting of the address is limited to when the
controller is powered off.

The special BDADDR_ANY address (00:00:00:00:00:00) can be used
to disable the static address.

When a controller has a public address (which is required for
all dual-mode controllers), this address is not used. Only when
the controller information reports BDADDR_ANY (00:00:00:00:00:00),
it is required to configure a static address first.

If privacy mode is enabled and the controller is single mode
LE only without a public address, the static random address is
used as identity address.

This command generates a Command Complete event on success or a
Command Status event on failure.

Possible errors:    Rejected
            Not Supported
            Invalid Parameters
            Invalid Index

在我看来,BlueZ的隐私功能目前正在积极开发中,可能尚未完成. See this commit from 2014/02/18.如果您想使用最新更新进行尝试,则必须从源代码编译BlueZ.

点赞