Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Keep GitHub Actions in the CI workflow up to date. (The Flipper FAP and the
# Android app pull their dependencies from ufbt/Gradle at build time and are
# not tracked here.)
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
# spectrum_scraper is pure Python standard library — compile-check it and
# confirm the bundled allocation CSV parses with the expected columns.
python:
name: Python (spectrum_scraper)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Byte-compile scraper
run: python -m py_compile spectrum_scraper/*.py
- name: Validate spectrum.csv header + rows
run: |
python - <<'PY'
import csv, sys
path = "android/www/spectrum.csv"
with open(path, newline="", encoding="utf-8") as f:
r = csv.DictReader(f)
required = {"freq_low_mhz", "freq_high_mhz"}
missing = required - set(r.fieldnames or [])
assert not missing, f"spectrum.csv missing columns: {missing}"
n = 0
for row in r:
float(row["freq_low_mhz"]); float(row["freq_high_mhz"])
n += 1
assert n > 0, "spectrum.csv has no data rows"
print(f"spectrum.csv OK: {n} rows, columns={r.fieldnames}")
PY

# Web UI is vanilla JS (no build step) — syntax-check the sources.
web:
name: Web UI (syntax)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Syntax-check JS
run: node --check android/www/app.js

# Build the Flipper FAP exactly as a maintainer would, with ufbt.
fap:
name: Flipper FAP (ufbt build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install ufbt
run: pip install ufbt
- name: Fetch Flipper SDK
run: ufbt update
- name: Build FAP
working-directory: flipper
run: ufbt
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Changelog

All notable changes to Mhz_Localiser are documented here.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project aims to follow semantic-ish versioning tied to the FAP/APK version.

## [2.1] - 2026-08-13

### Added
- **Bluetooth LE transport.** The Flipper FAP now streams the same CSV telemetry over
**both USB CDC and Bluetooth LE** simultaneously. The Android app can connect over either —
fully wireless, no cable required.
- **Dual-transport picker** in the app drawer (USB / Bluetooth); the solver, map, and
allocation lookup behave identically on either transport.
- **BLE device picker** that lists nearby Flippers (matched by serial-service UUID and by
name, so custom-named units without the "Flipper" prefix are found). The chosen device
address is remembered for one-tap reconnect.
- **On-device Bluetooth status** on the Flipper running screen: `BT:off` / `BT:adv` / `BT:ok`.
- **RSSI smoothing** — exponential moving-average filter on the live stream to damp
single-sample multipath spikes before capture.
- **Selectable environment / path-loss exponent `n`** (open field / suburban / urban /
dense / indoor, or a custom value) in the drawer.
- **Automatic outlier rejection** — leave-one-out residual check excludes likely-multipath
captures before the final solve.
- **Live capture-geometry hint** warning when captures are too collinear for a good fix.
- **Session persistence** — captures and settings survive an app restart.
- Live allocation sync driven by the Flipper stream, auto-detected frequency, and a
display-only allocation view.

### Fixed
- BLE reliability: force the LE transport during pairing, self-heal advertising after a
stack restart, refresh Android's stale GATT service cache before discovery, and bind the
correct data characteristic (TX / indicate rather than the flow-control notify char).
- Tab navigation: the live stream no longer forces the app back to the Allocation tab,
so the Triangulator view stays put while data streams.

### Changed
- `application.fam` now requires the `bt` service; FAP version bumped to 2.1.
- README, protocol docs, and requirements updated for dual-transport operation.

## [2.0]

### Changed
- Flipper FAP is **manual-frequency only** — the preset menu (315 / 433 / 868 / 915 MHz)
was removed and the app opens directly on the digit editor for faster startup.
- Smaller FAP binary (preset table and menu renderer eliminated).
- Android plugin auto-reconnects over USB if the link drops.
- Enriched README; tightened `.gitignore`.

## [1.0]

### Added
- Initial release: Sub-GHz RSSI logger FAP streaming CSV over USB CDC.
- Android triangulation app: live readout, GPS + RSSI capture, Nelder–Mead least-squares
solver with RMS error, Leaflet map.
- Offline spectrum allocation lookup (~2,450 rows: ITU R1/R2/R3, USA federal + non-federal,
per-country EU) bundled as `spectrum.csv`, with the Python `spectrum_scraper` tooling.

[2.1]: https://github.com/TFD-42/Mhz_Localiser/releases
[2.0]: https://github.com/TFD-42/Mhz_Localiser/releases
[1.0]: https://github.com/TFD-42/Mhz_Localiser/releases
52 changes: 52 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes
- Focusing on what is best for the overall community

Examples of unacceptable behavior:

- The use of sexualized language or imagery, and sexual attention or advances
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Scope

This Code of Conduct applies within all community spaces — the repository, its
issues, pull requests, and discussions — and also applies when an individual is
officially representing the project in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the project maintainers via GitHub — by opening a private report on
the repository, or by contacting the maintainer [@TFD-42](https://github.com/TFD-42).
All complaints will be reviewed and investigated promptly and fairly. Maintainers
are obligated to respect the privacy and security of the reporter.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
version 2.1, available at
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ This lets us calibrate the path-loss exponent guidance and document failure mode

## Code

- **Flipper FAP** (`Build/rf_logger/`) — keep dependencies to `furi`, `furi_hal`, `gui`, `storage`, `notification`. No external libraries.
- **Android plugin** (`Build/android_app/plugin/`) — `usb-serial-for-android` only. Avoid adding heavyweight deps.
- **Web UI** (`Build/android_app/www/`) — vanilla JS + Leaflet. No build step, no framework.
- **Flipper FAP** (`flipper/`) — keep dependencies to `furi`, `furi_hal`, `gui`, `storage`, `notification`, `bt`. No external libraries.
- **Android plugins** (`android/plugin/`) — `FlipperSerialPlugin` (USB, via `usb-serial-for-android`) and `FlipperBlePlugin` (Bluetooth, via the `android.bluetooth` framework — no extra dep). Both expose the same `connect`/`disconnect`/`data`/`status` interface; keep them interchangeable. Avoid adding heavyweight deps.
- **Web UI** (`android/www/`) — vanilla JS + Leaflet. No build step, no framework.

Run `clang-format` on C files and stick to 4-space indent / 100-col width.

Expand Down
Loading
Loading