wifiwand icon indicating copy to clipboard operation
wifiwand copied to clipboard

Scanning of wifi networks (`wifi-wand a`) no longer works following the airport command deprecation.

Open arnlen opened this issue 10 months ago • 2 comments

Apple has officially retired the airport command-line utility on macOS Sonoma 14.4 (see this post)

Since the scan feature was relaying on airport (source code), it's now broken. 😢

Current behavior

$ wifi-wand a
Available networks are:

[]

Expected behavior

As per Apple recommandation, we should now use the wdutil command line tool. Unfortunately, since scanning isn't available (yet?) with wdutil, fixing this issue won't be as easy as switching to the new tool...

Related issues

Many people are currently fighting to find a workaround 💪

  • https://github.com/gopro/OpenGoPro/issues/506
  • https://github.com/ronaldoussoren/pyobjc/issues/600
  • https://forums.developer.apple.com/forums/thread/748518

arnlen avatar Apr 12 '24 15:04 arnlen

Using Swift scripts and the Mac OS CoreWLAN subsystem, I have just restored (in version 2.16.1) the following functions of wifiwand disabled due to the airport deprecation:

  • a[vail_nets] - array of names of the available networks
  • d[isconnect] - disconnects from current network, does not turn off wifi

An added benefit is that the disconnect task no longer requires sudo access.

However, the CoreWLAN functionality on which the Swift scripts rely is only available if XCode is installed.

Please let me know if you have any issues.

keithrbennett avatar Apr 20 '24 13:04 keithrbennett

I was looking for a solution to a different problem, but maybe this will help with a another solution. Just execute in the console:

system_profiler SPAirPortDataType

VladislavGatsenko avatar Jul 25 '24 18:07 VladislavGatsenko