I am using the Airport utility /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport. With the little program I am able to scan my network for WIFI senders. I do however, want to scan only for specific channels (let's say 6 and 11) to speed up the process. This is possible and seems to be common practise on Linux.

The command (linking to the program mentioned above) I use at the moment which takes 5-10 seconds:

sudo airport -s

Sadly, there is no documentation (I found) about this wonderful little helper. The only help is the help page when using flag -h.

Supported arguments:
 -c[<arg>] --channel=[<arg>]    Set arbitrary channel on the card
 -z        --disassociate       Disassociate from any network
 -I        --getinfo            Print current wireless status, e.g. signal info, BSSID, port type etc.
 -s[<arg>] --scan=[<arg>]       Perform a wireless broadcast scan.
                   Will perform a directed scan if the optional <arg> is provided
 -x        --xml                Print info as XML
 -P        --psk                Create PSK from specified pass phrase and SSID.
                   The following additional arguments must be specified with this command:
                                  --password=<arg>  Specify a WPA password
                                  --ssid=<arg>      Specify SSID when creating a PSK
 -h        --help               Show this help 

It seems like the -s parameters takes arg but I can not find any information anywhere in which format I can pass arguments on and which arguments are supported in the first place. Has anyone worked with the tool before? Is there any documentation about this that I missed?

Thanks a lot for any help or pointers.


I don't think the tool does what you wish. It treats scan as "check all channels" and may not even obey restrictions if you set them by hook or crook on which channels are allowed on the interface. It allows you to pre-filter by SSID name as opposed to channel:

airport --scan=whatever

For sniffing, you can use the Wireless Diagnostics application, but it's not command line based/enabled as far as I can tell.

enter image description here

Once you start the program, look in the Window menu for the options available on your OS (the tool is improving over time IMO with more features and capabilities).

You are right and the authors of the airport manual page agree that "airport more information needed here"

  • Also, the airport command allegedly allows sniffing, but I haven't bothered to figure out where it logs the traffic or if it even works. I end up using grep to limit the channels from the command line and/or use a better GUI tool like NetSpot or WiFi Explorer instead of using airport to figure out what's happening over WiFi. – bmike Nov 29 '15 at 19:06
  • Wasn't really interested in sniffing per se, but rather scanning for broadcasted SSIDs from routers. If the utility only allows to pre-filter by SSID as you say, then I simply can't use the tool for my purposes. Thanks a lot for your help! – Sebastian Hojas Nov 30 '15 at 7:28
  • 1
    @SebastianHojas Yes - you'll need to let it run and then post process the results. I'll ping you if I find a tool that's more focused. – bmike Nov 30 '15 at 15:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .