Skip to content

wifi fault to log - #378

Open
paulmullin wants to merge 3 commits into
mainfrom
wifi-fault-log
Open

wifi fault to log#378
paulmullin wants to merge 3 commits into
mainfrom
wifi-fault-log

Conversation

@paulmullin

Copy link
Copy Markdown
Contributor

Description

Log wifi faults on intial connect and retries (catch all CYW43 errors

Related Issues

Motivation and Context

Testing

Screenshots (if applicable)

Types of Changes

  • Bug fix (non-breaking change to resolve an issue)
  • New feature (non-breaking change to add functionality)
  • Breaking change (alters existing functionality)
  • Documentation update required

Checklist

  • My code follows the project’s style guidelines.
  • I have updated documentation as needed.
  • I have read the CONTRIBUTING.md document.
  • I have added or updated tests.
  • All new and existing tests pass.

Additional Notes

Copilot AI lite review requested due to automatic review settings August 25, 2026 23:10
@github-actions

Copy link
Copy Markdown
Contributor

Developer build links:
Sys11

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-378/sys11-update.json

Sys11 (Tiny)

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-378/sys11-tiny-update.json

WPC

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-378/wpc-update.json

EM

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-378/em-update.json

WhiteStar

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-378/whitestar-update.json

DataEast

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-378/data-east-update.json

Classic

https://raw.githubusercontent.com/warped-pinball/vector/pr-update-artifacts/pr-artifacts/pr-378/classic-update.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves WiFi connection diagnostics and resilience in Vector’s MicroPython networking layer by ensuring CYW43/WLAN failures during initial connect are logged persistently, and by fixing an SSID status message formatting bug in the backend’s WiFi connect flow.

Changes:

  • Wrap phew.connect_to_wifi() operations in a try/except to log CYW43/WLAN exceptions instead of allowing an unlogged traceback.
  • Fix SSID console output to use an f-string so the actual SSID is printed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/common/phew/__init__.py Adds exception logging around WiFi connect flow to capture CYW43/WLAN faults during connect/status polling.
src/common/backend.py Fixes SSID connect message to correctly interpolate the SSID value.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

status = wlan.status()

logging.debug(f" - {statuses.get(status, 'unknown status')}") # got '2' as status sometimes
while not wlan.isconnected() and (time.ticks_ms() - start) < (timeout_seconds * 1000):
start = time.ticks_ms()
status = wlan.status()

logging.debug(f" - {statuses.get(status, 'unknown status')}") # got '2' as status sometimes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
logging.debug(f" - {statuses.get(status, 'unknown status')}") # got '2' as status sometimes
logging.debug(f" - {statuses.get(status, f'unknown status {status}')}") # got '2' as status sometimes

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.

3 participants