Skip to content

Add band-aware saved WiFi profile management - #1443

Draft
p-keminer wants to merge 5 commits into
justcallmekoko:developfrom
p-keminer:feat/wifi-profile-management
Draft

Add band-aware saved WiFi profile management#1443
p-keminer wants to merge 5 commits into
justcallmekoko:developfrom
p-keminer:feat/wifi-profile-management

Conversation

@p-keminer

Copy link
Copy Markdown

Stack

Summary

  • persist multiple saved WiFi profiles and select them from the GUI
  • distinguish same-name networks by 2.4/5-GHz band and replace credentials within the matching band
  • support join, forget, reset, migration metadata, and targeted BSSID/channel joins

Testing

  • Focused ESP32-C5 tests covered two profiles sharing an SSID across 2.4/5 GHz, targeted joins to both bands, reboot persistence, same-band password replacement without duplication, per-profile forget/reset, and protected internal SD metadata.

Limitations

  • Legacy-profile migration was not separately marked complete; without SD the legacy single-profile fallback remains. Stored passwords are not encrypted by this PR.

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1744 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.36%. Comparing base (66f3c81) to head (5db9071).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
esp32_marauder/WiFiProfileStore.cpp 0.00% 1008 Missing ⚠️
esp32_marauder/MenuFunctions.cpp 0.00% 363 Missing ⚠️
esp32_marauder/WiFiScan.cpp 0.00% 223 Missing ⚠️
esp32_marauder/settings.cpp 0.00% 107 Missing ⚠️
esp32_marauder/CommandLine.cpp 0.00% 43 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #1443      +/-   ##
==========================================
- Coverage     0.40%   0.36%   -0.04%     
==========================================
  Files           20      21       +1     
  Lines        17176   18773    +1597     
  Branches        11      11              
==========================================
  Hits            69      69              
- Misses       17103   18700    +1597     
  Partials         4       4              
Flag Coverage Δ
firmware-unit-tests 0.36% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@p-keminer
p-keminer force-pushed the feat/wifi-profile-management branch from 43ae4ba to 1ac96ed Compare August 9, 2026 20:45
@p-keminer
p-keminer marked this pull request as ready for review August 9, 2026 20:46
Copilot AI lite review requested due to automatic review settings August 9, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown

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 multi-profile, band-aware WiFi credential management (supporting the same SSID on different bands) and updates the UI/CLI connection flows and serial logging to better protect secrets while joining/forgetting/resetting saved networks.

Changes:

  • Introduces WiFiProfileStore to persist multiple WiFi profiles (SSID + band/channel) and manage lifecycle operations (remember/forget/reset/migration).
  • Extends WiFiScan::joinWiFi() to support targeted joins via channel/BSSID and preferred band selection, and persists credentials via both legacy settings and the profile store.
  • Updates GUI menus and CLI join command to select/join saved profiles (including hidden SSID handling) and redact sensitive values in serial output.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
esp32_marauder/WiFiScan.h Extends joinWiFi API to accept channel/BSSID/preferred band parameters.
esp32_marauder/WiFiScan.cpp Implements band-aware/targeted join behavior, credential persistence to the new store, and additional UI acknowledgement flows.
esp32_marauder/WiFiProfileStore.h Adds the public interface and data structures for multi-profile WiFi storage.
esp32_marauder/WiFiProfileStore.cpp Implements profile persistence, recovery/upgrade logic, and legacy migration handling.
esp32_marauder/settings.h Adds saveWiFiCredentials() API for updating legacy stored SSID/password together.
esp32_marauder/settings.cpp Adds settings generation recovery logic and redacts sensitive settings when printing diagnostics.
esp32_marauder/MenuFunctions.h Adds menus/helpers for saved profile selection, forget/reset confirmation, and hidden SSID prompting.
esp32_marauder/MenuFunctions.cpp Implements saved WiFi profile UI flows and redacts passwords in join diagnostics.
esp32_marauder/esp32_marauder.ino Initializes the WiFi profile store during boot after SD setup.
esp32_marauder/CommandLine.h Updates join command help text to include -e for hidden SSIDs.
esp32_marauder/CommandLine.cpp Redacts join passwords in logged commands and supports hidden SSID joins via -e.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread esp32_marauder/MenuFunctions.cpp
@p-keminer
p-keminer marked this pull request as draft August 9, 2026 21:57
@p-keminer

Copy link
Copy Markdown
Author

All 22 firmware matrix builds and the Native Unity tests pass on this head. The remaining red statuses are limited to the repository-wide Codecov policy addressed separately in #1448.

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.

2 participants