Skip to content

Add Wi-Fi connection watchdog#24

Open
noahp wants to merge 1 commit into
mainfrom
noahp/wifi-watchdog
Open

Add Wi-Fi connection watchdog#24
noahp wants to merge 1 commit into
mainfrom
noahp/wifi-watchdog

Conversation

@noahp
Copy link
Copy Markdown
Collaborator

@noahp noahp commented Mar 5, 2026

Periodically check if the Wi-Fi connection is down, but should be up:

  • run a scan
  • if an SSID is in scan results and is in stored Wi-Fi credentials, and Wi-Fi is not connected, start a watchdog timeout
  • if the timeout elapses, reboot with a custom reboot reason (in the "expected" classification, so this does not impact stability score)

Also add a new custom metric wifi_scan_result_count_max, just for curiousity.

@noahp noahp requested a review from a team as a code owner March 5, 2026 15:55
Copy link
Copy Markdown
Member

@gminn gminn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wifi watchdog is a neat concept, I like it

Comment thread src/wifi_watchdog.c
return false;
}
sCredScanMatchCtx ctx = {.found = false};
wifi_credentials_for_each_ssid(prv_check_cred_ssid_cb, &ctx);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very neat function!

@noahp noahp changed the base branch from noahp/wifi-auto-connect to gminn/add-mcuboot April 13, 2026 18:08
@noahp noahp changed the base branch from gminn/add-mcuboot to main April 13, 2026 18:08
@noahp noahp force-pushed the noahp/wifi-watchdog branch from 8a2acad to 8f9293b Compare April 13, 2026 18:15
Periodically check if the Wi-Fi connection is down, but should be up:

- run a scan
- if an SSID is in scan results and is in stored Wi-Fi credentials,
  and Wi-Fi is not connected, start a watchdog timeout
- if the timeout elapses, reboot with a custom reboot reason (in the
  "expected" classification, so this does not impact stability score)

Also add a new custom metric `wifi_scan_result_count_max`, just for
curiousity.
@noahp noahp force-pushed the noahp/wifi-watchdog branch from 8f9293b to ebbc612 Compare April 13, 2026 18:41
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.

2 participants