Whenever I hit hciconfig hci0 up noscan
, followed by hcitool con
after a few seconds, my LE device is always connected automatically.
> 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
I initially thought that only devices in White List will be connected automatically, but only then to figure out that the device is not in white list after I typed in the following command.
> hcitool lewlrm XX:XX:XX:XX:XX:XX
Can't remove from white list: Input/output error(5)
Why will my device connected automatically when it is not in the White List?
Kernel Version: Linux 4.11.1
Bluez Version: 5.37
My solution is to use bluetoothctl
to disconnect
and remove
it.
> bluetoothctl
[bluetooth] > disconnect XX:XX:XX:XX:XX:XX
[bluetooth] > remove XX:XX:XX:XX:XX:XX