feat(firmware): 多 WiFi 配置与失败回退配网热点#141
Merged
Merged
Conversation
最多保存 5 个 WiFi 凭据,开机按顺序逐个尝试连接,失败则自动切换下一个; 全部连不上时快速重试 1 轮后进入发射热点(AP 配网),用户可在 192.168.4.1 配网页查看/删除/新增已保存网络。 - storage: 多 WiFi 列表 API (get/add/delete),NVS wifi_n + wifi_s0..4/p0..4, 自动迁移老版本单 SSID,不 bump CONFIG_VERSION 以保留老用户配置 - network: connectWiFi() 按序遍历所有保存网络,首个成功即用 - portal: 新增 /wifi_list、/add_wifi、/delete_wifi 路由;配网页增加 「已保存网络」管理面板与「仅保存到列表」入口(中英双语) - main: handleWiFiFailure() 就地快速重试后回退热点(替代原深睡), 显示与语音两个构建均覆盖 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- button-controls(中/英):新增「多 Wi-Fi 与自动回退配网」一节 - CLAUDE.md:更新 firmware 文件说明,补充多 WiFi 顺序连接 + 自动回退热点 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
概述 / Summary
给固件增加多 WiFi 支持与自动回退配网,提升换网/出差/临时断网场景下的可用性。
Adds multi-WiFi support with automatic captive-portal fallback to the firmware.
功能 / Features
InkSight-xxxxx热点,无需按键。实现 / Implementation
storage.cpp/.h:多 WiFi 列表 API(get/add/delete),NVSwifi_n+wifi_s0..4/wifi_p0..4;loadConfig自动把旧版单 SSID 迁移进列表,不 bumpCONFIG_VERSION,老用户升级不丢凭据。network.cpp:connectWiFi()按序遍历所有保存网络,首个成功即用,并将其设为运行时主网络(兼容配对/显示/心跳)。portal.cpp+data/portal_html.h:新增/wifi_list、/add_wifi、/delete_wifi路由与「已保存网络」管理 UI。main.cpp:新增handleWiFiFailure(),连不上后就地快速重试(WIFI_PORTAL_RETRY_SWEEPS,默认 1 轮、间隔 3s,不再走原深睡的多分钟重试),仍失败即进配网热点;显示与语音两个构建均覆盖。config.h:新增MAX_WIFI_NETWORKS=5、WIFI_PORTAL_RETRY_SWEEPS、WIFI_PORTAL_RETRY_DELAY_MS。测试 / Testing
pio run在epd_42_wsv2_ssd1683_c3_promini(默认)与epd_42_gdem042f52_jd79668_c3_promini两个 env 编译通过。文档 / Docs
更新
docs/button-controls.md、docs/en/button-controls.md与CLAUDE.md,说明多 WiFi 与自动回退行为。🤖 Generated with Claude Code