Skip to content

Commit 45748ea

Browse files
author
Alex J Lennon
committed
Set highest priority (20) for Improv WiFi connections
Changed autoconnect-priority from 5 to 20 to ensure Improv-configured WiFi connections are selected by wifi-connect.service. This ensures that when users configure WiFi via Bluetooth Improv, that connection will be preferred over default connections like GrosnyIoT (priority 10). Priority hierarchy: - Improv connections: 20 (highest) - GrosnyIoT default: 10 - Other defaults: varies
1 parent 50e17ef commit 45748ea

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

recipes-devtools/python/python3-improv/imx93-jaguar-eink/onboarding-server-eink.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ def wifi_connect(ssid: str, passwd: str) -> Optional[list[str]]:
135135

136136
try:
137137
# Create WiFi connection with improved settings for boot-time reliability:
138-
# - autoconnect-priority 5 (lower than default GrosnyIoT priority 10, but still prioritized)
138+
# - autoconnect-priority 20 (highest priority - ensures wifi-connect.service selects this connection)
139+
# Higher than GrosnyIoT (10) so Improv-configured networks are preferred
139140
# - auth-retries 3 (retry authentication 3 times)
140141
# - dhcp-timeout 60 (60 seconds for DHCP, longer than default 45)
141142
nmcli.connection.add('wifi', {
142143
'ssid': ssid.decode('utf-8'),
143144
'wifi-sec.key-mgmt': 'wpa-psk',
144145
'wifi-sec.psk': passwd.decode('utf-8'),
145146
'connection.autoconnect': 'yes',
146-
'connection.autoconnect-priority': '5',
147+
'connection.autoconnect-priority': '20',
147148
'connection.auth-retries': '3',
148149
'ipv4.dhcp-timeout': '60'
149150
}, f"{INTERFACE}", f"{CON_NAME}", True)

0 commit comments

Comments
 (0)