keithrbennett / wifiwand

A command line tool to manage wifi, including an interactive shell (currently Mac only)
Apache License 2.0
64 stars 6 forks source link

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

Open arnlen opened 4 months ago

arnlen commented 4 months ago

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 💪

keithrbennett commented 4 months ago

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:

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.

VladislavGatsenko commented 1 month ago

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