From 69eca3102a54b3d2372af5df60654b5ca0b49d31 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Oct 2026 04:06:03 +0000 Subject: [PATCH 1/5] plan 0031: run the logger's remote-transfer PIN handshake on connect The Fledgling firmware (logger plan 0019) now advertises a PIN-locked transfer service from its main menu, so a download can start without pressing Transfer on the device. This is the app side: DeviceContext.connect runs AUTH?/AUTH: before handing out the connection, learns the PIN via PINGET on a locally started transfer, tries the stored PIN silently, and only prompts for a logger it has never seen. Pre-0019 firmware stays silent to AUTH? and connects exactly as before after 2 s. The PIN never leaves the device's browser storage. The Device tab shows the stored copy (new firmware omits it from SLIST), requires exactly four digits, and gains the remote_transfer on/off setting. Golden vectors are shared with the firmware tests and LapWing. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01BTPVvtL3ZVDj7UBcAthaQk --- CHANGELOG.md | 17 ++ CLAUDE.md | 2 +- docs/ble-protocol.md | 76 ++++++- docs/ble.md | 8 + docs/plans/0031-remote-transfer-pin.md | 81 +++++++ src/components/LoggerPinDialog.tsx | 66 ++++++ src/components/drawer/DeviceSettingsTab.tsx | 15 +- src/contexts/DeviceContext.tsx | 50 +++- src/lib/ble/auth.test.ts | 178 +++++++++++++++ src/lib/ble/auth.ts | 240 ++++++++++++++++++++ src/lib/ble/index.ts | 10 + src/lib/ble/pinStore.ts | 59 +++++ src/lib/deviceSettingsSchema.test.ts | 13 ++ src/lib/deviceSettingsSchema.ts | 27 ++- src/locales/de/drawer.json | 16 ++ src/locales/en/drawer.json | 16 ++ src/locales/es/drawer.json | 16 ++ src/locales/fr/drawer.json | 16 ++ src/locales/it/drawer.json | 16 ++ src/locales/ja/drawer.json | 16 ++ src/locales/pt-BR/drawer.json | 16 ++ 21 files changed, 947 insertions(+), 7 deletions(-) create mode 100644 docs/plans/0031-remote-transfer-pin.md create mode 100644 src/components/LoggerPinDialog.tsx create mode 100644 src/lib/ble/auth.test.ts create mode 100644 src/lib/ble/auth.ts create mode 100644 src/lib/ble/pinStore.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bc25225..be82ae33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > from git history and grouped by theme rather than exhaustive per-commit > detail. +## [5.1.0] - unreleased + +### Added +- **Start a logger download from the app while the logger sits on its menu.** + With a Fledgling running the new firmware, Connect works without pressing + Transfer on the logger first. The logger only opens up once the app proves it + knows the logger's 4-digit PIN, which the app learns automatically the next + time you start a transfer from the logger itself. A logger it hasn't seen + before asks for the PIN once (shown on the logger under Transfer → PIN). Too + many wrong PINs lock the logger for a while, and the Insta360 camera always + gets the radio first. Older loggers connect exactly as before. (Plan 0031.) +- **Remote Transfer setting** on the Device tab, to turn this off per logger. + +### Changed +- The Device tab's Bluetooth PIN now has to be exactly four digits (leading + zeros are fine), matching what the logger accepts. + ## [5.0.0] - 2026-10-04 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index e0c66b42..14a8764d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -143,7 +143,7 @@ src/ │ ├── insta360/ # ★ Native-only Insta360 camera bridge (plan 0025): ipc (insta360_* over the lazy Tauri loader), nativePlayer (the camera stream as a