8 ms·
Now do Bluetooth! I have spent a lot of time in the USB mines over the years and recently stumbled onto a problem involving Bluetooth. "How hard could it be?"
by xyzzy_plugh 3y ago
Now do Bluetooth!
I have spent a lot of time in the USB mines over the years and recently stumbled onto a problem involving Bluetooth. "How hard could it be?" I thought to myself foolishly.
What a tire fire.
- HPsquared 3y agoI wonder if GPT et al. would help with this kind of thing, or if it's too esoteric.
- saulpw 3y agoBluetooth is huge and designed by committee. I don't know what GPT could help with; it's not that there aren't any good guides, it's that good guides are impossible. The protocol and stack are not designed to be understandable by a single human mind.
- userbinator 3y ago...unless it's the mind of Fabrice Bellard. If you thought BT was huge, the cellular mobile specs (ETSI GSM etc.) are more than an order of magnitude bigger and more complex.
- TickleSteve 3y agoThere is a document for the 3GPP specs that contains a list of the abbreviations used in the rest of the spec... Its an 80 page document.
- Someone 3y agoThe ETSI documents I saw all tried really really hard to “don’t repeat yourself”, and, as far as I can tell, succeeded at that. So, I guess this is a document that has two columns, the abbreviation and a reference to the document that defines it, without mentioning the long form?
- xyzzy_plugh 3y agoI have worked on 3GPP implementations and honestly, not as bad as Bluetooth.
- alexjm 3y agoLLMs generate content that's statistically plausible, not factually accurate. We don't need more content about USB that might be mostly right.
- solardev 3y agoI thought the USB specs were already LLM written? How else did we get USB Type C 3.2 Gen 4x4 AWD Superspeed 4.0 kbps?
- sampullman 3y agoThe best way I found when I dove into it ~8 years ago was to read through the code of one of the open source embedded Host stacks. That only gives you a peripheral understanding of the baseband layer though, which is like 10 more cans of worms. I spent a few years in that area, and was never able to answer the question of why the whole protocol couldn't just be a dumb pipe (plus advertising/identification). You can also get the worst of both worlds by trying to implement the Bluetooth HCI USB transport protocol!
- MichaelZuo 3y agoThe energy budget is too low to allow for an additional layer of abstraction plus all the conversion that's needed. For example, Apple just barely managed to make streaming spatial audio work on the airpods pro, and even then it has a noticeably shorter battery life then competitors, ~5 hours in ideal conditions.
- sampullman 3y agoYou're right, I didn't explain very well. What I meant is that I think the abstraction of profiles is bad - just let the application deal with the ACL packets. Then, depending on what you care about, you can optimize your device better for throughput, latency, or energy use. Higher level protocols (profiles) can be handled by libraries, rather than baked into the spec.
- izacus 3y agoBecause profiles are the reason why Bluetooth is a thing and other wireless protocols aren't? The lack of profiles and demand for proprietary crappy iot apps is a problem, not a solution for the standard.
- sampullman 3y agoBluetooth is a thing because the big players backed it in the late 90s. It's hard to say what it would look like now if profiles were at a different abstraction level in the spec. I see WiFi as a counterexample - the protocol doesn't make assumptions about your application and it seems to be successful enough. Agreed that lack of profiles and proprietary nonsense is a problem, but at least in my experience, it is much worse to deal with bugs baked into various implementations. In the past, getting maximum throughput (or minimum latency) between different devices required all kinds of nasty hacks. An escape hatch to the L2CAP connection would have been a lifesaver, or even better, if profiles were implemented outside the HCI layer. An OS update shouldn't be necessary to fix a bug in the heart rate profile.
- fusslo 3y agoThe best book on BLE is "Bluetooth Low Energy Developers Handbook" by Robin Heydon It is responsible for what has become of my career these past 6 years or so. I don't know if you were looking at more than BLE. If you are, I don't know of a good resource.
- LeifCarrotson 3y agoI love a good book to build a solid foundation for understanding, and understand that you can't rewrite the fundamentals every release, but does it matter that this book was published in 2012? I expect it doesn't cover all the highly relevant IoT features added in 4.2 and 5.0 and on...
- fusslo 3y agoThe book doesn't cover things added after it was published, correct
- LeifCarrotson 3y agoOf course, I don't expect it to! But in the past 6 years of your career, I expect you've studied those things a lot more than I have. Do you think that the book is still a good starting point for someone looking to progress beyond dumping confusing vendor binaries in off-the-shelf Bluetooth modules that seem to be energy hogs, to miniaturize and integrate custom firmware and onboard antennas on my PCBs?
- fusslo 3y agoyes, I highly recommend Heydon's book, even in 2023. The tech stack including l2cap, connection establishment, advertising, connection parameters, security, GAP, GATT, are all still relevant.
- xyzzy_plugh 3y agoIt's a good recommendation, but I'd prefer the whole thing were less complicated so, like USB, I could figure it out in a few days, finish my work and move on with my life. I certainly appreciate one being able to make a career out of these things, but I'd rather not.