OpenGoPro: MacOS WIFI Driver broken on >= Sonoma 14.x because `airport` command is retired

Apple has officially retired the airport command-line utility on macOS Sonoma 14.4

Component Python SDK

Description SSID Scan does not work anymore on recent Mac OS X version.

To Reproduce Try connecting to a GoPro using Mac OS Sonoma 14.4

Expected behavior Python SDK should migrate to wdutil as per Apple recomandation.

Screenshots

~ % airport
WARNING: The airport command line tool is deprecated and will be removed in a future release.
For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.

About this issue

  • Original URL
  • State: open
  • Created 3 months ago
  • Comments: 18 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@keithrbennett

My team has had that installed for years šŸ˜¬

xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates

I do not own a Macintosh, and MacOS Ventura is the latest I can virtualize atm. After borrowing a system with 14.4.1 for a moment I could get a correct SSID as follow:

[...]
>>> import CoreLocation
>>> location_manager = CoreLocation.CLLocationManager.alloc().init()
>>> location_manager.startUpdatingLocation()
>>> networks, error = iface.scanForNetworksWithName_error_( None, None )
>>> print(networks)

Dependencies:

  • pyobjc-framework-CoreWLAN
  • pyobjc-framework-CoreLocation

I tested on MacOS 14.4.1 with Python 3.11 installed via brew and pyobjc 10.2. The following references seems to indicate that behavior may differ between systems and Python Versions.

Running macOS Sonoma 14.3.1 (23D60) and using the code below, Iā€™m getting null for all SSIDs:

python3 -m venv /tmp/scantest
/tmp/scantest/bin/pip3 install pyobjc
...
/tmp/scantest/bin/python3
Python 3.10.13 (main, Sep 13 2023, 13:03:08) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
>>> import CoreLocation
>>> from CoreWLAN import CWInterface, CWWiFiClient
>>> wifi_client: CWWiFiClient = CWWiFiClient.sharedWiFiClient()
>>> interface = wifi_client.interface()
>>> location_manager = CoreLocation.CLLocationManager.alloc().init()
>>> location_manager.startUpdatingLocation()
>>> networks, error = interface.scanForNetworksWithName_error_( None, None )
>>> print(networks)
{(
    <CWNetwork: 0x600003afc4a0> [ssid=(null), bssid=(null), security=WPA2 Personal, rssi=-27, channel=<CWChannel: 0x600003ad4040> [channelNumber=1(2GHz), channelWidth={20MHz}], ibss=0],
    <CWNetwork: 0x600003afc500> [ssid=(null), bssid=(null), security=WPA2 Personal, rssi=-84, channel=<CWChannel: 0x600003ad8800> [channelNumber=136(5GHz), channelWidth={80MHz}], ibss=0],
    <CWNetwork: 0x600003afc580> [ssid=(null), bssid=(null), security=WPA2 Personal, rssi=-77, channel=<CWChannel: 0x600003ad87d0> [channelNumber=11(2GHz), channelWidth={20MHz}], ibss=0],
    <CWNetwork: 0x600003afc4f0> [ssid=(null), bssid=(null), security=WPA2 Personal, rssi=-38, channel=<CWChannel: 0x600003ad8830> [channelNumber=149(5GHz), channelWidth={80MHz}], ibss=0],
    <CWNetwork: 0x600003afc670> [ssid=(null), bssid=(null), security=WPA/WPA2 Personal, rssi=-74, channel=<CWChannel: 0x600003ad8860> [channelNumber=10(2GHz), channelWidth={20MHz}], ibss=0]
)}