A 16/32-byte key is 32/64 hex chars while base64 PSKs are 24/44 chars, so
all-hex-and-32/64-long disambiguates cleanly. Widen the stored-PSK buffer to
fit a 64-char hex key.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Guard data[len]=0 against an over-long crafted payload (OOB store), and
match keywords against the whole folded message so a blocked word can't be
hidden in the self-declared sender name. Also drop the unguarded ctype.h.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Folds look-alike codepoints (fullwidth, math alphanumerics, circled/
squared letters, regional indicators, Cyrillic/Greek homoglyphs,
accented Latin) to plain ASCII and strips zero-width/combining marks
before matching keywords and sender names.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Adds a MESH_DEBUG line on each dropped message, plus "filter stats"
and "filter stats reset" commands to view/clear the filtered counter.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Lets a repeater decrypt channels it holds the key for (incl. the
built-in public channel) and drop messages matching blocked keywords
or sender names before forwarding. Configured via new "filter" CLI
commands and persisted to /channel_filter.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Before this commit, there was no way to set a different max hop count
for unscoped messages.
Now with this change, by defaul it tracks the flood.max setting, until
a user provides a flood.max.unscoped value, which tax precidence for
packets if ROUTE_TYPE_FLOOD is true.
AUTO_OFF_MILLIS is a power-save feature aimed at battery use. When the
board reports isExternalPowered() == true (USB or other DC source),
blanking the screen serves no purpose — there's nothing to conserve.
But OLEDs are vulnerable to burn-in with static content, so this
behaviour is gated behind a new build flag KEEP_DISPLAY_ON_USB. Default
is unchanged from upstream — the display blanks after AUTO_OFF_MILLIS
on USB or battery. Variants that ship with an LCD instead of an OLED
(e.g. heltec_t096) can opt in by adding -D KEEP_DISPLAY_ON_USB to
their env, gaining always-on-while-powered without exposing OLED users
to burn-in risk.
When the flag is enabled, the implementation refreshes _auto_off every
loop iteration while externally powered, so the timer naturally counts
a fresh AUTO_OFF_MILLIS window from the moment power is removed —
no instantaneous-blank-on-unplug.
Applied to all three companion_radio UI flavours (ui-new, ui-tiny,
ui-orig). Boards without an isExternalPowered() override use the
base-class default in MeshCore.h (returns false), so battery-powered
behaviour is unchanged everywhere.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Framework for upcoming variant-specific PRs that add LED feedback during boot. The hook gives users visual cues that the device is busy and
shouldn't be interacted with until startup completes.