我正在研究 iBeacon 技术,但我找不到有关地址类型的特定问题的任何答案。
我找到了解释地址类型的文档(蓝牙规范),但我似乎找不到如何在两种类型(公共和随机)之间进行选择。
这是我发现它的一个例子(它是由 Raspberry PI 上的 iBeacon 传输的嗅探数据包):
https://i.stack.imgur.com/QF5gf.png https://i.stack.imgur.com/QF5gf.png
and https://i.stack.imgur.com/NHY6x.png https://i.stack.imgur.com/NHY6x.png(抱歉,由于我的声誉,我还不能发布图片)
让我们尝试提出问题并使其更具体:
由于公共地址必须有效,因此可能存在是一个生成随机数的命令(但地址格式正确)将其分配给相关设备?
如果上述情况为真:命令是什么?以及如何回滚(到主要公共地址)?
或者是否有一个“开关”可以让在(有效)公共地址之间进行选择还是生成一个随机地址?
谢谢。
这是一个看起来非常像您想要的命令。详细信息请参见此处。 http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/mgmt-api.txt
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 的隐私功能目前正在积极开发中,可能尚未完成。。如果您想使用最新更新尝试此操作,则必须从源代码编译 BlueZ。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)