«

»

Jul
26

Control a wireless card from command line

Control a wireless card from the shell: “”

Mac OSX Hints has a quick tip on using the (somewhat hidden) airport command to manually manipulate the airport settings. This tool is called airport.

I played around for a few minutes and was pleasantly surprised.
[I’ve edited the output below so it fits, but you should take a look at what it all does under the hood.

$ cd  /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources
$ ./airport --help
airport AirPort v.421.13 (421.13.0)
Supported arguments:
        -a      --autojoin
        -p      --applyprefs
        -u      --updateprefs
        -z      --disassociate
        -i --ibss=
        -f --file=
        -m --mac=
        -x      --xml
        -h      --help
        -o --oldencrypt=
        -s --scan=
        -r --repeats=
        -A --associate=
        -I      --getinfo
        -P --psk=
        -S      --showstack
                --bssid=
                --channel=
                --password=
                --property=
                --ssid=

Consider adding a softlink to your local bin.

(Via macosxhints.com.)

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>