You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(wifi): add macOS 15+ support for WiFi scanning and connection
- Skip WiFi pre-scan on macOS 15+ where system_profiler redacts SSID names
- Skip current() check before connecting on macOS 15+ to prevent hangs during network transitions
- Use connection state verification instead of SSID string matching on macOS 15+
- Fix current() method to only fallback to system_profiler if ipconfig fails
- Replace bare except with except Exception for better error handling
- Modified NetworksetupWireless.current() to return (None, CONNECTED)
when SSID is redacted but connection is active
- Updated WifiClient.is_connected to check state only, not SSID
- Removed RuntimeError on redacted SSID detection
- Added documentation about macOS 15+ privacy limitation
# TODO this should be parsed more generally but Apple is probably going to remove this functionality also...so
805
-
# I'm not going to bother. Assuming the current ID is only needed to prevent connecting "better" solution is
806
-
# try to communicate with the camera using a raw HTTP endpoint to get the camera name
807
-
ssid=cmd(
808
-
r"system_profiler SPAirPortDataType | sed -n '/Current Network Information:/,/PHY Mode:/ p' | head -2 | tail -1 | sed 's/^[[:space:]]*//' | sed 's/:$//'"
r"system_profiler SPAirPortDataType | sed -n '/Current Network Information:/,/PHY Mode:/ p' | head -2 | tail -1 | sed 's/^[[:space:]]*//' | sed 's/:$//'"
848
+
).strip()
849
+
ifoutputandoutput!="":
850
+
is_connected=True
851
+
ifoutput!="<redacted>":
852
+
ssid=output
853
+
# else: connected but redacted, ssid remains None
854
+
855
+
# Determine state based on connection status
856
+
ifis_connected:
857
+
return (ssid, SsidState.CONNECTED)
858
+
else:
859
+
return (None, SsidState.DISCONNECTED)
812
860
813
861
defavailable_interfaces(self) ->list[str]:
814
862
"""Return a list of available Wifi Interface strings
0 commit comments