Skip to content

Bluetooth LE transport + accuracy/UX enhancements (v2.1) - #5

Merged
TFD-42 merged 2 commits into
mainfrom
feat/bluetooth-le-transport-v2.1
Aug 13, 2026
Merged

Bluetooth LE transport + accuracy/UX enhancements (v2.1)#5
TFD-42 merged 2 commits into
mainfrom
feat/bluetooth-le-transport-v2.1

Conversation

@TFD-42

@TFD-42 TFD-42 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a Bluetooth LE transport so the Flipper streams to the Android app fully wirelessly (no cable), plus a batch of accuracy/UX enhancements and repo hardening. USB remains the default; BLE is additive and shares the exact same data path.

Verified end-to-end on real hardware (Flipper Zero "flip_Rpaneor" + Android 16 / API 36): sustained 5 Hz CSV streaming over BLE with the ordered sample counter incrementing losslessly.

Firmware (flipper/rf_logger.c)

  • Streams the CSV over BLE serial (ble_profile_serial) alongside USB CDC, simultaneously.
  • Advertising keepalive that self-heals after a BLE stack restart (e.g. after "Forget All Paired Devices").
  • On-screen BT status (BT:off / BT:adv / BT:ok); now requires the bt service; FAP → v2.1.

Android — new BLE transport (android/plugin/FlipperBlePlugin.java)

GATT serial bridge mirroring FlipperSerialPlugin's connect/disconnect/data/status API, so the web UI treats USB and BLE as interchangeable. Getting this reliable required fixing, in order:

  • Correct little-endian service/TX UUIDs (BLE stores 128-bit UUIDs reversed).
  • Bind the TX characteristic via indication, not the flow-control notify char.
  • Refresh Android's stale GATT cache before service discovery.
  • Use the API 33+ onCharacteristicChanged(…, byte[]) callback (the deprecated one returns null on Android 13+).
  • Force the LE transport during pairing (avoids the classic-PIN dead end).
  • Device picker for custom-named Flippers (no "Flipper" prefix), with the chosen address remembered.

Android — solver / UX

  • Transport picker (USB / Bluetooth), RSSI exponential smoothing, selectable environment / path-loss exponent n, leave-one-out outlier rejection, live capture-geometry hint, session persistence.
  • Fix: the live stream no longer forces the Allocation tab, so Triangulator stays put while streaming.

Docs / CI

  • README, SETUP, SECURITY, CONTRIBUTING updated for dual transport; stale Build/… paths corrected.
  • New: CHANGELOG.md, CODE_OF_CONDUCT.md, CI workflow (Python compile + spectrum.csv validation + JS syntax + ufbt FAP build), dependabot.yml.
  • Rebuilt artifacts/rf_logger.fap and artifacts/RF_Triangulator.apk.

🤖 Generated with Claude Code

Ellana and others added 2 commits August 13, 2026 00:58
Firmware (flipper/rf_logger.c, application.fam):
- Stream the CSV telemetry over BLE serial (ble_profile_serial) alongside USB.
- Advertising keepalive that self-heals after a BLE stack restart.
- On-screen BT status (BT:off / BT:adv / BT:ok); requires the `bt` service.

Android — new BLE transport (android/plugin/FlipperBlePlugin.java):
- GATT serial bridge mirroring FlipperSerialPlugin's connect/disconnect/data/
  status API so the web UI treats USB and BLE as interchangeable.
- Correct little-endian service/TX UUIDs, TX bound by indication (not the
  flow-control notify char), GATT cache refresh before discovery, API 33+
  characteristic callback, LE-forced pairing, device picker with remembered
  address for one-tap reconnect.

Android — solver/UX:
- Transport picker (USB / Bluetooth); RSSI exponential smoothing; selectable
  environment / path-loss exponent n; leave-one-out outlier rejection;
  live capture-geometry hint; session persistence.
- Fix: the live stream no longer forces the Allocation tab, so the
  Triangulator view stays put while data streams.

Docs / CI:
- README, SETUP, SECURITY, CONTRIBUTING updated for dual-transport; stale
  Build/ paths corrected. Added CHANGELOG, CODE_OF_CONDUCT, CI workflow
  (python compile + spectrum.csv validate + JS syntax + ufbt FAP build),
  and dependabot (github-actions).
- Rebuilt artifacts: rf_logger.fap (v2.1) and RF_Triangulator.apk.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- flipper/README.md: remove the removed v1 StateMenu preset flow; document the
  two-state machine, BLE serial streaming, and the BT status line.
- android/README.md: add FlipperBlePlugin; replace the inaccurate plugin method
  table (startStream/stopStream/getLatestRssi never existed) with the real
  connect/disconnect/isConnected + data/status API shared by both transports;
  document the transport picker and BLE UUID/indication details.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TFD-42
TFD-42 merged commit 13ca497 into main Aug 13, 2026
3 checks passed
@TFD-42
TFD-42 deleted the feat/bluetooth-le-transport-v2.1 branch August 13, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant