Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken bluetooth subsystem when using tinyb #1

Open
xrucka opened this issue Mar 19, 2018 · 1 comment
Open

Broken bluetooth subsystem when using tinyb #1

xrucka opened this issue Mar 19, 2018 · 1 comment

Comments

@xrucka
Copy link

xrucka commented Mar 19, 2018

Hi,
have you ever encountered similar behavior? When I manage my bluetooth dongles through bluetoothctl, everyting works just fine and good to go. However, when I start openhab and the plugin stack gets loaded, the dongles seem to get stuck in discovery and I can no longer connect to any device. Neither via bluetoothctl, nor via openhab control pane. I then must return all the switches to off position, shutdown openhab, shutdown bluezd, remove all bluetooth-related kernel modules and then reinitialize them. Shuting down only openhab does not work, the adapters can no-longer be managed, not even via bluetoothctl (powercycling them does not help either).

Dmesg output:
[ 302.568264] Bluetooth: hci0 advertising data length corrected
[ 309.600273] Bluetooth: hci1 advertising data length corrected
...
[ 326.310095] Bluetooth: hci0 command 0x200c tx timeout
[ 338.630220] Bluetooth: hci0 command 0x200c tx timeout

@vkolotov
Copy link
Contributor

Hi @xrucka, hmm. It was not such bad for me, however I think I might have seen a strange thing with tinyb. When everything is set up and running, some bluetooth devices fail to connect for the very first time, e.g. it tries to connect, then it gets a "Dbus" error, the the binding retries to connect them again and then it is just fine. I noticed that this thing can be caused by either BluetoothAdapter.getPowered or BluetoothAdapter.setPowered method. I definitely can see that if I stop using both of them (comment them out), the connection is very stable (devices get connected straight away).

I'll be working on that issue and I'll let you know how it goes, maybe it is the same issue that you describe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants