It finally happened. Apple has officially retired the airport command-line utility on macOS Sonoma 14.4. Although it was considered deprecated, the airport command was still very helpful for quickly getting the status of the Wi-Fi interface and showing basic information about nearby Wi-Fi networks.

The tool accumulated a lot of legacy information but received a few updates from Apple during the past years to support the newest Wi-Fi amendments and security improvements, such as WPA3. However, it was clear that little to no maintenance was being done on it, especially after the arrival of Macs with support for the 6 GHz band.

If you run the airport command (/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport) with or without arguments on macOS Sonoma 14.4, you will now get the following warning instead of the expected output:

Copy to Clipboard

Apple suggests using the wdutil command as an alternative, which “provides (the) functionality of the Wireless Diagnostics application in command line form.” Using wdutil, you can generate a diagnostics report, display information about the Wi-Fi, Bluetooth, and AWDL interfaces, and turn on or off logging for DHCP, DNS, EAPOL, Wi-Fi, and others.

Copy to Clipboard

It is important to note that the wdutil command is not a one-to-one replacement for the airport utility. Still, it offers similar functionality, with one important caveat: it requires sudo (administrator permissions) to use any of its options. On the other hand, the airport command only needed sudo on options that could disclose the user’s physical location, such as the BSSID and country code.

How does this change impact Wi-Fi troubleshooting and monitoring on a Mac?

Apple provides the CoreWLAN framework, which apps like WiFi Explorer and WiFi Signal use to retrieve and display Wi-Fi-related information. This framework provides APIs for managing the Wi-Fi interface, such as querying the status of the Wi-Fi connection, joining specific networks, or scanning for wireless networks. 

Unfortunately, the CoreWLAN framework lacks APIs that let us retrieve some essential metrics about the current Wi-Fi connection, like the MCS index, number of spatial streams, and guard interval. In particular, the MCS index is a valuable indicator for determining the connection quality between the client station and the access point. The higher the index (and the number of spatial streams), the higher the rate the client can transmit or receive Wi-Fi frames.

And here’s where the airport command saved the day. It enabled access to those metrics, especially for sandboxed Mac App Store apps. And it did so without needing sudo, which is not possible with wdutil.

Copy to Clipboard

By removing the airport command, requiring sudo for every option in wdutil, and not providing new APIs in CoreWLAN, Apple cripples again WiFi Explorer, WiFi Signal, and any other app or script leveraging airport’s output. In particular, they can no longer query and display the current Wi-Fi connection’s MCS index and number of spatial streams. 

As a remedy, it’d be great if Apple could extend CoreWLAN so that the information we can get programmatically using its APIs matches what we see in wdutil. It is not only the correct way but also eliminates the need for apps to scrape wdutil’s output (we submitted feedback to Apple about this in January 2021, FB8982056, but we have yet to hear back). Or, modify wdutil to require sudo only under certain circumstances, such as displaying sensitive information like the BSSID, SSID, or country code or using an option that modifies the system’s configuration.

What can you expect moving forward?

We will investigate other alternatives for retrieving the MCS index and the number of spatial streams. One possibility is to manually modify wdutil’s permissions so that any app can run the command with administrator privileges without requiring users to enter their password. However, updating macOS will restore the original permissions, and you’ll have to make the change again. Allowing anyone to run the command with elevated privileges is also unsafe. Another option is to create a helper service that can run commands as an administrator on behalf of the app, but this solution will not work with sandboxed apps.

In the meantime, if you need to check the MCS index, number of spatial streams, or other metrics in the latest version of macOS Sonoma, you must run sudo wdutil info or Opt+Click the Wi-Fi icon in the system menu bar.