Search code examples
macoswifiwirelessssid

How to get details about wifi connections available on my mac system through command line


Currently i am working on MAC-10.9. i wanted to know the details of all wifi networks available on my system.Like "SSIDName": "network_ng", "DefaultAuthenticationAlgorithm": "RSNA_PSK", "DefaultCipherAlgorithm": "CCMP", "SecurityEnabled": "True", "ConnectionStatus": "Disconnected", "BssType": "Infrastructure", "NetworkConnectable": "True", "NumberOfSSIDs": "1", "ProfileName": "", "SignalQuality": "100"

just see this link http://somesite.zzl.org/PowerBASIC/WiFi.html

similarly i want wi-fi info of my mac system


Solution

  • It won't give you exactly what you're looking for (some of those look like OS-specific parameters), but you can get a lot of the relevant info from the airport command. It's not in the default PATH, so you need to give the full path to the executable:

    $ /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
                            SSID BSSID             RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
                     myqwest0437 00:24:7b:2e:1c:01 -89  11      N  -- WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP)
                         Bart2.4 04:a1:51:fc:45:97 -85  9       Y  -- WPA2(PSK/AES/AES) 
                        Amped_SR f8:7b:8c:14:70:08 -79  2       Y  -- WPA(PSK/AES/AES) WPA2(PSK/AES/AES) 
                     NETGEAR2010 00:26:f2:c2:85:08 -85  11      Y  -- WEP
    

    You can also get more detailed info about the network you're joined to with the -I option.