- Monitor: every tick in ap state led.off() so play never stays on with hotspot
- hasLanCableCarrier: _ifacePhysicalLinkUp (carrier=1 and operstate not down)
- When end0/eth0 exist but link down, return false (no fallback to hasWiredCarrier)
- LAN poll 500ms
Made-with: Cursor
hasLanCableCarrier no longer locks first scanned iface (NM/WiFi could change
which iface had carrier). Prefer sysfs end0 then eth0 each poll; fallback
hasWiredCarrier only if neither exists.
Made-with: Cursor
First getWiredIfaceWithCarrier() result locks _lanMonitoredIface; subsequent
hasLanCableCarrier only reads that sysfs carrier so unplug reliably turns LAN off.
CLAWD_ETH_IFACE still overrides.
Made-with: Cursor
- Add hasWiredInternetProbe and export; AP mode uses it with hasInternet
- systemd-env: strip NOTIFY_SOCKET from env early; client uses unix_dgram
- Strip NOTIFY_SOCKET from frpc/ttyd spawn env in watchdog and frpc
- WS: pong miss debounce; AP net monitor consecutive-fail debounce
Made-with: Cursor
- Scan sysfs for carrier when CLAWD_ETH_IFACE unset (end0/enp* etc.)
- Explicit CLAWD_ETH_IFACE still pins a single interface
- Ping fallback uses -I wired iface when default route fails (e.g. AP on wlan)
- Exclude can/docker/veth/wl* and similar from auto scan
- Clarify client log when waiting for WAN
Made-with: Cursor
After WiFi is configured and device reboots, NetworkManager needs
a few seconds to auto-connect to saved WiFi. Without waiting,
AP starts immediately and occupies wlan0, preventing NM reconnect.
- Add hasSavedWifiConnection() to check for saved WiFi profiles
- Wait up to 20s for NM auto-connect before falling back to AP
- First boot (no saved WiFi) still starts AP immediately
Made-with: Cursor
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
Open network was not viable as nmcli generates random password by default.
Use a simple fixed password since the AP is only for short-lived provisioning.
Made-with: Cursor