【问题标题】:Bluetooth LE : Address Type蓝牙 LE:地址类型
【发布时间】:2014-03-03 14:54:33
【问题描述】:

我正在研究 iBeacon 技术,但我找不到任何关于地址类型的特定问题的答案。 我找到了解释地址类型的文档(蓝牙规范),但我似乎无法找到如何在两种类型(公共和随机)之间进行选择。

这是我找到它的一个例子(它是一个由树莓派上的 iBeacon 传输的嗅探数据包):

http://i.stack.imgur.com/QF5gf.pnghttp://i.stack.imgur.com/NHY6x.png(对不起,由于我的声誉,我还不能发布图片)

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

  • 由于公共地址必须是有效的,是否有生成随机地址的命令(但在格式化地址时正确)将其分配给相关设备?

  • 如果上述情况属实:命令是什么?以及如何回滚(到主要公共地址)?

  • 或者是否有一个“开关”允许在(有效)公共地址之间进行选择或生成一个随机地址?

谢谢。

【问题讨论】:

    标签: bluetooth-lowenergy mac-address ibeacon


    【解决方案1】:

    这是一个看起来很像您想要的命令。 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。

    【讨论】:

    • 感谢您指出这一点,我想这正是我要找的!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-10-26
    • 2013-10-25
    • 2018-03-02
    • 2015-06-09
    • 2017-04-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多