Jason Huebert e6429f5651 fix(filter): freeze the on-disk record sizes and test them as literal bytes
load() derived every historical record size from offsetof(FilterRule, ...), so
moving a field silently changed what a v3, v4 or v5 config meant, and an old
config would load as something it never was with no compile error to explain it.
The sizes are now literals — 124 B (v3), 156 B (v4/v5), 160 B (v6), 50 B per
channel — because a format is a promise to bytes already in the field. The
version map also stops subtracting from FILTER_CFG_VERSION, which had the same
drift problem in a different place.

static_asserts tie the frozen numbers to the live struct, so the current
version still fails to compile when a persisted field moves. Verified the
tripwire fires: changing the v6 size to 161 breaks the build with "v6 record
size is frozen at 160 B; the live struct no longer matches". The assert message
says what to do — bump the version and write migration — and never to edit the
numbers to match.

The old-config tests built v3/v4/v5 files by trimming a freshly saved v6 record,
so the fixtures moved with the struct and could not catch the struct breaking
old configs. They are now literal byte values written out per version, with the
fixture section delimited so the migration path and its fixtures come out in one
excision later.

No record bytes change: v3..v6 configs load exactly as before. 325 cases green
across all four native envs, both sanitizer envs clean.
2026-10-09 18:28:45 +00:00
2026-04-28 21:39:34 +10:00
2026-09-30 14:52:58 +13:00
2025-01-13 14:07:48 +11:00
2025-06-05 20:35:40 +12:00
2026-08-13 00:53:58 +10:00
2026-02-03 13:47:43 +13:00
2026-03-23 14:26:56 +01:00
2025-01-20 10:20:42 +11:00
2025-01-25 23:09:09 +11:00
2026-03-31 00:51:15 +13:00
2026-10-05 10:46:04 +00:00
2025-03-03 18:08:00 +13:00
2026-06-05 21:25:25 +12:00

MeshCore — Repeater Firmware with a Remote-Configurable Packet Filter

This is a feature fork of MeshCore. It tracks upstream automatically (synced weekly) and adds two repeater-focused capabilities on top of stock firmware. Everything else — supported boards, clients, protocols, build system — is identical to upstream; see the upstream README for the general project, hardware support, and getting-started guide.

What this fork adds

📡 Packet filter

A remote-configurable drop-rule engine for the simple_repeater firmware. Rules match on packet type, route type, region, hop count, channel, and — on decrypted payloads — channel identity and sender/text patterns. Rules are managed over the repeater CLI, locally via serial or remotely over the mesh by an authenticated admin. No rebuild, no physical access.

Independently of the rules, flood-route adverts can be rate-limited per originating node: each node's advert is forwarded at most once per window (up to 30 days), taming advert storms on busy channels while every node stays discoverable.

→ Full guide, including the complete predicate reference and CLI commands: FILTER.md

🔋 Battery gate

A configurable low-battery cut-off: below a set voltage the repeater stops forwarding (but stays reachable and keeps advertising); when the battery recovers it resumes automatically. Debounce + hysteresis keep it from flapping, and the admin can check voltage and tune thresholds over the mesh.

→ Full guide: BATTERY.md

Why run this instead of stock repeater firmware?

Stock repeaters forward everything they hear, until the battery dies. This fork is for operators who want policy and resilience at the node:

  • Shared / community nodes — mute noisy senders or channels that eat your airtime, without asking anyone to change their setup.
  • OpenHop-style policy, nothing extra to run — the rule engine is modelled after the policy filters in OpenHop and lives entirely in the repeater firmware, so you get about the same functionality with just the node itself — no computer, companion app, or other hardware needed.
  • Solar / off-grid sites — the node goes quiet while it can still answer you, instead of disappearing dark, and wakes itself when there's sun again.

Getting the firmware

Prebuilt binaries for all supported boards are on the Releases page. Two channels:

Channel Branch Based on Tags
dev repeater-filter upstream dev (merged weekly by CI) filter-v*-dev.N
stable repeater-filter-stable upstream main releases filter-v*

Flash as you would stock firmware, then follow FILTER.md to set your first rules over the CLI.

S
Description
No description provided
Readme MIT
21 MiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 52.7%
C 44.3%
Python 1.9%
Shell 1%