Skip to content

feat: support split SSID per band in PnP setup (#378)#938

Merged
AustinChangLinksys merged 4 commits into
dev-1.2.14from
feat/pnp-split-ssid-support
Jun 16, 2026
Merged

feat: support split SSID per band in PnP setup (#378)#938
AustinChangLinksys merged 4 commits into
dev-1.2.14from
feat/pnp-split-ssid-support

Conversation

@AustinChangLinksys

Copy link
Copy Markdown
Collaborator

Summary

Adds split-SSID support to the PnP "Personalize your WiFi" step. The setup now detects whether the router uses unified or split SSIDs and renders accordingly:

  • Unified mode (all bands share the same SSID/password): single WiFi name/password field — unchanged.
  • Split mode (bands have different SSID/password): a separate card per band (2.4 GHz / 5 GHz / 6 GHz), each with its own name/password field and validation.

Related

Changes

  • New model PnpWiFiSettings / PnpWiFiRadio (lib/page/instant_setup/data/pnp_wifi_settings.dart). primaryRadio prioritizes 2.4 GHz, falls back to first radio.
  • pnp_provider.dart: replaced getDefaultWiFiNameAndPassphrase() with getDefaultWiFiSettings(), reading all radios from getRadioInfo and deriving split vs unified mode.
  • save(): applies per-band ssid/passphrase in split mode; always re-applies the authoritative per-band security from getRadioInfo (since getSimpleWiFiSettings can report security: "None", which would downgrade the network to open and wipe the passphrase). isWiFiChanged diffs each band's edited values against current router values to avoid redundant writes.
  • PersonalWiFiStep: per-band TextEditingControllers created/disposed by mode; all bands validated before enabling Next.
  • Call sites (pnp_setup_view.dart, pnp_admin_view.dart) use getDefaultWiFiSettings().primaryRadio.
  • Stepper (PrivacyGUI-Widgets v1.2.9): Back/Next controls pinned below the scrollable content so they stay visible with the taller multi-band content.

Testing

  • Unified mode: displays correctly, save works. ✅
  • Split mode: displays per-band cards correctly, save works. ✅
  • Known limitation: the 6 GHz SSID may display incorrectly on read-back due to the firmware bug linksys/LinksysWRT#384 (GetRadioInfo3 returns the 5 GHz SSID for 6 GHz). Values written via SetSimpleWiFiSettings are correct.
  • flutter analyze clean (only pre-existing warnings); PnP localization tests pass.

🤖 Generated with Claude Code

When the router ships with per-band SSIDs (split mode), the PnP setup now
shows a separate WiFi name/password card per band instead of a single
field that only reflected the first radio.

- Add PnpWiFiSettings/PnpWiFiRadio model and replace
  getDefaultWiFiNameAndPassphrase() with getDefaultWiFiSettings(), which
  reads all radios from getRadioInfo and derives split vs unified mode.
- PersonalWiFiStep renders per-band cards in split mode and validates all
  bands; unified mode keeps the existing single-field UI.
- save() applies per-band ssid/passphrase in split mode and re-applies the
  authoritative per-band security from getRadioInfo so the network is not
  downgraded to open (which previously wiped the passphrase).
- Pin the horizontal stepper's Back/Next controls below the scrollable
  content (PrivacyGUI-Widgets v1.2.9) so they stay visible with the taller
  multi-band content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@PeterJhongLinksys

Copy link
Copy Markdown
Collaborator

Code Review

Overall the split/unified mode branching is clean and the security re-application from getRadioInfo is the right call to prevent accidental downgrade.

A few notes:

  1. checkAdminPassword receives nullable password — In save() at line 631, defaultWiFiSettings.primaryRadio?.password can be null when radios is empty (early return path). Confirm checkAdminPassword(null) is safe or add a ?? '' fallback like the admin view does.

  2. Split-mode detection includes first radio in comparison — The pnpRadios.any(...) check compares all radios including the first against itself (always false for that element). Semantically .skip(1).any(...) is more precise, though the result is the same.

  3. Backward-compat keys in onNext for split mode'ssid' and 'password' are emitted alongside 'perBandSettings' but save() never reads them in the split path. If no other consumer exists, consider removing to avoid confusion.

  4. Disabled radiosPnpWiFiRadio.isEnabled is stored but the UI renders all bands regardless. Is this intentional (show all bands during PnP) or should disabled radios be filtered out?

Otherwise LGTM 👍

@PeterJhongLinksys PeterJhongLinksys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me

AustinChangLinksys and others added 3 commits June 16, 2026 09:51
…FiSettings

Unifies the PnP save path with the WiFi settings page (wirelessap service).
Build SetRadioSettings from the current getRadioInfo, overriding only ssid and
wpaPersonalSettings.passphrase per band while preserving mode/channel/
channelWidth/broadcastSSID/security straight from the device.

This removes the SetSimpleWiFiSettings security-downgrade workaround entirely:
security is no longer re-derived (getSimpleWiFiSettings could report 'None'),
it is carried over untouched, so no band can be downgraded to open. Verified on
unconfigured hardware that SetRadioSettings is accepted before setDeviceMode
{Master}; transaction ordering is unchanged.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The WiFi-ready screen previously only showed the primary (2.4GHz) credential,
which was misleading on split-SSID routers where each band has a different
SSID/password.

- Split mode: render one compact horizontal card per band (QR + band name +
  SSID + password + print/download), headline shows "Your network is ready"
  (new loc string pnpNetworkReady) instead of a single band's SSID.
- Unified mode: unchanged (large QR + password card, headline shows the SSID).
- Pin the "Done" button at the bottom using the same bounded-height + scroll
  pattern as the stepper, content-aligned and without a divider, so it matches
  the Back/Next footer on the other PnP steps.
- Add split-SSID "WiFi ready" localization test case.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Translate the "Your network is ready" string (used on the PnP WiFi-ready
screen in split-SSID mode) into all 25 supported locales.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AustinChangLinksys

Copy link
Copy Markdown
Collaborator Author

Update — scope expanded beyond the initial split-SSID display

Since the original PR, the following changes were added based on testing and review. Full commit list:

  1. 30cdeef1feat: support split SSID in PnP personalize WiFi step (original)
  2. 0b362ce7refactor: PnP WiFi write uses SetRadioSettings instead of SetSimpleWiFiSettings
  3. b0a632defeat: show per-band WiFi on PnP "ready" screen for split SSID
  4. ef2c5a2ai18n: add pnpNetworkReady translations for all locales

2. SetRadioSettings migration (pnp_provider.dart)

The PnP save now writes WiFi via SetRadioSettings (wirelessap service) instead of SetSimpleWiFiSettings, unifying the write path with the WiFi settings page. It builds the payload from the current getRadioInfo, overriding only ssid + wpaPersonalSettings.passphrase per band and preserving mode/channel/channelWidth/broadcastSSID/security straight from the device.

This removes the previous security re-derivation workaround entirely — security is carried over untouched, so no band can be downgraded to open (the bug where getSimpleWiFiSettings reported security: "None"). Verified on unconfigured hardware that SetRadioSettings is accepted before setDeviceMode {Master}; transaction ordering is unchanged.

3. "Your network is ready" screen (pnp_setup_view.dart)

Previously this screen only showed the primary (2.4GHz) credential, which was misleading on split-SSID routers.

  • Split mode: one compact horizontal card per band (QR + band name + SSID + password + print/download); headline shows "Your network is ready" instead of a single band's SSID.
  • Unified mode: unchanged (large QR + password card, headline shows the SSID).
  • Done button pinned at the bottom using the same bounded-height + scroll pattern as the stepper, content-aligned and without a divider, so it matches the Back/Next footer on the other PnP steps.

4. Localization

New string pnpNetworkReady ("Your network is ready") translated into all 25 supported locales.

Testing

  • Unified + split modes: display and save both verified on device (the only outstanding item is the firmware 6 GHz read-back bug linksys/LinksysWRT#384, mitigated as a side effect of reading back through the wirelessap settings the device actually applied).
  • flutter analyze clean (pre-existing warnings only); PnP localization tests pass (15 cases incl. split-SSID personalize + WiFi-ready).

Dependency

Requires PrivacyGUI-Widgets v1.2.9 (submodule pointer updated) — pins the horizontal stepper's Back/Next controls below the scrollable content.

@AustinChangLinksys
AustinChangLinksys merged commit 8f752e3 into dev-1.2.14 Jun 16, 2026
@AustinChangLinksys
AustinChangLinksys deleted the feat/pnp-split-ssid-support branch June 16, 2026 07:13
@AustinChangLinksys AustinChangLinksys linked an issue Jun 16, 2026 that may be closed by this pull request
This was referenced Jun 16, 2026
PeterJhongLinksys pushed a commit that referenced this pull request Jun 16, 2026
* fix: extract inline scripts to external JS for CSP compliance (#927)

Move inline <script> blocks from index.html to early-bootstrap.js,
enabling removal of 'unsafe-inline' from script-src CSP directive.

Closes #926
Ref: linksys/LinksysWRT#352

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* fix: replace parentheses with dash in language display names for RTL compatibility (#934)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* feat: support split SSID per band in PnP setup (#378) (#938)

* feat: support split SSID in PnP personalize WiFi step (#378)

When the router ships with per-band SSIDs (split mode), the PnP setup now
shows a separate WiFi name/password card per band instead of a single
field that only reflected the first radio.

- Add PnpWiFiSettings/PnpWiFiRadio model and replace
  getDefaultWiFiNameAndPassphrase() with getDefaultWiFiSettings(), which
  reads all radios from getRadioInfo and derives split vs unified mode.
- PersonalWiFiStep renders per-band cards in split mode and validates all
  bands; unified mode keeps the existing single-field UI.
- save() applies per-band ssid/passphrase in split mode and re-applies the
  authoritative per-band security from getRadioInfo so the network is not
  downgraded to open (which previously wiped the passphrase).
- Pin the horizontal stepper's Back/Next controls below the scrollable
  content (PrivacyGUI-Widgets v1.2.9) so they stay visible with the taller
  multi-band content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: PnP WiFi write uses SetRadioSettings instead of SetSimpleWiFiSettings

Unifies the PnP save path with the WiFi settings page (wirelessap service).
Build SetRadioSettings from the current getRadioInfo, overriding only ssid and
wpaPersonalSettings.passphrase per band while preserving mode/channel/
channelWidth/broadcastSSID/security straight from the device.

This removes the SetSimpleWiFiSettings security-downgrade workaround entirely:
security is no longer re-derived (getSimpleWiFiSettings could report 'None'),
it is carried over untouched, so no band can be downgraded to open. Verified on
unconfigured hardware that SetRadioSettings is accepted before setDeviceMode
{Master}; transaction ordering is unchanged.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: show per-band WiFi on PnP "ready" screen for split SSID

The WiFi-ready screen previously only showed the primary (2.4GHz) credential,
which was misleading on split-SSID routers where each band has a different
SSID/password.

- Split mode: render one compact horizontal card per band (QR + band name +
  SSID + password + print/download), headline shows "Your network is ready"
  (new loc string pnpNetworkReady) instead of a single band's SSID.
- Unified mode: unchanged (large QR + password card, headline shows the SSID).
- Pin the "Done" button at the bottom using the same bounded-height + scroll
  pattern as the stepper, content-aligned and without a divider, so it matches
  the Back/Next footer on the other PnP steps.
- Add split-SSID "WiFi ready" localization test case.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* i18n: add pnpNetworkReady translations for all locales

Translate the "Your network is ready" string (used on the PnP WiFi-ready
screen in split-SSID mode) into all 25 supported locales.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* chore: bump version to 1.2.14 (#944)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Du] Support split SSID per band in PnP setup flow

2 participants