load() copied bytes straight into live FilterRule/FilterChannel and only checked a couple of relations afterwards, so a corrupt or hand-made file could adopt records holding field values this firmware never writes: an undefined type_mask or route_mask bit, a path chain longer than its slots, an unterminated sender/text/region string, a prob above 100, a channel key of the wrong length, or an "enabled" byte of 2, which a bool field converts to plain true before anything can range-check it. Records are now read as bytes and validated before they become objects. Malformed values REJECT the record rather than being masked or clamped: sanitising would quietly turn a rule into a different rule, and since matching is first-match-wins that changes which rule decides a packet. Two cases are deliberate exceptions, both narrowing rather than widening: - a chan_mask naming a channel the file does not store is confined to the channels that exist after the load, not rejected; - a chan= whose last channel was deleted keeps MASK_SET with an empty mask and stays inert, never a catch-all. A bad header rejects the whole file, because the header describes the file's shape and a wrong count means we no longer know where records are. A bad record only ends the load at that point: sizes are fixed, so the valid prefix is locatable and surviving rules keep their indices, which the CLI's index semantics depend on. Also rejects a ratelimit window outside 0..720 h, and states the version map as 3..6 rather than counting back from the current version. Two existing tests pinned the old all-or-nothing behaviour for a truncated file; they now assert the prefix property instead — at every truncation length, only whole records appear, in order, and an adopted record is a whole record rather than a plausible-looking prefix. 330 cases green across all four native envs, 276 clean under sanitizers, firmware compiles with RAM unchanged.
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.