From b13c896388e207fd68fe80d8b9fe121483dea6dc Mon Sep 17 00:00:00 2001 From: Yumi-Lab Date: Sat, 5 Sep 2026 23:59:23 +0200 Subject: [PATCH] network: make NetworkManager retry a saved WiFi network forever A pad whose access point is not visible for about two minutes at boot never reconnects: NetworkManager tries the saved profile four times (its default autoconnect-retries), gives up, and the printer stays offline until someone opens the network panel and triggers a scan. Seen on the bench with a phone hotspot that was asleep when the pad booted. Create every WiFi profile with autoconnect-retries = 0 (retry forever). The same value cannot be set globally in NetworkManager.conf on NM 1.52, which rejects it as an unknown connection default. --- ks_includes/sdbus_nm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ks_includes/sdbus_nm.py b/ks_includes/sdbus_nm.py index 9d36b1c8e..0598a2729 100644 --- a/ks_includes/sdbus_nm.py +++ b/ks_includes/sdbus_nm.py @@ -237,6 +237,11 @@ def add_network(self, ssid, psk, eap_method, identity="", phase2=None): "uuid": ("s", str(uuid4())), "type": ("s", "802-11-wireless"), "interface-name": ("s", self.wlan_device.interface), + # A printer must come back online by itself: with NetworkManager's + # default (4 retries) a pad whose access point is away for two + # minutes at boot gives up and stays offline until someone opens + # this panel again. 0 = retry forever. + "autoconnect-retries": ("i", 0), }, "802-11-wireless": { "mode": ("s", "infrastructure"),