Commit Graph

9 Commits

Author SHA1 Message Date
stswangzhiping
012ad90335 fix(provision): treat WiFi join success by STA state, not internet ping 2026-03-29 07:10:43 +08:00
stswangzhiping
878f3592bf feat: connect 消息上报 local_ip 和 external_ip
Made-with: Cursor
2026-03-21 08:18:27 +08:00
stswangzhiping
cf2973946f fix(captive): 密码默认隐藏,眼睛图标初始为半透明
Made-with: Cursor
2026-03-18 21:54:40 +08:00
stswangzhiping
7d3477454c feat(captive): 密码框增加眼睛图标切换可见性
Made-with: Cursor
2026-03-18 21:35:28 +08:00
stswangzhiping
9e7dcada05 feat(captive): 将WiFi 网络改为请选择下列WiFi 网络
Made-with: Cursor
2026-03-18 21:26:58 +08:00
stswangzhiping
17d0711f67 ui: redesign WiFi list with signal bars and cleaner layout
- Replace <select> with scrollable list of clickable items
- Show signal strength as 4-bar icon instead of percentage text
- Remove security info from parentheses, show lock icon only
- Smaller font size for compact mobile display

Made-with: Cursor
2026-03-16 13:11:23 +08:00
stswangzhiping
c6f55c8c15 fix: pre-scan WiFi before entering AP mode
wlan0 cannot scan while in AP mode (hardware limitation).
Now scan nearby networks before starting hotspot and cache
the results for the captive portal page.

Made-with: Cursor
2026-03-16 13:04:00 +08:00
stswangzhiping
b42e59fab8 feat: AP always-on mode - hotspot stays until WiFi STA connects
Redesign provisioning from one-shot blocking to persistent background manager:
- AP hotspot starts at boot regardless of eth0 status
- Captive portal runs alongside AP for WiFi configuration
- AP automatically shuts down only when WiFi STA connects
- WiFi drops at runtime -> AP auto-restarts
- WiFi connect fails -> AP auto-restarts for retry
- client.js no longer blocks on network; connects WS when ready

Made-with: Cursor
2026-03-16 12:18:35 +08:00
stswangzhiping
eb9f4ab1c3 feat: add WiFi provisioning for headless devices (AP + Captive Portal)
- Add lib/network.js: WiFi scan, connect, AP hotspot via nmcli
- Add lib/dns-hijack.js: dnsmasq management for DNS hijack + DHCP
- Add lib/captive-server.js: embedded HTTP captive portal with WiFi setup page
- Add lib/provisioning.js: orchestrator (detect network -> AP mode -> wait -> exit)
- Update client.js: call ensureNetwork() before WS connection
- Update install.sh: auto-install dnsmasq dependency

Made-with: Cursor
2026-03-16 08:58:51 +08:00