[wifi] wifi_list is empty bugs

This commit is contained in:
IrvingGao 2024-06-13 17:19:54 +08:00
parent 815dda7720
commit d4cf53189d
1 changed files with 3 additions and 2 deletions

View File

@ -126,6 +126,7 @@ def start_hotspot():
subprocess.Popen('sudo systemctl start hotspot.service', shell=True) subprocess.Popen('sudo systemctl start hotspot.service', shell=True)
if led_enabled: if led_enabled:
orangepi.set_led_on('red') orangepi.set_led_on('red')
logging.info("Start hotspot.service.")
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
logging.info(f"Error starting create_ap service: {e}") logging.info(f"Error starting create_ap service: {e}")
@ -133,11 +134,11 @@ def close_hotspot():
# 关闭热点 # 关闭热点
try: try:
subprocess.Popen('sudo systemctl stop hotspot.service', shell=True) subprocess.Popen('sudo systemctl stop hotspot.service', shell=True)
logging.info(f"Stopping create_ap service") logging.info(f"Stopping hotspot.service")
if led_enabled: if led_enabled:
orangepi.set_led_off('red') orangepi.set_led_off('red')
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
logging.info(f"Error stopping hotspot: {e}") logging.info(f"Error stopping hotspot.service: {e}")
def init_networkmanager_file(): def init_networkmanager_file():