Claude and I were discussing adding encryption to my claude buddy on Badger 2350 project. it said bluetooth encryption was not supported because of the bluetooth stack chosen. Is that a correct assessment?
----- from Claude Code ---------
It isn’t about MicroPython being too old, though. It’s how Badgeware’s MicroPython is built.
Why the link can’t be encrypted:
- The version is recent. Badgeware builds Pimoroni’s MicroPython fork at
bw-1.29.0-gc, which is based on MicroPython 1.29. - Pairing depends on the Bluetooth stack. The flag that enables it,
MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING, is only turned on for builds that use the NimBLE stack. This is set in the rp2 port’sCMakeLists.txt(README.md:563-567). - Badgeware uses BTstack instead. On the RP2350 and its CYW43 radio, Badgeware builds MicroPython with BTstack, so the flag is off and there is no pairing or bonding API. That means no passkey, no stored keys and no encryption.
What that means for the badge:
- Status reply: it reports
"sec": false, as the protocol expects of a device that can’t encrypt. Desktop still connects. unpair: acknowledged, but there’s nothing to erase.- Mitigations (docs/protocol.md:75-82):
- a permission decision is only sent from a physical A or B press, and only for the prompt drawn on screen;
- folder pushes are refused.
What it would take: a custom firmware build, either with NimBLE on the rp2 port or with the pairing bindings enabled for BTstack.