24 ms·
Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
- mondoshawan 6y agoI know the guy that heads up the team that did this work -- he and I spent 2+ years fighting Broadcom's old, god-awful bluetooth code. Our whole team used to play what-if games about replacing the thing while massive code dumps came in from vendors, making the task ever larger. Zach, if you're reading this, HUGE kudos to holding the line in replacing that, and double kudos for doing it in a verifiable, sane language!
- dukoid 6y agoI really hope it will fare better than NewBlue and BlueDroid... https://www.androidpolice.com/2020/09/14/the-rise-and-fall-of-newblue-googles-attempt-to-fix-bluetooth-on-chrome-os/ https://www.androidpolice.com/2020/09/14/the-rise-and-fall-o...
- mondoshawan 6y agoBluedroid is the old stack. Zach and co started the floride project to clean it up, but it seems GD is their attempt to totally rewrite it.
- dmitrygr 6y agoNewBlue died because I quit Google. I started that project and was its main motive force.
- mondoshawan 6y ago> NewBlue died because I quit Google. I started that project and was its main motive force. Unclear why you're being downvoted here -- I seem to remember you, and I definitely remember hearing about NewBlue while we were working on Bluedroid. At the time it wasn't clear what happened. When did you leave?
- dmitrygr 6y agoI am also not sure about the downvotes, but c'est la vie. I was dmitrygr@, i left apr 2019
- parwan98 6y ago> fighting Broadcom's old, god-awful bluetooth code Correction: god-awful host side bluetooth code. There is still the bluetooth firmware residing on the BCMxxx chip (or Qualcomm chip) - >1MB of god-awfulerer closed-source code, half of it is in ROM (with limited number of available patch slots), full of bugs. You can see it crash from time to time in the kernel debug logs (and auto-restart itself)
- FredFS456 6y agoFor more illustrations of bugs/vulns in the firmware: https://www.youtube.com/watch?v=7tIQjPjjJQc&t=1986s https://www.youtube.com/watch?v=7tIQjPjjJQc&t=1986s
- kevincox 6y agoDo you have any more info about ROM patch slots? I have never heard of this before. I assume this is a small amount of r/w memory that is somehow overlaid over specific locations in the ROM?
- parwan98 6y agoCorrect. It's a small table of: address1, 4 bytes overlay data address2, 4 bytes overlay data etc The data is overlayed over the specified addresses, in runtime. On some chips its 8 bytes instead of 4. On a typical Broadcom/Cypress chip you have 128 or 256 entries. By the time the chip is 2-3 years in the market and still getting firmware updates, ~98% of them are used by existing firmware, so there are only 5-10 free entries by the time the chip is considered "obsolete". Case in point: the Broadcom/Cypress BCM43455 chip on the raspberry pi is almost out of patch entries. Broadcom have switched to their usual tactic of stalling for years on known, reproducible bug reports.
- ed25519FUUU 6y ago> Case in point: the Broadcom/Cypress BCM43455 chip on the raspberry pi is almost out of patch entries. Broadcom have switched to their usual tactic of stalling for years on known, reproducible bug reports. And it's still really buggy. I had to write a service on the RPI and the only way to reliably connect was to restart bluetooth before every attempt. That kind of fix makes a person feel dirty.
- seanalltogether 6y agoAny 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.
- 6y ago
- burnte 6y agoIt's almost impossible to be worse than the existing Bluewooth stack. IT's the single biggest problem I have with Google phones and it's shameful it took this long to fix.
- nindalf 6y agoI wouldn’t assume it’s fixed yet. Even if they’ve managed to write bug free code, you’re still at the mercy of driver supplied by the chip manufacturer.
- centimeter 6y agoBroadcom seems to pump out a lot of garbage in general. The SoCs on the raspberry pis are particularly terrible.
- PragmaticPulp 6y agoCan you shed some light on what we’re actually looking at here? I see some Rust but most of the actual BT stack looks to be C++ code. Is the HN headline accurate?
- Wohlf 6y agoDid you miss this on the main page? > We are missing Rust support in our GN toolchain so we currently build the Rust libraries as a staticlib and link in C++.
- PragmaticPulp 6y agoRight, but the headline suggests the BlueTooth stack is being rewritten in Rust while the code seems to suggest that the stack is in C++ still. There isn’t much Rust code in the directory relative to all of the C++ 4K lines of Rust is not a BlueTooth stack.
- deleted 6y ago[deleted]
- CyberRage 6y agoIs this because of memory bugs\vulnerabilities that target the stack or just because it was too old and junky?
- pas 6y agoJunkiness and vulnerabilities go hand in hand.
- CyberRage 6y agoTrue that. maybe I'll rephrase, was Rust specifically chosen to address memory concerns? I don't think it is too common in Android.
- nynx 6y agoThat's probably a major reason. But, Rust is also just a really nice language that's very pleasant to use.
- stusmall 6y agoI did a quick look on androidxref and saw a lot more .rs files than I expected. I haven't worked in Android frameworks stuff since around 5.0. I knew not too long after I left that world they started adding some minimal rust stuff, but looks like its grown a bit. Exciting. It's a perfect fit.
- mamcx 6y ago> I don't think it is too common in Android. ??? Android crash little things left and right, and have leaks just for existing.
- est31 6y agoDunno what motivated them internally, but the bluetooth vulns that made news in Feb 2020 would have been prevented by safe Rust. See my comment from back then: https://news.ycombinator.com/item?id=22265572 https://news.ycombinator.com/item?id=22265572 According to dtolnay, there are only 4 lines of unsafe rust in the Rust component. It's a bit small though at the current moment in time, with 4 thousand lines. Most of the code is still C++. Note that it's "with Rust" in the headline, not "in Rust".
- deleted 6y ago[deleted]
- radicaldreamer 6y agoIs this shipping in Android S?
- Grazester 6y agoWhat is Android S? I see no reference to this version of android anywhere
- sadn1ck 6y agoAndroid 12, whose developer previews have started. Source: https://developer.android.com/about/versions/12/overview https://developer.android.com/about/versions/12/overview
- zerocrates 6y agoIt's what Android 12, the forthcoming version, would have been called if they'd kept the letter-based codenames.
- parwan98 6y agoIt's shipped in Android 11, but in disabled state. On Pixel, developer options, bluetooth, enable "Gabeldorsh" if you want to live on the bleeding edge.
- ansible 6y agoHuh, I just poked around and saw that option on my Pixel 3a. On the one hand, it might be interesting to try it. On the other hand, at least with the one BT device I regularly use, the current stack works flawlessly...
- jabedude 6y agoThe Android IPC driver (binder) is also being re-written in rust. It takes advantage of the upcoming kernel driver rust support in Linux. It is an obvious choice for a memory safe re-write since all android processes (including sandboxed ones) have access to binder
- dblohm7 6y agoThis is a big f'n deal for Android, IMHO
- adkadskhj 6y agoIn the "big deal" sense, i'm always curious in what way. Eg is it a source of constant problems? Where not only a rewrite, but specifically a rewrite in Rust, would prevent a lot of issues? Or is it more of a "What if" thing? Ie there's not many problems currently, but the liability is a huge deal? to be clear i work in Rust, use it for all my projects, etc - i'm a fanboy, but i also recognize there's a lot of hype. I'm always keeping an eye out for the Rewrite It In Rust (RIIR?) meme vs actual needs. Which isn't to say that i think people _need_ to have a reason to use Rust, i use it for everything because i (and my team) prefer it - but i think the meme is destructive.. so i'm always looking for it heh.
- dblohm7 6y agoBinder has been the source of a number of Android security vulnerabilities.
- pjmlp 6y agoNow we need safer NDK APIs, even C++ bindings would be better than nothing. Additionally exposing some NDK only APIs to ART would also be welcomed from security point of view. And since we are at it, support Rust on the NDK LLVM toolchain.
- xleviator 6y agoHello, I'm actually one of the main binder userspace maintainers in my day job there (opinions are my own), and I haven't heard about this. Do you have a reference? What has happened is that there is a userspace shim over libbinder called libbinder_rs which provides Rust support for binder, but AFAIK, the kernel driver and main userspace lib is remaining in C++. Still, would be cool. Your Friend, Steven Moreland
- deleted 6y ago[deleted]
- hortense 6y agoThat would be Google's second (at least!) bluetooth stack in Rust, the first one being in Fuchsia. https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/src/connectivity/bluetooth/ https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master...
- PragmaticPulp 6y agoThe headline is misleading. Most of this code is C++. They included some Rust, but the core isn’t Rust.
- zbowling 6y agoMost of the code is in Rust. More than 75% of the entire stack. One component in the stack, the bt-host driver, is currently still in C++ as the oldest component. This part of the code only deals with low level connection management and speaking HCI with the hardware as well as hosting the GATT implementation, but everything is handed off to other components that are all written in Rust. Parts that remaining component itself of it have already been migrated to rust over time as well including GAP. All of the profiles and upper layers are entirely in Rust as well.
- akersten 6y agoThis is great news. Hopefully it fixes a lot of the jank that I've always experienced with Android Bluetooth. I don't think I've ever had a smooth experience - even with a supposedly flagship device (Pixel 4a!) I've encountered all of the following problems: * Devices getting stuck at max volume (thankfully not headphones) * Devices getting stuck at really low volumes * Devices randomly switching between absolute volume and relative volume (not really sure how to describe this, but sometimes changing the volume on the phone changes the volume on the receiver, and sometimes it changes the mix volume on the phone only (like an aux output would behave) and keeps the volume on the receiver) * Needing to enable Developer Settings to change the Bluetooth protocol version and other wacky stuff that I just shouldn't have to do [0] * Headphones cutting in and out when exercising, like the phone can't figure out it needs to stay in the higher of two radio power profiles that it's switching between, as the receiving antenna on my workout band moves 2-3 inches away from the phone and back again [0]: https://www.reddit.com/r/GooglePixel/comments/8hbcuu/the_100_solution_to_bluetooth_volume_issues/ https://www.reddit.com/r/GooglePixel/comments/8hbcuu/the_100... Bluetooth has been awful on Android for a long time. I've never not had to futz with it to get it to work. I hope this is a move toward making it as seamless as it should be. I couldn't imagine trying to figure all this out as a non-technical user.
- SketchySeaBeast 6y agoThat's bizarre. I have a Samsung phone with Samsung Bluetooth earbuds and I've only ever experienced a single connection issue in the whole year I've owned them and they are a daily driver for me. I wonder what the difference is.
- fernandotakai 6y agosame, s10 + galaxy buds+ (also, sony's XM4) and i never had a single issue.
- izacus 6y agoSamsung phones actually use their own Bluetooth stack not the one from AOSP Android. This is why the Bluetooth feature set sometimes doesn't match with the others.
- offtop5 6y agoWait , so can rust generally be replace C++ code in most projects ? Has anyone here had success with a partial to Rust migration.
- steveklabnik 6y agoIt is very hard to answer such a general question with a definitive answer, but Rust does want to be viable for the same sorts of things in which C++ is viable. As always, your mileage may vary.
- offtop5 6y agoSo to clear I can't just plop a Rust class into a C++ project.
- steveklabnik 6y agoRust does not have classes, strictly speaking, though you can define methods on structs. https://crates.io/crates/cxx https://crates.io/crates/cxx is the simplest way to do an integration. It is slightly more work than "just plop in" but it's not incredibly difficult. It's harder than mixing C and C++ together, but then again, almost no pairings of languages are that easy.
- bluGill 6y agoThen C++ doesn't have classes either, you can put methods on structs though. Rust people keep saying there are not classes, but all a class needs it the ability to put methods on structs. Private access to some of the internals is often useful, but doesn't need to be enforced by the compiler.
- zozbot234 6y agoThe issue is not "structs" v. "classes" per se, it's things like inheritance, vtables and RTTI (also other C++ features like templates and exceptions), that need special ABI support in C++ for which there is no Rust-side equivalent. (meanwhile Rust traits are quite different from anything in C++, although they're used similarly)
- rektide 6y agoWhy not BlueZ, that everyone else uses? Android feels like the land of Not Invented Here sometimes, to me. There might be good reasons, but often it feels like it's just Google trying to insure Android is as incompatible / different as possible from everything else that runs Linux. It doesn't help that almost none of the ChromeOS / Android subsystems or tools have not made it to any mainstream / regular Linux. They remain Google-only products. I wish this company doing so much Linux work would be part of some broader community. There's some reciprocal question, of how hard it would be, why haven't other people gone in & say picked out some of the, say, ChromeOS containerization tools: how much effort has the world made to use the offerings in these mono-repos? Community takes two. But it still feels incredibly weird, so against-the-grain to see such an active but non-participatory Linux user in the world. Backkground chit-chat aside though, technically what (if anything) makes BlueZ unsuitable for Android? Why is Google on their fourth bluetooth stack (NewBlue, BlueDroid, the Fuchsia one, now this)?
- mondoshawan 6y agoGPL is the problem. Hardware vendors won't touch it with a 10k foot pole because of the requirement to redistribute patches. There's a history of wanting BSD licenses at Android's inception. If the BSD distributions hadn't run into problems relating to legal battles at the time, Android would be built on Mach with a BSD userland rather than Linux. Additionally, there was more vendor support and drivers for the Linux kernel than Mach. Sadly, for the fledgeling enterprise that was Android, it was better to start from Linux, and use Apache/BSD style licensing and write their own userland.
- sumtechguy 6y agoAlso many hardware vendors use their stack to differentiate themselves from other competitors as at the end they tend to 'do' the same things. That stack keeps at bay people just copying their design wholesale and then undercutting their margin and using their drivers. Then even if they are willing, they many times included some lib they bought from someone else. They may even have the full code to use and have changed it as needed. But that 3rd party is usually some consulting group and guess what one of the very few things they sell is. It is a huge mess.
- jmull 6y agoIt seems like Rust is really catching on. To be honest, I didn't pay much attention to it for a while -- it felt like it might have simply been that day's "flavor of the day", destined to sink once then next flavor became popular. Now, there's a real problem to be solved. But I thought a simpler approach would be needed (e.g., Zig or something like it). I guess that may still happen, but seems more and more like Rust is here to stay.
- adamnemecek 6y agoZig isn’t quite production ready.
- nerpderp82 6y agoAnd it doesn't have memory safety. Zig is really fun and it is excellent for small wasm modules, but until it gets memory safety it will never be a Rust alternative.
- est31 6y agoMore on the missing memory safety of Zig: https://scattered-thoughts.net/writing/how-safe-is-zig/ https://scattered-thoughts.net/writing/how-safe-is-zig/ Discussion from 9 days ago: https://news.ycombinator.com/item?id=26537693 https://news.ycombinator.com/item?id=26537693
- nerpderp82 6y agoThanks for the links. I donate a pittance to Zig, I really want to see where CTFE goes. If nothing else, Zig pushes the state of the art and every time a new system does, it sets the lower bound (hopefully) for the future.
- ttt0 6y agoC++ doesn't have "memory safety" and it is a Rust alternative. Stop being pretentious, not every language has to have Rust's borrow checker or whatever its called.
- amelius 6y agoSince Android is Linux, will this become available to all Linux users?
- nicce 6y agoYou have bit confusion here. Android is based on Linux kernel, and changes on that is directly reflected to both Linux and Android users, it does not go to other direction. We will see if this code ends up on other use as well.
- thecureforzits 6y agoProbably not.
- pjmlp 6y agoThe kernel is a forked Linux, compilable with clang, it has LinuxSE and seccomp enabled by default. Everything else, including drivers post Treble, doesn't have anything to do with Linux.
- freedomben 6y agoI 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.
- casept 6y agoVery unlikely, the Android driver infrastructure is quite different from Linux.
- stagger87 6y agoIf you go into the parent directory, what appears to be the main Gabeldorsh directory, most of the implementation appears to be written in C++. Is the project being slowly rewritten in Rust? Or are only parts of it written in Rust?
- mondoshawan 6y agoThe parent directory is the Android supporting stuff like the bluetooth HAL and the JNI interfaces. The rest is the old bluedroid/floride stuff.
- PragmaticPulp 6y agoI’m not finding much Rust BlueTooth Stack code in the link. There are only about 4K lines of Rust in here. Am I missing something? Or is the headline exaggerated?
- est31 6y agoThe headline is technically correct. "rewrite with Rust" means there is Rust inside, but it doesn't mean that it's all (or mostly) Rust. But given the way one commonly understands the headline, it's definitely misleading.
- pjmlp 6y agoNice to see this. Sadly the Android team, while taking this safety steps, it keeps using unsafe C userspace for NDK APIs. Security is as good as the weakest link.
- nerpderp82 6y agoThis is false and a meme that continues to stall progress. Hardening the BT stack means that accidentally crappy or adversarial devices cannot use a buggy BT stack to pop a device, from kernel mode remotely. This is a hugely welcome change. The threat model from a app using the NDK is much different than having a drive by wireless attack. Defense in depth and put focus on protocols and parsing, the rest of our stacks will come in time.
- pjmlp 6y agoThe meme that stalls progress is the myth of the perfect C developer.
- kllrnohj 6y ago> Sadly the Android team, while taking this safety steps, it keeps using unsafe C userspace for NDK APIs. You phrase this as a negative but it's overwhelmingly a positive. Imagine how difficult it'd be to write an app using the NDK in Rust if the NDK had been C++ instead. The C ABI remains by far the most portable & common target. Everything can call it.
- pjmlp 6y agoIt is a bit hard to talk about safety when everything one has to play is an API that allows for all the usual stuff that C is known to cause. Everything can call it, and everyone has to redo the safety work.
- zbowling 6y agoFun fact: Google's from-scratch Bluetooth stack for Fuchsia has been written primarily written in Rust since it's conception for a few years now. https://fuchsia.googlesource.com/fuchsia/+/master/src/connectivity/bluetooth/ https://fuchsia.googlesource.com/fuchsia/+/master/src/connec...
- andor 6y agoWow, this is great! Not just the memory safety aspect of it, but also that it's written with testability in mind.
- nahuel0x 6y agoFuchsia network stack is also being rewritten from Go to Rust [1] and it follows a functional core/imperative shell pattern, something very unusual in network stacks [2]: [1] https://fuchsia.dev/fuchsia-src/contribute/contributing_to_netstack3 https://fuchsia.dev/fuchsia-src/contribute/contributing_to_n... [2] https://cs.opensource.google/fuchsia/fuchsia/+/master:src/connectivity/network/netstack3/docs/CORE_BINDINGS.md https://cs.opensource.google/fuchsia/fuchsia/+/master:src/co...
- jillesvangurp 6y agoInteresting; makes you wonder about the potential for code sharing between that and Android or even linux as well. The Linux kernel developers are open to allowing some Rust usage for things like drivers at this point. So the time seems right for this kind of thing. I guess there is also some decent code from e.g. redox os that might be adapted. Licensing (MIT) should not be an obstacle for this as far as I understand it. Likewise Fuchsia also uses GPL2 compatible licenses (MIT, Apache2, BSD). So, there's some potential to avoid reinventing a few wheels across these platforms. At face value, protocol stacks such as TCP/IP or bluetooth, are great use cases for a language like rust in a resource constrained environment (battery, CPU) where you are looking to get high throughput, low latency, etc combined with decent zero cost abstractions so you can make some strong guarantees about e.g. correctness. A good high level implementation, might be usable across different OS kernels. Of course these kernels have very different designs so it might make less sense at the code level than I imagine. I do wonder about where Google is headed with Fuchsia. Do they have a plan at this point for getting OEMs to want to switch to that? I imagine e.g. Samsung might have some hesitations about being even more dependent on Google as a supplier.
- yjftsjthsd-h 6y ago> I imagine e.g. Samsung might have some hesitations about being even more dependent on Google as a supplier. Does it make them more dependent? Google is effectively the only upstream for Android, and Fuchsia is open source, so it seems like it should be the same?
- 6y ago
- tapper 6y agoBT in Android is proper shitty. We need it updating as quick as we can. The mic input for Android is unusable on most phones. To ad to that the SQ is just bad on all android devices.
- diegocg 6y agoGood for security. Now we just need a protocol that actually works...
- tschellenbach 6y agoI'm always curious why bluetooth is such a terrible piece of technology. Did anyone write blogposts analyzing what went wrong?
- Mindwipe 6y agoIt's pretty simple really. It tries to do a lot of complicated things, and it's underspecified so it's possible to have compliant devices that behave wildly differently between vendors. It also rarely breaks compatibility so there's a lot of cruft for ancient devices.
- jeffnappi 6y agoThis is the exact reason it is challenging. There is a lot of variance in how each manufacturer implements it. You might compare it to the browser wars of old - you've got many different players adding various extensions in different ways etc. The actual radio technology and low power consumption are phenomenal, the problems arise mostly around protocol implementation oddities.
- wuuwoo 6y agoAny analysis would be less than insightful unless it comes from someone who sat in the meetings and helped write the standard. FWIW Bluetooth isn't "terrible." It's pretty remarkable we can get all sorts of devices to communicate with eachother wirelessly and at low powers with pretty decent bandwidth. And now you can buy a Bluetooth stack on a chip from a variety of vendors. The bigger issue with Bluetooth is that failure conditions are mostly an afterthought by device manufacturers, and Bluetooth is becoming a sought after feature in environments less than tolerable to failure like automotive and medical devices.
- buu700 6y agoI think this is a pretty interesting summary: https://www.reddit.com/r/NoStupidQuestions/comments/mc13t4/comment/gs1uy39 https://www.reddit.com/r/NoStupidQuestions/comments/mc13t4/c...
- jillesvangurp 6y ago
- rexfuzzle 6y agoRealistically- how long, if at all would it be before this filters down to updates- only with Android 12?
- mdoms 6y agoOh good I can't wait for the Android update which makes Bluetooth much much worse. Not because it's written in Rust, but because Android just keeps breaking stuff on my phones every time I get new updates.
- travisgriggs 6y agoGah. Just two days ago I finished what must have been our fourth rewrite of Kotlin code to interface with Android BLE. It's a complete trial by fire experience. Various medium and other blogs on the net are a morass of "find the true information amongst the disinformation". If I had a nickel for every "just put a delay here" so called solutions. We have two apps, one that communicates over many variously configured characteristics, and another that uses less characteristics but pushes/receives just as fast as I can get it to go in big bursts. The edge cases around connect/disconnect events are the most frustrating and most difficult to reliably debug and gain confidence your implementation is robust. Oh, and don't forget that just because it works on your Samsung, doesn't mean it works on your Moto. Assuming this new implementation is indeed much better (and not just swapping one pile of surprises for a new and shiny, but different, pile of surprises) my hat is off to the folks behind this. You get a big fat atta-whatever for making the world a better place, even if I wish it had happened 4 years ago.
- reader_mode 6y ago> Oh, and don't forget that just because it works on your Samsung, doesn't mean it works on your Moto. And just because it works on a new Samsung doesn't mean it works on a 2 generations old one. I had to do two projects recently developing cross platform mobile apps, one had to interface with the WIFI stack - holly shit the deprecated APIs that only work on Android 10, legacy that doesn't work but is the only way to do it on Android <10, cross device inconsistency, incorrect documentation (one thing in the docs, another in the source code) etc. etc. To be fair, iOS doesn't expose a lot of that functionality to user space apps (without special certs) but I prefer that to Android where it's technically possible but practically impossible because of the insane support matrix - it just wastes time. I'm not doing any mobile development from now on - the entire process is just riddled with busywork and working around crap APIs, people used to complain about having to support IE, mobile fragmentation is probably 10x worse.
- platypii 6y agoI went through the same thing recently. The best reference I've ever seen on Android Bluetooth is this series of posts: https://medium.com/@martijn.van.welie/making-android-ble-work-part-1-a736dcd53b02 https://medium.com/@martijn.van.welie/making-android-ble-wor...
- qbasic_forever 6y agoshudder I'm thinking back to all of the nightmares I had trying to use Bluetooth (especially BLE) in the early Android 6 and 7 days. It was basically unusable because of _serious_ platform bugs and issues. I hope this time with a new stack it goes a little better.
- arendtio 6y agoFrom my experience the Android Bluetooth experience is much better than the Linux Bluetooth experience. Even my ancient Samsung S3 work better than a recently bought Bluetooth dongle for my desktop and I only bought the new dongle, because the experience with the onboard Bluetooth was so horrible. Sometimes I wonder how a technology that is so common on modern devices is still so unreliable.
- nvahalik 6y ago> Why is gabeldorsche plural? > Please see this informative video we've prepared[0]. 0: https://www.youtube.com/watch?v=vLRyJ0dawjM https://www.youtube.com/watch?v=vLRyJ0dawjM
- 99_00 6y agoAfter seeing this headline I installed rust and am reading the book.
- bobthe3 6y agonice
- linsomniac 6y agoI have no opinion on this, but a data point: I had been sticking with an old USB wireless headset for a long time because it Just Worked (tm), but even with a new battery the life wasn't really up to the modern work from home. So I chanced it with a bluetooth noise cancelling headset. My first experience using bluetooth under Linux in probably a decade. It has been super reliable. I used the CLI tools "bluetooth_ctl", I didn't have a button to click in my i3 setup. Not saying this rewrite isn't needed, to be clear. But I've been surprised how reliable it's been.
- rigrassm 6y agoJust found on my Note 10+ in Developer Options was a setting labeled "Enable Gabeldorsh - Enables the Bluetooth Gabeldorsh feature stack". Just turned it on and will be reconnecting some things to see if it helps with some of the small issues I've always had.
- topspin 6y ago> impl FacadeServiceManager Rather Java-like. All we need now is a FacadeServiceManagerFactoryBuilder.
- maxcanada 6y agoNeat
- conradev 6y agoI've always been annoyed at the cross-platform story for Bluetooth. GATT is one of my favorite protocols because it is so simple, but writing simple code against this simple protocol is _not_ portable: iOS and macOS have CoreBluetooth, Linux has BlueZ, Windows has Windows.Devices.Bluetooth and Android has android.bluetooth. I've seen a few projects trying to fix this, like https://github.com/deviceplug/btleplug https://github.com/deviceplug/btleplug, and I hope one of them becomes production ready.
- amor33 6y agoCrar'lie*
- solarkraft 6y agoWill this allow higher bitrates for audio without the arbitrary quality restrictions of the current stack? A developer has even implemented a patch for the old one, but never got a response from the dev team: https://itnan.ru/post.php?c=1&p=456476 https://itnan.ru/post.php?c=1&p=456476