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

Function enable_bluetooth

webapp_modern.py:12554–12565  ·  view source on GitHub ↗

Enable Bluetooth

()

Source from the content-addressed store, hash-verified

12552 silently scanned the wrong subnet on any non-192.168.1.x network.
12553 """
12554 try:
12555 iface = _get_wifi_iface()
12556 except Exception:
12557 iface = None
12558 candidates = [iface] if iface else []
12559 try:
12560 result = subprocess.run(
12561 ['ip', '-o', '-4', 'addr', 'show'],
12562 capture_output=True, text=True, timeout=5)
12563 if result.returncode != 0:
12564 return None
12565 except Exception:
12566 return None
12567 import ipaddress as _ipaddress
12568 for line in result.stdout.strip().splitlines():

Callers

nothing calls this directly

Calls 2

power_onMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected