def hotspot_timeout(): if iwscan.ap_conn_count() == 0 or modemgr.get_mode() != 'single': log.debug('Periodic connection attempt') dev = modemgr.get_state_device('CONNECTED') conn_list = candidate_connections(dev) if conn_list: set_state('CONNECTING', conn_list) else: log.info('No candidates - skipping CONNECTING scan') else: log.info('AP active - skipping CONNECTING scan') wpa.check_wpa(modemgr.get_ap_device().Interface)
def hotspot_timeout(dummy: int) -> None: if iwscan.ap_conn_count() == 0 or modemgr.get_mode() != "single": log.debug("Periodic connection attempt") dev = modemgr.get_state_device("CONNECTED") conn_list: List[str] = candidate_connections(dev) if conn_list: set_state("CONNECTING", conn_list) else: log.info("No candidates - skipping CONNECTING scan") else: log.info("AP active - skipping CONNECTING scan") wpa.check_wpa(modemgr.get_ap_device().Interface)
def hotspot_timeout(): if iwscan.ap_conn_count() == 0 or modemgr.get_mode() != 'single': log.debug('Periodic connection attempt') dev = modemgr.get_state_device('CONNECTED') conn_list = candidate_connections(dev) if conn_list: # bug - try the first connection twice set_state('CONNECTING', [conn_list[0], conn_list[0]] + conn_list) else: set_state('CONNECTING') else: log.info('AP active - skipping CONNECTING scan')