go-ble / ble

Bluetooth Low Energy for Linux / macOS
BSD 3-Clause "New" or "Revised" License
298 stars 107 forks source link

Linux parts requires exclusive hci access. #107

Closed dezi closed 7 months ago

dezi commented 1 year ago

Hi

as I learned in the middle of developing, this package requires exclusive access of the HCI interface under linux.

Means: You cannot use any other bluetooth device at the same time while using Your go-application.

Means: No mouse, no keyboard, no speakers, no headsets.

This renders the linux part for me virtually useless.

Solution: Migrate linux funktionality using

github.com/muka/go-bluetooth

which is using non-exclusive dBus access.

Regards, dezi

huguesb commented 8 months ago

arguably a feature, not a bug: a dbus-based approach has many more dependencies and many more points of failure (as I painfully learned trying to figure out why all bluez-based apps were miserably failing on some of my machines in inconsistent ways, despite bluetoothctl and btmgmt seemingly working fine...

estutzenberger commented 7 months ago

Exclusive HCI access is a design choice of this library. It is meant for having full access control of the radio for embedded and edge applications that do not require additional connected bluetooth devices.