Bluetooth LE : Address Type

六月ゝ 毕业季﹏ 提交于 2019-12-05 09:23:58

Here's a command that looks pretty much like what you want. 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

It looks to me like the privacy features of BlueZ are under current active development and may not be complete yet. See this commit from 2014/02/18. If you want to try this with the latest updates, you will have to compile BlueZ from source.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!