HACKER Q&A
📣 aosaigh

Why is Bluetooth so unreliable?


After all these years and consecutive versions, Bluetooth in my experience is still a hugely unreliable experience.

I constantly have to forget devices, turn them off and on again etc. I have regular drop outs and I’m forever trying to re-pair.

This is across connection types (keyboard, music etc), brands and devices.

Why is Bluetooth in general so flakey?


  👤 shakna Accepted Answer ✓
You get flakey Bluetooth when the two implementations on the two devices differ significantly, or when it is poorly implemented.

... Which is made clearer by the fact that the Bluetooth specification is:

+ Enormous. Even just the core spec, that doesn't include much of what the consumer is interested in, is around 3000 pages long. That's not a typo. 3000 pages to tell you how to make two devices do a handshake. Add in the things that make our devices actually work... And you're asking the software to match what has been written and defined across closer to 5000 pages. Nothing is going to perfectly match between implementations.

+ Badly defined. The original working group that made Bluetooth left behind so much because they couldn't agree on it that it has more "Undefined Behaviour" footguns than C ever did.

One example of some spec text that I've seen argued differently between implementations:

> There is no requirement for the application to insert additional framing information into the data, although it may do so if this is required

That's before we get to the actual real world problems that Bluetooth has to face and overcome, like being in the 2.4Ghz range and being a frequency hopper.


👤 Vanit
I was the developer responsible for the bluetooth integration of a "smart lock" in an android app and it was an absolute nightmare.

I don't know if manufacturers have got their shit together in more recent smartphone generations, but at the time every manufacturer had their own Bluetooth stack with undocumented, and sometimes conflicting, quirks. Manufacturer A requires that you pair to a device before connecting? Great, Manufacturer B won't pair unless you connect first.

The only way we could guarantee compatibility with the app was that we tested at least one phone from every manufacturer so could flag which workarounds had to be used for each device. Some manufacturers were at least consistent with themselves, but others had totally different stacks between devices and even android versions.

This was definitely a huge point in Apple's favour; iOS' Bluetooth was snappy and consistent, and I was forever jealous of our iOS dev doing the integration over a few days when it took me at least a month to work all the links out.

And then a manufacturer releases a new hot android phone and we get a complaint from our client that their app is suddenly awful because it didn't work out of the box.

No, I'm not salty at all. :/


👤 boublepop
I don’t know the reasons To this. But I but would comment that when it comes to bluetooth, once again Apple has shown that they “get it” with airpods, the major feature To me is simply that they remove most of the incredibly annoying issues with Bluetooth that other products just seem to not even notice.

I have had other bluetooth headphones where sitting down at the computer means I first have to go find my phone and disable Bluetooth to use them with my computer. Where I have to go through the menus to connect them every single time For every device. But AirPods “just work”. Sit at my computer? They connect straight away no action from me, just my magic when I put them in. Walking around with my phone? They just connect (and show battery status) just when I put them in. It’s simple and effortless. That couldn’t have been an easy feat considering everyone else on the market are failing at this and have been failing at this for pretty much every Bluetooth device for more than a decade.


👤 rasz
Broadcom bluetooth/wifi chips ran out of firmware hot patch ram slots long time ago. Company seems to be too cheap to respin the rom mask with all the fixes baked in. From what I remember even brand new iphone x ships with no room for BT firmware patching.

RECON 2019 - Reversing and Exploiting Broadcom Bluetooth (Jiska, Dennis Mantz) https://www.youtube.com/watch?v=96Mi8_9ABCc

35C3 - Dissecting Broadcom Bluetooth (jiska mantz) https://www.youtube.com/watch?v=4_nI9ok7iQg


👤 Gibbon1
1. The quality of service for RF vs a wire sucks big phat donkey balls.

2. For low power devices like Bluetooth, even worse than that.

3. Bluetooth is a frequency hopper. Frequency hoppers have all sorts of synchronization problems. That plays havoc with link maintenance algorithms.

3b. Distributed link maintenance with no central control is a hard problem.

4. The people that designed the original spec didn't know what they were doing.

5. The baseband spec is very complicated. And thus hard to get right on all cases. And there are multiple layers each with a different party responsible for implementation.

6. Bluetooth devices are designed by groups working for a large number of manufacturers none of whom have license to help each other.

Items 1-3 explains why Ethernet tends to just work and Wifi/Bluetooth kinda sucks.

Item 4 explains why Wifi works better than Bluetooth.

Items 5-6 explains why your cell phone generally just works even though it uses RF.


👤 ohelabs
Well for a multitude of reasons....

First it’s on the 2.4 GHz band...which is quite busy as a significant number of devices, and protocols use that band including WiFi, Microwave ovens, baby monitors, and etc. The Bluetooth spec as done a lot to mitigate this in the spec but the issue persists.

Second there is an security element that was kinda added on later but was also built in and was optional.... this causes an untold amount of issues (aka vulnerabilities) and is probably what your experiencing with the paring issues.

Lastly the protocol stack implemented almost everything from audio to serial to TCP/IP...which is probably why it’s so ubiquitous and is implemented weirdly because there is multiple ways to do it...see the number of Bluetooth codecs.


👤 mighty_k
Even the icon makes me irrationally angry.

Like it’s telling me, “yeah, I’m working now, but I’m going to hurt you one day and there is nothing you can do about it.”


👤 mntmoss
IME it's all down to the implementation these days, which is a low-bidder-gets-what-they-pay-for kind of affair. My phone is cheap and the Bluetooth is nearly unusable on it(it can only really support one device at a time and that device will periodically drop out), but on my laptops, which have more of an emphasis on build quality, it's pretty solid, with few to occasional instances of audio tearing.

Regardless I still find grief from things like the volume resetting on one or both ends after pairing. There is a lot of attention to detail needed to get this stuff right, and most companies can barely manage to ship - that's not on the standard of the spec but the standard of the marketplace.


👤 chrisbennet
I hate Bluetooth also but I did think of a use case where it could be great:

If you had a honeypot accessible only by Bluetooth, you could pass off delays and dropped service for quite a while before the attackers figured out that it wasn't BT just being BT. :-)


👤 ciferkey
This [episode of Android Studio Backstage](https://androidbackstage.blogspot.com/2018/08/episode-97-blu...) has a lot of fun details about the Android Bluetooth stack and all the problems they have faced with it.

👤 namelosw
Two months ago I replaced my Macbook Pro and PC plus tens of wires set up with a cheese grater Mac Pro with most Bluetooth devices.

I was burnt by Bluetooth several times, but I really hate wires so I keep coming back. And then keep getting burned.

And it burns me more this time. I found the new generation of Bluetooth headphones like the Airpod Pro and Sennheiser Momentum wireless 3 tried to maintain multiple connections simultaneously, but they really have no idea which one to switch to most of the time. It's literally a nightmare.

I really like the wireless concept, could anyone enlighten me why cannot the industry come up and adopt a better standard?


👤 senectus1
My current bluetooth headset and mobile phone seem to have a directional antenna issue. I can get drop outs on my headset if the phone is laying flat and I'm 2 meters elevated above it and less than 4 meters away.

to me thats seems directional signal type issues.

I've also notice that my headset sitting around my neck will disconnect if my phone is in my pocket when my wife gives me a hug. meaning its range is less than 1 meter if having to go through a human body...


👤 mmcnl
Am I the only one with the opposite experience? Given the huge amount of devices, protocols and use cases I'm actually surprised how well it works.

👤 ssivark
I get the impression that Bluetooth 5 is better on multiple counts — based on a set of TaoTronics headphones I’ve used. (Most of the devices available currently use Bluetooth 4.2, afaik)

👤 adultSwim
I have the same issues. Each new version of Bluetooth it's supposedly fixed but still lacks.

👤 airbreather
Yet if you get a device from Plantronics the Bluetooth is immediate and rock solid, so it can be done.

👤 rapjr9
I spent two years working with the Nordic nRF51822 Bluetooth chip. During that time Nordic continually modified their developer API, completely changing it at least once. They changed the chips themselves every several months also, and you had to match the API version to the chip. They obsoleted old chips, so the code you had written would not run on the new chips, and it soon became difficult to find the old chips forcing you to upgrade to the new version of the SDK and change your code. Example programs in new SDK's often did not work because Nordic had not finished porting them. None of the example programs were written to coexist with the others; if you tried to combine two examples the result would often fail. The complexity of Bluetooth is also staggering; instead of writing code I could have probably spent those two years just reading the documentation, by which time substantial parts of it would have changed.

Before switching to Bluetooth we used the nRF51422 as an ANT+ radio. The development experience was completely different, it was a joy to work with, example programs were simple and worked. It was easy to code the things we wanted to implement.

My understanding of this extreme difference is (1) Bluetooth was designed to present a high barrier to entry, so that smaller device makers would have a hard time competing. It is intentionally complex and difficult to deal with. The standard for SD cards is similar (which is why almost all open source projects use the simpler, less functional SPI method of accessing an SD card.) (2) Nordic had a team for hire to write Bluetooth code for customers. Some of the API turmoil might have been to make it difficult for customers to develop their own code so they'd have to turn to Nordic for software. It's difficult to prove either of those conjectures, especially since large corporations see a benefit in creating barriers to entry and will support them.

So basically no one reads the documentation, they try to work from the example programs, and stability and interoperability suffers because no one really understands what they are doing (the API's completely obscure the underlying operations). Hence Bluetooth is often unreliable, unless a company has a team devoted to it and spends a lot of resources on it. The large gaps of undefined behavior don't help either, the order of many API interactions is often absolutely critical, even when you wouldn't expect it to be.

Another factor is that Bluetooth subsystems are essentially real-time systems where timing is critical. The chips are often sold as having spare MCU capacity for running your own code, but it's not apparent in the advertising that your code needs to be pristine and flawless in handling interrupts and in how long running operations are handled. Otherwise the Bluetooth firmware behind the API can easily lock up or start to do weird things. So a device maker who tries to have the Bluetooth MCU do other things to save the cost of an external MCU can easily have bugs in their code that interfere with the operation of the Bluetooth stack.


👤 otabdeveloper4
Forget Bluetooth.

Why is Wi-Fi so unreliable? At this point you need specialized semi-pro equipment just to get a reliable connection to a router 15 feet away.