From feec50409e8d1cd5168323ddf5fa4f6928c10a97 Mon Sep 17 00:00:00 2001 From: dekunukem Date: Fri, 25 Mar 2022 18:26:05 +0000 Subject: [PATCH] fixed wifi info update --- user_program/usb4vc_main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/user_program/usb4vc_main.py b/user_program/usb4vc_main.py index 0246b7b..d224bbb 100644 --- a/user_program/usb4vc_main.py +++ b/user_program/usb4vc_main.py @@ -91,10 +91,11 @@ network={{ }} """ to_write = config_str - if len(wifi_dict['wifi_password']) > 0: + if len(wifi_dict['wifi_password']) == 0: to_write = config_str_unsecured with open(config_file_path, 'w') as wifi_config_file: wifi_config_file.write(to_write) + os.system("wpa_cli -i wlan0 reconfigure") check_rpi_model() @@ -119,4 +120,4 @@ while 1: subprocess.call('echo 1 > /sys/module/bluetooth/parameters/disable_ertm') print("DONE") except Exception: - continue \ No newline at end of file + continue