MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / get_available_networks

Method get_available_networks

wifi_manager.py:2940–2949  ·  view source on GitHub ↗

Get list of available networks from last scan

(self, interface=None)

Source from the content-addressed store, hash-verified

2938 capture_output=True, check=False)
2939 self.ap_logger.debug("Killed existing dnsmasq processes")
2940 except:
2941 pass
2942
2943 # Wait a moment for cleanup
2944 time.sleep(1)
2945
2946 self.ap_logger.info("Starting hostapd service...")
2947 # Start hostapd
2948 self.hostapd_process = subprocess.Popen(['sudo', 'hostapd', '/tmp/ragnar/hostapd.conf'],
2949 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
2950
2951 self.ap_logger.debug(f"Hostapd process started with PID: {self.hostapd_process.pid}")
2952 time.sleep(2) # Give hostapd time to start

Callers 1

get_wifi_networksFunction · 0.80

Calls 3

scan_networksMethod · 0.95

Tested by

no test coverage detected