Skip to content

Packet Filter V2#9

Open
gjelsoe wants to merge 3 commits into
IoTThinks:PowerSaving-v16from
gjelsoe:PowerSaving-v16
Open

Packet Filter V2#9
gjelsoe wants to merge 3 commits into
IoTThinks:PowerSaving-v16from
gjelsoe:PowerSaving-v16

Conversation

@gjelsoe

@gjelsoe gjelsoe commented Jun 13, 2026

Copy link
Copy Markdown

Packet Filter Engine

Adds a flexible rule-based packet filter engine to the repeater firmware.

Rules can match on route type, payload type, hop count, path hash size, last-hop repeater, channel hash, SNR and RSSI. Each rule supports an optional AND condition for combined matching. A configurable default policy (allow/drop) applies when no rule matches.

Rules are added disabled by default and must be explicitly enabled. All rules survive reboot via SPIFFS/LittleFS persistence.

New files

  • FilterRule.h — rule struct, enums and constants
  • FilterParser.h/.cpp — command parser
  • ChannelFilter.h/.cpp — rule storage, evaluation, persistence and CLI dispatch

Changes to existing files

  • MyMesh.h — added ChannelFilter _filter member and include
  • MyMesh.cpp — added _filter.load() in begin(), filter evaluation in filterRecvFloodPacket(), and filter command routing in handleCommand()

CLI

Commands are available over the remote CLI via the filter prefix. See FILTER.md for full command reference and examples.

Testing

A standalone test suite is included in filter_test_suite/. See filter_test_suite/README.md for build instructions.

gjelsoe added 3 commits June 13, 2026 17:19
Moves location for Filter Test Suite.
Formatting.
Different output from over Serial vs LoRa, no need for compact view over Serial.
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