From 3ee6413d0015a508b74b98ce55bab783f484be6b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 12:52:11 -0400 Subject: [PATCH] Update pushbutton.py turn wifi on --- pushbutton.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pushbutton.py b/pushbutton.py index 4e3160bb..0d4774cb 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -169,6 +169,8 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot # result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) # print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") + result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) + print(result, flush=True) result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) print(result, flush=True) #.stdout) # if (result.returncode != 0): @@ -181,6 +183,8 @@ else: print(result, flush=True) #.stdout) # result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) # print(result, flush=True) # .stdout) + result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) + print(result, flush=True) result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) print(result, flush=True) # .stdout) # if (result.returncode != 0):