mirror of
https://github.com/meshtastic/firmware.git
synced 2026-11-08 15:24:57 -05:00
Adds a "Pair" frame, shown while Bluetooth is enabled, with a centered QR code of meshtastic://meshtastic/connections?address=x<BLE MAC>[&pin=<PIN>]. The PIN is included in FIXED_PIN and RANDOM_PIN modes: the random PIN is picked once when Bluetooth starts, so it is known before pairing begins. NRF52Bluetooth and NimbleBluetooth gain getPasskey() to report it. The PIN is not printed on the frame. The encoder (src/graphics/QrEncode.cpp) is a cut-down ricmoo/QRCode: ECC level M, versions 1-6, byte mode, with function modules computed instead of tracked in a second grid. About 2.7 KB of flash and ~200 B of stack while encoding. The 73-character link encodes as version 5 (37x37), which fits a 128x64 panel at one pixel per module. test_qr_encode pins the link's symbol against Project Nayuki's encoder and checks version selection at each capacity boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011C7D9bSthe6aUpG3jEHLyt