HNHacker News
TopNewBestAskShowJobs

parwan98

154 karma · joined March 31, 2021

submissionscomments
parwan98··on Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
Nrf52 are great BLE chips, however the full bluetooth spec (classic+BLE) is orders of magnitude more complex...
parwan98··on Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
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.

parwan98··on Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
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.

parwan98··on Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
It'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.

parwan98··on Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
> 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)