Skip to content

fix(wifi): add reconnect watchdog for brcmfmac roam/SAE wedge - #9

Merged
fabiiw05 merged 1 commit into
mainfrom
fix/wifi-reconnect-watchdog
Jul 25, 2026
Merged

fix(wifi): add reconnect watchdog for brcmfmac roam/SAE wedge#9
fabiiw05 merged 1 commit into
mainfrom
fix/wifi-reconnect-watchdog

Conversation

@fabiiw05

Copy link
Copy Markdown
Owner

Problem

Power save (fixed in #8) was not the only WiFi drop. On a WPA2/WPA3-transition, band-steering AP (one SSID, several BSSIDs across 2.4/5 GHz), NetworkManager's background scan (bgscan simple:30:-65:300) roams to another BSSID and brcmfmac fails SAE external auth on the transition BSSID:

kernel: brcmf_cfg80211_external_auth: External authentication failed: status=1

The link then dies — or stays connected while passing no traffic — until a manual nmcli reconnect. Verified on hardware; power_save was already off, so this is a distinct bug from #8.

Fix

WiFi recovery watchdog (scripts/customize.sh):

  • /usr/local/sbin/uconsole-wifi-watchdog driven by uconsole-wifi-watchdog.timer (every 30 s).
  • If wlan0 is disconnected, or connected but the default gateway is unreachable across two probes, it forces a NetworkManager reconnect.
  • Only acts when an autoconnect wifi profile exists (never fights a deliberate disconnect).
  • Uses only NetworkManager + iproute2 + iputils (all already in the ALARM base) — no extra package.
  • Inspect with journalctl -t uconsole-wifi-watchdog.

Docs (MAINTAINING.md / MAINTAINING.ja.md): restructure the WiFi section into Cause 1 — power save / Cause 2 — failed roam, and document the per-device 5 GHz band-pin mitigation (nmcli con modify <SSID> 802-11-wireless.band a). The band pin is network-specific, so it stays a device tweak, not an image default.

Verification

  • Diagnosed on hardware: power_save: off confirmed (fix(wifi): disable brcmfmac power save to prevent occasional drops #8 working), -57 dBm / 5 GHz / 433 Mbit healthy link, single external_auth failed: status=1 correlating with a manual reconnect.
  • Watchdog bash -n clean; live dry-run is a clean no-op (exit 0) while connected + gateway reachable; deployed live and running every 30 s (Result=success, no-op = no log, as designed).
  • Band-pin applied on the affected device (5 GHz locked, cross-band steering eliminated).

🤖 Generated with Claude Code

Power save (fixed in #8) was not the only WiFi drop. On a WPA2/WPA3-
transition, band-steering AP (one SSID, several BSSIDs across 2.4/5 GHz),
NetworkManager's background scan roams to another BSSID and brcmfmac fails
SAE external auth on the transition BSSID (kernel: brcmf_cfg80211_external_
auth: External authentication failed: status=1). The link then dies -- or
stays "connected" while passing no traffic -- until a manual nmcli
reconnect. Verified on hardware; power_save was already off.

Install a WiFi recovery watchdog (customize.sh):
/usr/local/sbin/uconsole-wifi-watchdog driven by uconsole-wifi-watchdog.timer
(every 30s). If wlan0 is disconnected, or connected but the default gateway
is unreachable across two probes, it forces a NetworkManager reconnect. It
only acts when an autoconnect wifi profile exists (never fights a deliberate
disconnect) and uses only NetworkManager + iproute2 + iputils (all in base).

Document both drop causes and the per-device 5 GHz band-pin mitigation in
MAINTAINING (EN/JA). The band pin is network-specific, so it stays a device
tweak, not an image default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@fabiiw05
fabiiw05 merged commit 19133e9 into main Jul 25, 2026
2 checks passed
@fabiiw05
fabiiw05 deleted the fix/wifi-reconnect-watchdog branch July 25, 2026 11:48
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.

1 participant