Audiobook player for KOReader
My Kobo Sage plays chaptered audiobooks over Bluetooth headphones now, from the same KOReader interface I read in, with playback position remembered per book. One small e-ink device covers both reading and listening, which is something the hardware could always do and the software never allowed.
The problem
Kobo's stock firmware initializes the Bluetooth chip only for its own narrow purposes, and nothing on the device could open an audiobook at all. Getting there meant a player, an audio stack, and a radio bring-up, all running inside an e-reader's spartan Linux.
The moment it broke
The first working version lost its mind on every reboot: the Bluetooth chip comes up with a different device address each cold boot, so every pairing with my headphones evaporated overnight. The fix runs at the lowest level the plugin touches. It fires the rfkill GPIO, attaches the HCI transport with a bundled hciattach, then writes a stable address back into the chip with Broadcom's vendor command. The real address gets captured once and kept in a small state file, and pairings have survived every reboot since.
The other fragile piece was audio. mpv doesn't exist for Kobo, and a hand-built binary that only compiles on one laptop is a time bomb, so the build runs inside KOReader's own cross-compilation container. Anyone with the container can reproduce the exact binary.
What it demonstrates
Embedded Linux work several layers below where app development usually stops: GPIO, HCI transports, vendor firmware quirks, and reproducible cross-compilation. And the stubbornness to make owned hardware do what it was always capable of.