From f548678d93d0cf003aa44cfc1cdb1b894c95de1f Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 25 Aug 2026 17:56:58 -0400 Subject: [PATCH 1/5] wifi fault to log --- src/common/backend.py | 2 +- src/common/phew/__init__.py | 52 +++++++++++++++++++++---------------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/common/backend.py b/src/common/backend.py index df9ba066..287a2bdf 100644 --- a/src/common/backend.py +++ b/src/common/backend.py @@ -2242,7 +2242,7 @@ def connect_to_wifi(): wifi_credentials = ds_read_record("configuration", 0) ssid = wifi_credentials["ssid"] password = wifi_credentials["password"] - print("Connecting to SSID: {ssid}") + print(f"Connecting to SSID: {ssid}") if not ssid: return False diff --git a/src/common/phew/__init__.py b/src/common/phew/__init__.py index 579e2c5b..6c3b0301 100644 --- a/src/common/phew/__init__.py +++ b/src/common/phew/__init__.py @@ -66,28 +66,36 @@ def connect_to_wifi(ssid, password, timeout_seconds=30): network.STAT_GOT_IP: "got ip address", } - wlan = network.WLAN(network.STA_IF) - wlan.active(True) - wlan.config(pm=0xA11140) # disable power save; dozing radio drops packets - wlan.connect(ssid, password) - start = time.ticks_ms() - 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): - new_status = wlan.status() - if status != new_status: - logging.debug(f" - {statuses.get(new_status, 'unknown status')}") - status = new_status - time.sleep(0.25) - - mac = wlan.config("mac") - mac_address = ":".join("{:02x}".format(b) for b in mac) - print("Server: MAC Address ", mac_address) - - if wlan.status() == network.STAT_GOT_IP: - return wlan.ifconfig()[0] - return None + try: + wlan = network.WLAN(network.STA_IF) + wlan.active(True) + wlan.config(pm=0xA11140) # disable power save; dozing radio drops packets + wlan.connect(ssid, password) + start = time.ticks_ms() + 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): + new_status = wlan.status() + if status != new_status: + logging.debug(f" - {statuses.get(new_status, 'unknown status')}") + status = new_status + time.sleep(0.25) + + mac = wlan.config("mac") + mac_address = ":".join("{:02x}".format(b) for b in mac) + print("Server: MAC Address ", mac_address) + + if wlan.status() == network.STAT_GOT_IP: + return wlan.ifconfig()[0] + return None + except Exception as e: + # A wedged/stalled cyw43 chip can raise here (e.g. OSError from + # wlan.connect()/status()/isconnected() while the driver is stuck) - + # log it to persistent (FRAM) storage rather than letting it propagate + # as an unlogged traceback, since that's otherwise lost on reboot. + logging.error(f"CYW43 fault during wifi connect: {e}") + return None # helper method to put the pico into access point mode From 60236927d29f50c13631e5ada29fadf70f91122d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 02:33:22 +0000 Subject: [PATCH 2/5] ci: auto-bump required patch versions --- src/common/SharedState.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/SharedState.py b/src/common/SharedState.py index 10601e82..f6d224a4 100644 --- a/src/common/SharedState.py +++ b/src/common/SharedState.py @@ -1,4 +1,4 @@ -VectorVersion = "1.12.0" +VectorVersion = "1.12.1" # counts game start cycles From f8c7b705986de4cb6ef24015e50e57b266ab964b Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 26 Aug 2026 17:34:39 -0400 Subject: [PATCH 3/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/common/phew/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/phew/__init__.py b/src/common/phew/__init__.py index 6c3b0301..c1a4febc 100644 --- a/src/common/phew/__init__.py +++ b/src/common/phew/__init__.py @@ -75,7 +75,7 @@ def connect_to_wifi(ssid, password, timeout_seconds=30): 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): + while not wlan.isconnected() and time.ticks_diff(time.ticks_ms(), start) < (timeout_seconds * 1000): new_status = wlan.status() if status != new_status: logging.debug(f" - {statuses.get(new_status, 'unknown status')}") From e2aef809c15a004bacb522a0d53bd1397d8922dc Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 26 Aug 2026 18:17:33 -0400 Subject: [PATCH 4/5] Update src/common/phew/__init__.py Co-authored-by: Maxwell Mullin --- src/common/phew/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/phew/__init__.py b/src/common/phew/__init__.py index c1a4febc..7d4a518a 100644 --- a/src/common/phew/__init__.py +++ b/src/common/phew/__init__.py @@ -74,7 +74,7 @@ def connect_to_wifi(ssid, password, timeout_seconds=30): start = time.ticks_ms() status = wlan.status() - 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 while not wlan.isconnected() and time.ticks_diff(time.ticks_ms(), start) < (timeout_seconds * 1000): new_status = wlan.status() if status != new_status: From 4f3c5431051085697fe51e5a1460cca28ed4efb9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 29 Aug 2026 18:49:38 +0000 Subject: [PATCH 5/5] ci: auto-bump required patch versions --- src/common/SharedState.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/SharedState.py b/src/common/SharedState.py index f6d224a4..faa987cc 100644 --- a/src/common/SharedState.py +++ b/src/common/SharedState.py @@ -1,4 +1,4 @@ -VectorVersion = "1.12.1" +VectorVersion = "1.12.2" # counts game start cycles