Add helpful checks of channel names and PSK#10792
Open
NomDeTom wants to merge 5 commits into
Open
Conversation
Contributor
⚡ Try this PR in the Web FlasherWarning This is an automated, unreviewed CI test build. Back up your device configuration Supported boards built by this PR (25)
Build artifacts expire on 2026-07-26. Updated for |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds AdminModule-side validation/warnings to help users avoid channel-name and PSK configurations that unintentionally diverge from modem preset expectations, reducing silent interoperability failures (notably around preset changes and “blank” inputs).
Changes:
- Emit warnings after a channel is saved to catch blank PSKs (with licensing exceptions) and preset-name/PSK mismatches.
- Emit warnings after a modem preset change to detect channels still named like the old preset or colliding with the new preset name.
- Add helper normalization for loose preset-name comparison (case-insensitive, spaces stripped).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/modules/AdminModule.h |
Declares new internal warning helpers for LoRa preset changes and channel updates. |
src/modules/AdminModule.cpp |
Implements normalization + warning logic, and wires warnings into handleSetConfig() and handleSetChannel(). |
Contributor
Firmware Size Report22 targets | vs
Show 17 more target(s)
Updated for cca1cc1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the fix for #10764 where a user can think that they have changed presets, but have an explicitly named channel that uses the old preset default name - user on NarrowSlow getting/sending channel messages with hash 0x08 rather than 0x12.
This also fixes the case where a completely blank password is entered rather than AQ==, which again yields an incorrect channel hash (0x0a rather than 0x08 for LongFast, for example) - this is skipped for licensed users.
I have also included a fix for a perennial problem - my inability to remember the difference between LongFast, Longfast, Long Fast, Long fast, long fast and longfast. The firmware checks if a channel name that is lower-cased and stripped of spaces matches the same as the modem preset, and flags this to the user.
If you're on a custom preset, you also get some help to match a channel correctly, although it can't be as exact.
All of these generate phone warnings, but I think they're necessary.
I've tested this, and it generates the warnings as expected.
example log lines:
🤝 Attestations
Promicro DIY