BLE transfer companion for Xteink readers running compatible firmware.
The project provides a browser client for local BLE file transfer and a React Native workspace for native client work. The shared protocol package keeps transfer framing, validation, and authentication helpers consistent across clients.
Production web app: https://ble.marginalia-os.lol/
apps/web: browser companion built with Next.js.apps/mobile: React Native app workspace.packages/ble-protocol: shared BLE transfer protocol helpers.packages/ui: shared shadcn UI components.docs: protocol, compatibility, and release documents.
bun install
bun run lint
bun run typecheckRun the real-device browser transfer check against an already running web app:
bun run hardware:transfer-check -- --url http://localhost:3000/transferThe script opens visible Chrome, selects the real Marginalia Transfer Web Bluetooth device through Chrome CDP, waits for trusted-browser auth, clicks Transfer check, and writes .lab-reports/transfer-check.json.
Use Chrome CDP for this workflow; WebDriver BiDi can open the Web Bluetooth chooser here, but does not reliably expose selectable device entries.
First run for a fresh automation profile:
bun run hardware:transfer-check -- --url http://localhost:3000/transfer --code 123456The reader still requires physical confirmation before it saves the browser. After that, reruns should not need the six-digit code:
bun run hardware:transfer-check -- --url http://localhost:3000/transferDiagnostics-only hardware pass:
bun run hardware:transfer-check -- --url http://localhost:3000/transfer --mode diagnosticsThis downloads the crash report. Add --package-id <safe-package-id> to also download package-state diagnostics. The report includes the Chrome version, protocol, selected BLE device, auth path, status, recent event log entries, result rows, and overflow check. Use --verbose-events when a failure needs the full UI event log.