def disable_ap(nm: nmoperations.NM): while nm.is_in_AP_mode(): logging.info("Disabling AP mode") nm.disable_AP_mode() time.sleep(1) close_port_80_wlan0() logging.info("AP mode disabled")
def enable_ap(nm: nmoperations.NM): while not nm.is_in_AP_mode(): logging.info("Attempting to go into AP mode") nm.create_AP() time.sleep(1) open_port_80_wlan0() wait_then_run(60 * 10, fsm_monitor_ap, [nm])