Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
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
33 changes: 28 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,22 @@ build_firmware() {
# v1.17.0-dutchmeshcore.nl-abcdef.
FORK_TAG="-dutchmeshcore.nl"

# Embedded version: base + build number (4th component) + fork tag + variant/channel
# tag + hash, so the node reports its build and `ota check` can show how many builds
# behind it is.
EMBEDDED_VERSION_STRING="${FIRMWARE_VERSION}${BUILD_NUMBER_SUFFIX}${FORK_TAG}${VARIANT_TAG}-${COMMIT_HASH}"
# DMC release-channel marker (e.g. dev), placed AFTER the version + build number
# and BEFORE the fork tag, so the node reports e.g.
# v1.17.1-dev-dutchmeshcore.nl-observer-mqtt-abcdef. Empty = the stable/production
# channel (unchanged string), so this is safe to leave in place for the stable
# observer prebuilts: only a build that sets DMC_CHANNEL gets the marker. Parse-
# neutral for OTA for the same reason as the fork tag (it sits in the middle region
# ota_parseVersion/ota_extractHash ignore).
CHANNEL_MARKER=""
if [ -n "${DMC_CHANNEL:-}" ]; then
CHANNEL_MARKER="-${DMC_CHANNEL}"
fi

# Embedded version: base + build number (4th component) + channel marker + fork tag
# + variant/channel tag + hash, so the node reports its build and `ota check` can
# show how many builds behind it is.
EMBEDDED_VERSION_STRING="${FIRMWARE_VERSION}${BUILD_NUMBER_SUFFIX}${CHANNEL_MARKER}${FORK_TAG}${VARIANT_TAG}-${COMMIT_HASH}"

# Release channel. The observer pull-OTA fetches its slim per-variant manifest
# from <OTA_MANIFEST_BASE>/<OTA_VARIANT>.json, so this URL IS the channel: a
Expand All @@ -218,7 +230,18 @@ build_firmware() {
# locally built firmware. Note that PLATFORMIO_BUILD_FLAGS cannot reliably
# override a -D coming from build_flags (SCons reorders -U/-D), which is why
# the .ini declarations were removed rather than overridden.
OTA_MANIFEST_BASE_URL="${OTA_MANIFEST_BASE_URL:-https://ota.dutchmeshcore.nl/mqtt/v}"
#
# Channel coupling: a DMC_CHANNEL=dev build pulls (and self-updates) from the
# OTA server's dev channel, everything else from stable. The DutchMeshCore-OTA
# server serves stable manifests at /mqtt/v and dev manifests at /mqtt/dev/v
# (segregated by GitHub release tag), so pointing the base at /mqtt/dev/v is
# what keeps a dev prebuilt on the dev channel instead of stable. An explicit
# OTA_MANIFEST_BASE_URL from the environment still wins (e.g. a one-off beta).
if [ "${DMC_CHANNEL:-}" = "dev" ]; then
OTA_MANIFEST_BASE_URL="${OTA_MANIFEST_BASE_URL:-https://ota.dutchmeshcore.nl/mqtt/dev/v}"
else
OTA_MANIFEST_BASE_URL="${OTA_MANIFEST_BASE_URL:-https://ota.dutchmeshcore.nl/mqtt/v}"
fi

# Both named channel bases are baked into EVERY observer build so `ota branch`
# can re-point a device at either channel at runtime. OTA_MANIFEST_BASE above stays
Expand Down
14 changes: 13 additions & 1 deletion dmc-docs/custom-cli.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ACL-Kontaktpakete werden übersprungen. Der Zustand wird in `/filter_prefs` gesp
- `filter help`
- `filter on` / `filter off`
- `filter reset`
- `filter dryrun on|off` (Drops zählen, aber weiterhin weiterleiten; Statuszeile endet auf `(dry-run)`)
- `filter types`
- `filter count`
- `filter hops <type> <max_hops>` (Typ `00`-`11`, Hops `0`-`64`)
Expand All @@ -23,7 +24,18 @@ ACL-Kontaktpakete werden übersprungen. Der Zustand wird in `/filter_prefs` gesp
- `filter channel list|add|remove <#name|Public>` (bis zu 16, nur GRP_TXT)
- `filter hash <min_bytes>` (1-3, minimale Path-Hash-Größe)
- `filter malformed on|off` (UTF-8-/Strukturvalidierung von öffentlichem GRP_TXT)
- `filter stats <topic>` mit topic = `hops|rate|hash|channel|malformed|top`
- `filter advert <stunden>` (0-720; das Advert jedes Knotens höchstens einmal pro Fenster
weitergeleitet, `0` = aus) / `filter advert clear`
- `filter path list|add|remove <hex>` (bis zu 8 Präfixe mit 2-8 Hex-Ziffern; verwirft alles,
was über einen Repeater mit diesem ID-Präfix kam)
- `filter sender add <name> [secs] [prob]` / `remove` / `list` (bis zu 8; Name exakt, `Bot*` = Präfix;
`secs` 0 = blockieren, sonst eine Nachricht pro `secs` durchlassen; `prob` 1-100 = Anteil, den die Regel entscheidet)
- `filter text add <muster> [secs] [prob]` / `remove` / `list` (bis zu 8; Teilstring, `^` = Nachrichtenanfang)
- `filter watch add|remove|list <#name>` (bis zu 4 Kanäle, die die Regeln lesen dürfen, neben Public)
- `filter age <Minuten>|off` (1-10080; verwirft Gruppennachrichten auf Public und beobachteten
Kanälen, die älter sind, nach der Uhr des Repeaters; inaktiv, solange die Uhr nicht gestellt ist)
- `filter stats <topic>` mit topic = `hops|rate|hash|channel|malformed|top|advert|path|air|sender|text|age`
(`air` = geschätzte eingesparte Sendezeit)

### Pakettypen

Expand Down
14 changes: 13 additions & 1 deletion dmc-docs/custom-cli.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ packets bypass it. State is persisted to `/filter_prefs`.
- `filter help`
- `filter on` / `filter off`
- `filter reset`
- `filter dryrun on|off` (count drops but keep forwarding; the status line ends in `(dry-run)`)
- `filter types`
- `filter count`
- `filter hops <type> <max_hops>` (type `00`-`11`, hops `0`-`64`)
Expand All @@ -22,7 +23,18 @@ packets bypass it. State is persisted to `/filter_prefs`.
- `filter channel list|add|remove <#name|Public>` (up to 16, GRP_TXT only)
- `filter hash <min_bytes>` (1-3, minimum path-hash size)
- `filter malformed on|off` (UTF-8 / structure validation of public GRP_TXT)
- `filter stats <topic>` where topic = `hops|rate|hash|channel|malformed|top`
- `filter advert <hours>` (0-720; each node's advert forwarded at most once per window,
`0` = off) / `filter advert clear`
- `filter path list|add|remove <hex>` (up to 8 prefixes of 2-8 hex digits; drops everything
that came through a repeater whose ID starts with it)
- `filter sender add <name> [secs] [prob]` / `remove` / `list` (up to 8; exact name, `Bot*` = prefix;
`secs` 0 = block, else pass one message per `secs`; `prob` 1-100 = share of matches the rule decides)
- `filter text add <pattern> [secs] [prob]` / `remove` / `list` (up to 8; substring, `^` = start of message)
- `filter watch add|remove|list <#name>` (up to 4 channels the rules may read, besides Public)
- `filter age <minutes>|off` (1-10080; drop group texts on Public and watched channels older than
this, by the repeater's clock; inactive while the clock is not set)
- `filter stats <topic>` where topic = `hops|rate|hash|channel|malformed|top|advert|path|air|sender|text|age`
(`air` = estimated airtime saved)

### Packet types

Expand Down
14 changes: 13 additions & 1 deletion dmc-docs/custom-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ACL-contactpakketten worden overgeslagen. De status wordt bewaard in `/filter_pr
- `filter help`
- `filter on` / `filter off`
- `filter reset`
- `filter dryrun on|off` (drops tellen maar wél doorsturen; statusregel eindigt op `(dry-run)`)
- `filter types`
- `filter count`
- `filter hops <type> <max_hops>` (type `00`-`11`, hops `0`-`64`)
Expand All @@ -23,7 +24,18 @@ ACL-contactpakketten worden overgeslagen. De status wordt bewaard in `/filter_pr
- `filter channel list|add|remove <#naam|Public>` (max. 16, alleen GRP_TXT)
- `filter hash <min_bytes>` (1-3, minimale path-hashgrootte)
- `filter malformed on|off` (UTF-8-/structuurvalidatie van publieke GRP_TXT)
- `filter stats <topic>` met topic = `hops|rate|hash|channel|malformed|top`
- `filter advert <uren>` (0-720; elke node's advert hooguit één keer per venster doorgestuurd,
`0` = uit) / `filter advert clear`
- `filter path list|add|remove <hex>` (max. 8 prefixen van 2-8 hexcijfers; blokkeert alles wat
via een repeater met dat ID-prefix kwam)
- `filter sender add <naam> [secs] [prob]` / `remove` / `list` (max. 8; naam exact, `Bot*` = prefix;
`secs` 0 = blokkeren, anders 1 bericht per `secs` doorlaten; `prob` 1-100 = aandeel dat de regel beslist)
- `filter text add <patroon> [secs] [prob]` / `remove` / `list` (max. 8; substring, `^` = begin van het bericht)
- `filter watch add|remove|list <#naam>` (max. 4 kanalen die de regels mogen lezen, naast Public)
- `filter age <minuten>|off` (1-10080; groepsberichten op Public en gevolgde kanalen die ouder zijn
dan dit worden gedropt, volgens de klok van de repeater; doet niets zolang de klok niet is gezet)
- `filter stats <topic>` met topic = `hops|rate|hash|channel|malformed|top|advert|path|air|sender|text|age`
(`air` = geschatte bespaarde zendtijd)

### Pakkettypes

Expand Down
8 changes: 7 additions & 1 deletion docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,10 @@ Configuration and statistics are kept apart: `filter <setting>` shows and change
- `filter on`
- `filter off`
- `filter reset` — restore the default settings (counters are not affected)
- `filter dryrun` / `filter dryrun <on|off>` — count drops but keep forwarding, to size a setting before enforcing it
- `filter types` — list the packet type IDs used by `hops`, `rate` and `count`

**Note:** The filter is disabled by default. Direct-routed packets and packets involving known ACL contacts always bypass it.
**Note:** The filter is disabled by default. Direct-routed packets and packets involving known ACL contacts always bypass it. While dry-run is on the status line ends in `(dry-run)`.

---

Expand Down Expand Up @@ -257,6 +258,11 @@ filter
- `filter stats channel`
- `filter stats malformed`
- `filter stats top`
- `filter stats advert` — drops by the per-origin advert window
- `filter stats path` — drops per blocked path prefix
- `filter stats air` — estimated time-on-air the drops saved (in dry-run: would have saved)
- `filter stats sender` / `filter stats text` — drops (and throttle passes) per sender/text rule
- `filter stats age` — group texts dropped by the message age limit (`filter age <minutes>|off`)

**Example:**
```text
Expand Down
Loading
Loading