【问题标题】:Why is LE device connected automatically on HCI up?为什么 LE 设备在 HCI 上自动连接?
【发布时间】:2017-11-16 09:29:34
【问题描述】:

每当我点击hciconfig hci0 up noscan,几秒钟后点击hcitool con,我的LE设备总是自动连接。

> hciconfig hci0
hci0:   Type: BR/EDR  Bus: USB
    BD Address: YY:YY:YY:YY:YY:YY  ACL MTU: 310:10  SCO MTU: 64:8
    DOWN
    RX bytes:494922 acl:12605 sco:0 events:8429 errors:0
    TX bytes:63543 acl:917 sco:0 commands:3692 errors:0
> hciconfig hci0 up

... (wait a few seconds)

> hcitool con
Connections:
    < LE XX:XX:XX:XX:XX:XX handle 70 state 1 lm MASTER AUTH ENCRYPT

我一开始以为只有白名单中的设备会自动连接,结果输入以下命令后才发现设备不在白名单中。

> hcitool lewlrm XX:XX:XX:XX:XX:XX
Can't remove from white list: Input/output error(5)

问题:

为什么我的设备不在白名单中时会自动连接?

环境:

内核版本:Linux 4.11.1
Bluez 版本:5.37

【问题讨论】:

    标签: bluetooth bluetooth-lowenergy bluez hci


    【解决方案1】:

    我的解决方案是使用bluetoothctldisconnectremove 它。

    > bluetoothctl
    [bluetooth] > disconnect XX:XX:XX:XX:XX:XX
    [bluetooth] > remove XX:XX:XX:XX:XX:XX
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-11
      • 2018-11-16
      • 1970-01-01
      • 2017-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多