Skip to content

Add helpful checks of channel names and PSK#10792

Open
NomDeTom wants to merge 5 commits into
meshtastic:developfrom
NomDeTom:Poka-Yoke
Open

Add helpful checks of channel names and PSK#10792
NomDeTom wants to merge 5 commits into
meshtastic:developfrom
NomDeTom:Poka-Yoke

Conversation

@NomDeTom

@NomDeTom NomDeTom commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

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:

WRN [Router] Channel 1 name 'nArrOwFast' looks like a mistype of 'NarrowFast' - clear the name to use the preset name automatically.
WRN [Router] Channel 1 name 'nArrOwFast' looks like a mistype of 'NarrowFast' - clear the name to use the preset name automatically.
WRN [Router] Channel 0 'nArrOwfast' matches preset 'NarrowFast' but uses a non-default key - other nodes on this preset cannot decode it.
Screenshot_20260625_175235_Meshtastic Screenshot_20260625_175413_Meshtastic Screenshot_20260625_175204_Meshtastic

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)
      Promicro DIY

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Flash this PR in the Web Flasher

firmware commit boards expires

Warning

This is an automated, unreviewed CI test build. Back up your device configuration
before flashing, and only flash devices you are able to recover.

Supported boards built by this PR (25)
Device Board Platform
Crowpanel Adv 3.5 TFT elecrow-adv-35-tft esp32-s3
Heltec HT62 heltec-ht62-esp32c3-sx1262 esp32-c3
Heltec Mesh Node 096 heltec-mesh-node-t096 nrf52840
Heltec Mesh Node T1 heltec-mesh-node-t1 nrf52840
Heltec Mesh Node T114 heltec-mesh-node-t114 nrf52840
Heltec V3 heltec-v3 esp32-s3
Heltec V4 heltec-v4 esp32-s3
Raspberry Pi Pico pico rp2040
Raspberry Pi Pico W picow rp2040
RAK WisMesh Tag rak_wismeshtag nrf52840
RAK WisBlock 11200 rak11200 esp32
RAK WisBlock 11310 rak11310 rp2040
RAK3312 rak3312 esp32-s3
RAK WisBlock 4631 rak4631 nrf52840
Seeed Wio Tracker L1 seeed_wio_tracker_L1 nrf52840
Seeed Xiao NRF52840 Kit seeed_xiao_nrf52840_kit nrf52840
Seeed Xiao ESP32-S3 seeed-xiao-s3 esp32-s3
Station G2 station-g2 esp32-s3
Station G3 station-g3 esp32-s3
LILYGO T-Deck t-deck-tft esp32-s3
LILYGO T-Echo t-echo nrf52840
LILYGO T-Echo Plus t-echo-plus nrf52840
LILYGO T-Impulse Plus t-impulse-plus nrf52840
LilyGo T3-C6 tlora-c6 esp32-c6
Seeed SenseCAP T1000-E tracker-t1000-e nrf52840

Build artifacts expire on 2026-07-26. Updated for ae97aad.

@github-actions github-actions Bot added needs-review Needs human review bugfix Pull request that fixes bugs labels Jun 25, 2026
@NomDeTom NomDeTom requested a review from Copilot June 25, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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().

Comment thread src/modules/AdminModule.cpp Outdated
Comment thread src/modules/AdminModule.cpp
Comment thread src/modules/AdminModule.cpp Outdated
Comment thread src/modules/AdminModule.cpp Outdated
Comment thread src/modules/AdminModule.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown
Contributor

Firmware Size Report

22 targets | vs develop: 22 increased, net +60,132 (+58.7 KB)

Target Size vs develop
heltec-vision-master-e213-inkhud 2,219,408 📈 +3,280 (+3.2 KB)
rak11200 1,855,216 📈 +3,232 (+3.2 KB)
elecrow-adv-35-tft 3,410,272 📈 +3,184 (+3.1 KB)
heltec-ht62-esp32c3-sx1262 2,129,280 📈 +3,136 (+3.1 KB)
tlora-c6 2,362,688 📈 +3,136 (+3.1 KB)
Show 17 more target(s)
Target Size vs develop
heltec-v4 2,270,736 📈 +3,120 (+3.0 KB)
heltec-v3 2,258,272 📈 +3,056 (+3.0 KB)
seeed-xiao-s3 2,270,768 📈 +3,024 (+3.0 KB)
rak3312 2,266,704 📈 +2,800 (+2.7 KB)
picow 1,239,784 📈 +2,784 (+2.7 KB)
pico2w 1,215,808 📈 +2,740 (+2.7 KB)
station-g2 2,260,928 📈 +2,736 (+2.7 KB)
station-g3 2,260,928 📈 +2,720 (+2.7 KB)
t-eth-elite 2,484,496 📈 +2,608 (+2.5 KB)
pico 777,784 📈 +2,520 (+2.5 KB)
seeed_xiao_rp2040 775,984 📈 +2,520 (+2.5 KB)
seeed_xiao_rp2350 763,416 📈 +2,480 (+2.4 KB)
pico2 765,256 📈 +2,464 (+2.4 KB)
rak11310 800,520 📈 +2,352 (+2.3 KB)
rak3172 184,340 📈 +2,232 (+2.2 KB)
wio-e5 236,596 📈 +2,136 (+2.1 KB)
t-deck-tft 3,805,040 📈 +1,872 (+1.8 KB)

Updated for cca1cc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants