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

Method is_wifi_connected

pager/PagerRagnar.py:200–211  ·  view source on GitHub ↗

Check Wi-Fi connectivity (Pager + Pi compatible).

(self)

Source from the content-addressed store, hash-verified

198 self.shared_data.ragnarstatustext2 = ""
199
200 def is_wifi_connected(self):
201 """Check Wi-Fi connectivity (Pager + Pi compatible)."""
202 try:
203 for iface in ['wlan0cli', 'br-lan', 'wlan0', 'eth0']:
204 result = subprocess.run(['ip', 'link', 'show', iface],
205 capture_output=True, text=True, timeout=5)
206 if 'state UP' in result.stdout:
207 return True
208 return False
209 except Exception as e:
210 logger.debug(f"WiFi check error: {e}")
211 return False
212
213
214def handle_exit(sig, frame, display_thread, ragnar_thread, web_thread=None):

Callers 2

start_orchestratorMethod · 0.95

Calls 2

debugMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected