I don't know much about Bluetooth in Linux, but I had the same thought. It looks like the license on this is Apache, which I would guess could be a problem.
Bluetooth audio in Linux is strangely good in a point: LDAC support. Windows/macOS doesn't support LDAC but (GNU/)Linux has ported LDAC support from Android.
In fairness, Bluetooth is a bit of a train wreck. Bluetooth on FreeBSD is pretty much unmaintained these days. OpenBSD gave up on it entirely and purged the Bluetooth code.
So the fact that newer versions of Bluetooth (there is like, what? 4 versions?) work at all on Linux counts as an accomplishment.
This isn't the first time I've talked on this. I've had some experience with bluetooth on Linux, and as a radio guy. The answer is there are problems from Layer 1 to Layer 7, needless complexity, and design by committee.
Bluetooth is an EXTREMELY complex radio protocol on Layer 1. It's like a mating dance between scorpions in the middle of a freeway. High chance something gets messed up.
Layer 1 keeps drastically changing too. Bluetooth 1 and 2 use completely different modulations, and are not backwards compatible. Bluetooth 3 simply was an extension to 2. "Let's agree over Bluetooth 2.0 to use WiFi instead." Bluetooth 4, while much simpler, uses an entirely different scheme.
Instead of a "general purpose" wireless network like WiFi, Bluetooth tried to be application specific. Except the only profiles everyone wants are mice, wireless audio, and fitness trackers. If you look at the application layer spec, it reeks of design by committee. Everyone haphazardly jammed their pet projects together, and there are redundant and vestigial parts everywhere.
The Linux side of BlueZ is abysmal. Honestly, I don't even know how anyone does anything with Bluetooth on Linux besides a mouse and keyboard. And barely even that.
As much as I hate on the protocol, the Layer 1 spec is truly ahead of it's time, in some areas. Watching two radios frequency hop, and negotiate to avoid a congested wifi channel was unreal.
Android phones do too. At least if you are root. I don't know if there is an official app because I just wrote a script. Just use the standard Linux bluetooth utilities.
Bluetooth on Linux is an unprecedented abomination.
You’d think most of it would be similar to network interfaces, handled by the kernel with commands such as ip, iptables, etc to configure it?
Wrong! Instead it’s mostly done in userspace and the tools to talk to it are using D-Bus which is an opaque, inconsistent, hard to understand mess which you can’t easily interact with programmatically.
As horrible as BT itself is I’d give the protocol itself a break in this case and focus on the terrible implementation.
Thing is that bluetooth kinda clash with the unix /dev concept.
Because each pairing is effectively a new device in /dev, and doing anything with bluetooth require that one cross the user/root divide multiple times.
void linux which opted for runit over systemd has bluetooth configurable via bluetoothctl or blueman-applet so seems this is a thing. That said bluetooth is kind of flaky.
You may get a better result with a device that has a usb dongle. Logitech models reportedly work. The Corsair unit I just bought works well for instance.
While I haven't personally tried it (and have since given up on BT audio in my setup), there seems to be a way to extract the pairing key from Windows and have the Linux Bluetooth stack use it (see e.g. [0]), effectively making the Windows and Linux host appear identical to the paired device.
Is the Android Bluetooth stack usable on Linux in general? It seems to work a whole lot better and with more devices, so would be great if it was usable.
reply