26 ms·
Any insight into why Apple seems to have a much better bluetooth stack? I do a lot of BLE development that has to work cross platform, and we see constant GATT
by seanalltogether 6y ago
Any insight into why Apple seems to have a much better bluetooth stack? I do a lot of BLE development that has to work cross platform, and we see constant GATT connection issues on android compared to almost none on ios.
- f6v 6y agoA wild guess: less hardware variability.
- Nextgrid 6y agoCould it be because they only have a handful of hardware variants to support, vs hundreds on Android? Presumably, the stack itself is somewhat sane on both sides, but the hardware's bugs, poorly specified or undefined behavior is constantly throwing wrenches in the machinery - Apple managed to fix most of them for the hardware they support, but Android has no chance as they have to support hundreds of different chips.
- seanalltogether 6y agoPossibly, but half the guys on the dev/qa team have google pixel devices and even they throw connection errors fairly regularly.
- w0m 6y agoIt's having to support every phone that introduces the instability even the refernece devices.
- solarkraft 6y agoThis is not specific to bluetooth or drivers, but I don't fully buy the thesis/deflection that Apple just has a much smaller set of hardware to support. I run a hackintosh system myself and it's more stable than Windows. I'm starting to think Apple just has stronger general QC. Windows is just as glitchy and crashy on Surface devices as anywhere else. The counter point does apply to drivers, but it's really not just that.
- mondoshawan 6y agoApple has a unique relationship to its hardware, and the money to bend vendor's firmware to their will. Half of the problem with Bluetooth is the host stack. The other half is the firmware running on the controller on the other side of HCI. If the controller ever gets screwed up, the host stack can only disconnect from HCI and totally restart the controller.
- toast0 6y agoThe third half is the bluetooth firmware on the other device. The fourth half is the other firmwares on the other device. The fifth half is the specification(s). The sixth half is the RF environment.
- mondoshawan 6y agoHaha -- yes, indeed. Bluetooth the spec and implementation are an absolute dumpster fire. "Bluetooth is a layer cake of sadness" is the turn of phrase we used for a while on the Glass connectivity team. One of our project founders, Thad Starner actually apologized to me for the mess it became; apparently it was supposed to be simpler, but when Nokia took ownership back in the 90s, it started to go downhill. Our lead on the connectivity team at the time had a crazy idea to rewrite the spec using only ACL and L2CAP, but never really went anywhere with it because of the the Glass org implosion.
- IshKebab 6y agoBut those are the same for iOS, yet Bluetooth on iOS is far better than on Android.
- toast0 6y agoA lot of people using Apple Bluetooth hosts use them with Apple Bluetooth devices (other hosts, mice, keyboard, headphones, etc)
- exsf0859 6y agoA huge factor is that iPhone has a large, long-standing market share, with relatively few different OS and hardware versions. This means that everyone else has been able to test their Bluetooth implementations for interoperability with iPhones.
- mrlambchop 6y agoWhilst they also use a lot of Broadcom silicon, the stack they use is written 100% in house.
- izacus 6y agoThey have less hardware variability and also their bluetooth stack is still quite buggy but everyone works around their bugs on device side due to popularity.
- glennpratt 6y agoAnecdotal, but my new 16 inch MBP drops BT connections all the time. I had to give up the keyboard and mouse I've used for years across at least 5 computers, mostly Mac's because they disconnected so much. Even the Apple keyboard and mouse I switched to drop occasionally.
- coob 6y agoHonestly sounds like faulty hardware or interference.
- oriolid 6y agoThere's something odd about the 2019 MBP Bluetooth hardware. The most interesting part is that just plugging in a Cambridge Silicon -based USB dongle can kill it permanently: https://discussions.apple.com/thread/250944058 https://discussions.apple.com/thread/250944058
- 05 6y agoDoesn't kill it permanently; there's a fix involving connecting a CSR 2.0 dongle. There's also a workaround that sets an nvram var. Overall it's an absolute clusterfuck, though, because Apple still haven't fixed the problem.
- oriolid 6y agoThe workaround with nvram doesn't work if you already made the mistake of plugging in the CSR dongle. I don't know about the fix with CSR 2.0 dongle, it seems that nobody's selling them any more. Could work, could be an urban legend like all the reported fixes with nvram and pram resets and restoring various files.
- 05 6y agoI can confirm the 2.0 BT dongle fix works because I had that exact issue and that's how I fixed it. Of course, I still made Apple replace the laptop (was less than 2 weeks old), but doesn't really seem like they've noticed seeing how it's still not patched almost a year later.
- rkangel 6y agoMy guess would be that they can apply much more pressure to the Bluetooth chip vendor. The buying power that Apple has for designing in a particular chip is much bigger than any individual Android manufacturer (even Samsung). That gets them the leverage to get the chip vendor to do what they want.
- nicoburns 6y agoI wouldn't be surprised if Apple write their own firmware for things like bluetooth chips.
- mondoshawan 6y agoThere's quite a bit of evidence that they do. Apple's strength has always been at the point at which hardware is built and interfaces to the software, including firmware.
- Cu3PO42 6y agoI would be surprised if they didn't. They advertise their own Bluetooth chips H1 and W1 in AirPods and some Beats products. These chips definitely have their own firmware and it would be rather ridiculous not to also have their own firmware on the host side, maybe even re-using code.
- saagarjha 6y agoMost of them run RTKit, I believe.
- est31 6y ago> The buying power that Apple has for designing in a particular chip is much bigger than any individual Android manufacturer (even Samsung) Why does Samsung have smaller buying power than Apple? Doesn't Samsung sell more phones than them? Or is it because while Samsung sells more phones in total, Apple still has the most successful single models?
- 6y ago
- benbristow 6y agoI still find it buggy on my iPhone 12 Pro, as a user at least. Often says 'connected' to my headphones (Sony WH-100XM3's) when it's not, connecting to Alexa devices to stream audio often fails and requires a reboot to connect properly. I can't believe Bluetooth is still such a pain in the bum in 2021.
- ArchOversight 6y agoBuggy Bluetooth on the other end... Alexa is running Linux, and the Sony is probably some custom bluetooth stack. Once you move to all Apple bluetooth, things really smooth out. It seems that Apple does way more testing/validating of their Bluetooth stack.
- yjftsjthsd-h 6y agoI had the idea in my head (so take with a grain of salt) that parts of the BT stack are underspecified such that different implementations tend to have slightly different interpretations of the standard, so the problem isn't even which vendor you use so much as going all-in on any single vendor so the devices all agree on which reading to use. Although of course Apple might well be better anyways; one would hope that billions of dollars in R&D plus caring about quality makes a difference.
- fshbbdssbbgdd 6y agoI buy this. All Apple works great, but Apple headset with Windows PC doesn’t seem better than anything else with Windows PC.
- mondoshawan 6y agoActually the spec is overspecified and repeats itself multiple times in different layers. L2CAP specifies a TTL, so does RFCOMM, so does SOC, so does...
- coryrc 6y agoI've actually worked in this area. You are basically correct. Sometimes you have to make a choice on which brands/chipsets you support. Devices on different ends of the compatibility spectrum can basically be mutually exclusive. IIRC if you advertise A2DP some devices supporting only HSP won't work, so you can make some hacky workaround but then your nicer A2DP equipment is harder to use. If you only need to guarantee support for X subset of devices you control, it's easy to tweak the settings so they work well together.
- vardump 6y agoAs a long time Apple user, I really don't know where that's coming from. Endless issues with bluetooth over the years, including full system crashes. Curiously iOS bluetooth stack seems to be more stable than on macOS. Or maybe it's just hardware differences. Apple's stack does work great with Apples hardware, though.
- acdha 6y agoHow many hardware devices are you talking about? That's very different than what I've seen personally or peripheral to enterprise support.
- vardump 6y agoWell, at least Magic Trackpad, Keyboard etc. work really well with a Mac. Never had any issues. Bose bluetooth headphones, third party "high end" bluetooth devices... not so great. Lately it's been better, though.
- anonuser123456 6y ago> Any insight into why Apple seems to have a much better bluetooth stack? This is a joke right? My M1 BT goes out to lunch several times an hour. It is literally unusable.