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
This commit is contained in:
stswangzhiping
2026-03-16 13:04:00 +08:00
parent 64f4050014
commit c6f55c8c15
3 changed files with 22 additions and 20 deletions

View File

@@ -1,11 +1,5 @@
fix: EROFS dns config, double WS connection, and watchdog timeout
fix: pre-scan WiFi before entering AP mode
1. EROFS: install.sh pre-writes DNS hijack config to dnsmasq-shared.d
since /etc may be read-only at runtime. dns-hijack.js gracefully
falls back to checking if config already exists.
2. Double WS: add _connectionStarted guard to prevent _proceedWithConnection
from being called twice (via event + hasInternet check).
3. Watchdog: move _startSdNotify() to start() beginning so READY=1
is sent immediately, not delayed until network is ready.
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.