News for hackers. Stuff that matters.
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by kevincox on Wednesday March 31, 2021 @11:49AM (#26648766)
Do 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?
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by parwan98 on Wednesday March 31, 2021 @12:00PM (#26648908)
Correct. 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.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by ed25519FUUU on Wednesday March 31, 2021 @01:25PM (#26650165)
> 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.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by parwan98 on Wednesday March 31, 2021 @03:31PM (#26651956)
Sadly that's common in the hardware world.

Step 1. Have a reliable hardware watchdog that restarts everytime there's a software problem.

Step 2. There is no step 2.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by mondoshawan on Wednesday March 31, 2021 @01:52PM (#26650568)
Such is the sad world of Bluetooth. The dirty secret to this industry is that this, while seeming hacky, is the bare minimum de-facto standard in most cases.
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by eecc on Wednesday March 31, 2021 @02:25PM (#26651040)
So given these data points, isn’t it reasonable for Apple to refuse to play along this broken tune and just roll out their own dialect of a wireless protocol? Why, if not in the name of scarcely affirmed “standards”, drag suppliers through an endless contractual game, when you can direct your own capacity toward the quality standards that fit you?
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by realityking on Wednesday March 31, 2021 @02:47PM (#26651337)
I don’t follow the leap. The grandparent’s point was about the quality and terrible lack of long term support of Broadcom chips. How does that translate to issues of the standard itself?

Nobody would complaining about Apple creating their own radio chips (which they seem to plan for 5G/6G). Apple creating their own standard protocols is an issue though.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by eecc on Wednesday March 31, 2021 @04:19PM (#26652582)
Well, if the implementations of the standard are such a garbage fire what's the point chasing them? Just to check the box "standards compliant" and likely providing an abysmal UX and poor interoperability?

I fixated on Apple because they're often picked on for taking the highway, but on the other hand what's the point doing otherwise? What's a common ground if it's just a pipe dream?

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by azernik on Wednesday March 31, 2021 @06:08PM (#26653774)
Just because a chip is shitty doesn't mean it's worthless. In practice, Bluetooth is quite interoperable, and reliable enough for many use cases (especially the common, better-tested ones).

Breaking compatibility with that ecosystem out of spite is not conducive to getting adoption for a better product.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by eecc on Thursday April 01, 2021 @07:24AM (#26659054)
Well, the original posts report some frankly tragic scenarios - so bad that they “reboot to initialize” just to keep sane - in what are some pretty ubiquitous devices. Or not?
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by azernik on Thursday April 01, 2021 @04:53PM (#26665879)
"Reboot to initialize" is ugly as hell and very brittle, but it's good enough for most I/O devices like keyboards or headphones. If the kernel is able to properly reinitialize the chip with all of its old association information, it might even be indistinguishable from a few hundred ms of interference. (Rebooting on errors is in fact quite common for all kinds of hardware in high-radiation environments, and is a pretty standard kernel technique for working around buggy hardware.)

Now, of course, multiple nines of uptime would be very nice to have (and open up new use-cases), but 2-3 nines is still a lot better than 0.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by eecc on Friday April 02, 2021 @01:51PM (#26673860)
Fine, but you're rationalizing living with poor execution. I'm rationalizing with deep (perhaps goldplating) correctness.
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by azernik on Friday April 02, 2021 @09:14PM (#26677583)
I'm not "rationalizing", and neither are you.

You're arguing that it's not enough to make a correct implementation, but that it's also important to break compatibility with incorrect implementations.

I'm arguing that a better implementation that is compatible with current protocols is strictly better than a better implementation that is not Bluetooth-compatible.

If you make a piece of hardware that is good (e.g. doesn't randomly crash and need to be rebooted by the kernel), why is it a bad thing for it to try to connect to some flaky BT headset?

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by exikyut on Friday April 02, 2021 @12:22AM (#26668995)
The real brokenness here seems to be that the chips are not engineered with say ten times the patch capacity.

And the root of the brokenness is that there isn't the end-to-end awareness and acceptance that ten times the capacity is obviously needed.

Owww.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by SwaraLink on Sunday April 04, 2021 @05:15PM (#26692906)
Easy to say, and I can’t know for sure exactly what factored impacted Broadcom’s decisions here, but I can tell you that chip manufacturers are under extreme pressure to keep costs down, which means that they may under-spec systems at times. Also, with the long design cycles involved in chip design the patch capabilities may have been decided years in advance, before realizing how much would be needed.

In general I agree with your comment, though it’s a lot easier to say this in hindsight.