USB Made Simple (2008)
usbmadesimple.co.uk
usbmadesimple.co.uk
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.
If you thought BT was huge, the cellular mobile specs (ETSI GSM etc.) are more than an order of magnitude bigger and more complex.
Its an 80 page document.
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?
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!
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.
Higher level protocols (profiles) can be handled by libraries, rather than baked into the spec.
The lack of profiles and demand for proprietary crappy iot apps is a problem, not a solution for the standard.
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.
But there needs to be a spec of a protocol in order to enable interop? The question whether it is baked into the protocol stack or distributed separately as a library doesn’t seem that much of a distinction. What is important is certification, because otherwise connecting different manufacturers would never work smoothly.
The problem is that the cross product of hardware on the sending and receiving sides leaves sufficient gaps that you will be banging your head against the wall trying to figure out why a profile isn't working and it's because Vendor's part doesn't implement the spec properly.
I sometimes wonder what a world where every radio is a software-defined radio and we can all just update our full Bluetooth implementation alongside our OS. Instead it's the worst case of "actually another CPU with closed source blob firmware" and so we're absolutely left stranded.
I think what is being advocated here is moving profiles outside the implementation, into libraries we can port around, or e.g. the kernel somewhere, and I think that is indeed a step in the right direction.
A product I worked on in the past used a serial connection over Bluetooth to Android/iOS apps. In order to communicate to an Apple device, the layers roughly looked like:
Radio -> L2CAP -> RFCOMM -> iAP2
The RFCOMM/iAP2 part were redundant. It's understandable that Apple wanted to certify devices, but implementing that as a thin layer over L2CAP and making the profiles on top optional would have made the system much simpler. There may have been historical reliability concerns on the Bluetooth side that justifies what they ended up with, I'm not sure.
I think in practise we have a mix anyway - manufacturers already license BT stacks from a few vendors, and don't develop them themselves.
Are you me??? Truly this was entirely horrors that I will never unsee.
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.
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?
I certainly appreciate one being able to make a career out of these things, but I'd rather not.
To make things worse, D and E are potentially confusing suffixes for connectors, so instead of having good, meaningful classifications for connectors, we are having to research whether our USBC cables actually have the right connector on the other end.
Interesting how this sounds sensible on paper but also turns out to be a poor decision in hindsight that keeps confusing people to this day.
I fully recommend the book USB Complete. It might not look like a approachable book but it is very readable!
I once had to explore some code that talked to a usb device and I was quite surprised of how readable it actually was!
https://github.com/OpenNuvoton/NUC970_NuWriter_CMD/blob/mast...
I wish every topic had such a great beginner-friendly resource, truly amazing job!
https://www.fysnet.net/the_universal_serial_bus.htm
it's also part of a series on building an os.