Enable Bluetooth
()
| 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(): |