MeshCore Repeater Filter Builder

Click-build packet-filter rules, then copy the commands and paste them into the repeater console.

✨ Packet-filter engine by gjelsoe · original PR #9

Defaults

Rules are evaluated top-to-bottom; the first match wins. If none match, the default mode applies.

Rules

On the repeater a rule is disabled the moment it is added. Tick “enabled” on a rule to append a filter enable <id> command that activates it. Rule IDs assume the list was cleared first.

Generated commands


      

Filter command cheatsheet

Reference for the repeater packet-filter engine. Rules are evaluated top-to-bottom; the first match wins, otherwise the default mode applies.

Subcommands

CommandDescription
filter mode <allow|drop>Set the default policy when no rule matches.
filter add <action> <field> <op> <value> [and <field> <op> <value>]Create a new filtering rule.
filter list [page]Display rules (page is 0-indexed; omit for page 0).
filter enable <id>Reactivate a disabled rule.
filter disable <id>Temporarily suspend a rule.
filter del <id>Remove a rule by its numeric ID.
filter clearDelete all rules at once.

Actions & default mode

dropDiscard the packet; do not forward.
allowForward the packet normally.
mode allowForward when no rule matches (default at first boot).
mode dropDiscard when no rule matches.

Whitelist: mode drop + explicit allow rules. Blacklist: mode allow + drop rules.

Match fields

FieldMeaningOperatorsNotes
routePacket routing typeeq, neqSee route values.
payloadPayload / message typeeq, neq, gt, ltNamed token or numeric (dec/hex).
hopsHops traversedeq, neq, gt, ltInteger.
pathsizeHash bytes per hopeq, neq, gt, ltRange 1–3.
pathLast-hop repeater hasheq, neqSpace-separated hex; OR logic. Not allowed as AND field.
channelChannel hash byteeq, neqHex (with/without 0x); grptxt/grpdata only.
snrSignal-to-noise (dB)eq, neq, gt, ltSigned integer.
rssiSignal strength (dBm)eq, neq, gt, ltSigned integer.

Operators: eq equals · neq not equals · gt greater than · lt less than (gt/lt are ignored for path).

Value formats

route
tflood    transport flood
flood     flood
direct    direct
tdirect   transport direct
payload
req   resp   txt    ack
advert  grptxt  grpdata
anonreq  path   trace
multi   ctrl   raw
(or decimal / 0x.. hex)
pathOne or more space-separated hex hashes; each 2, 4, or 6 hex chars (1–3 bytes), all the same length, matching the network hash size. Matches if the last hop equals any listed hash (max 4).
channelSingle hex byte, e.g. 0xAB or AB. Applies to grptxt/grpdata only.
snrSigned whole dB, e.g. -10, 5.
rssiSigned dBm, e.g. -110, -90.

AND conditions

filter add <action> <field> <op> <value> and <field> <op> <value>

Limits

Maximum rules8
AND conditions per rule1
Path hashes per rule4
Path hash size3 bytes (2, 4, or 6 hex chars)
Rules persistence/filter_rules.bin

The rule file has no version field — when upgrading from a build without AND support, delete /filter_rules.bin and re-enter the rules.

List output format

mode:allow rules:6/8 p1/2
0 drop payload eq grptxt
1 drop route eq tflood and hops gt 5
2* drop snr lt -10

Examples

Drop group-text messages
filter add drop payload eq grptxt
Drop transport-flood packets
filter add drop route eq tflood
Drop packets exceeding 5 hops
filter add drop hops gt 5
Drop SNR below −10 dB
filter add drop snr lt -10
Drop weak signal (RSSI < −110)
filter add drop rssi lt -110
Drop via a specific repeater
filter add drop path eq AB
Drop via multiple repeaters
filter add drop path eq AB 12 CD
Drop on a specific channel
filter add drop channel eq 0xAB
Channel 0x11 only if > 8 hops
filter add drop channel eq 0x11 and hops gt 8
Poor SNR AND weak signal
filter add drop snr lt -10 and rssi lt -100
Via repeater AB only if > 4 hops
filter add drop path eq AB and hops gt 4
Allow only flood (whitelist)
filter mode drop
filter add allow route eq flood
Allow only direct text with good signal
filter mode drop
filter add allow payload eq txt and rssi gt -90
Manage rules
filter disable 2
filter enable 2
filter list 1
filter del 1
Clear all and reset default
filter clear
filter mode allow