At
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
There is a very neat airport command line program. Starting it with –help will show you the possible options.
I like specially the -I option to show me the actual strenght of the signal etc in numbers. Not some bars. It also
seems to accurate more precisly what is going on. I wrote a quick perl wrapper to give me the outputs I care about
as a one line:
#!/usr/bin/perl
#airport usually is in /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources
use strict;
my $sleep = $ARGV[0] || 3;
my %trans = (
"commQuality" , "cQ",
"rawQuality" , "rQ",
"avgSignalLevel" , "sL" ,
"avgNoiseLevel" , "nL" ,
"lastTxRate" , "lR" ,
"maxRate" , "mR" ,
"Security" , "sec:"
);
while (1){
#print "x\n";
foreach my $o (`airport -I`){
#print "y $o\n";
$o =~ /\s*([^\:]+): (.*)/;
my $k = $1;
my $v = $2;
if ($trans{$k}){
print "$trans{$k} $v ";
}
#print "$k -> $v\n";
}
print "\n";
sleep ($sleep);
}
The other helpful option is the -s one: It scans all base stations it can find and displays them. Much better than the gui menu.
Moving this program in the bin folder would be a nice move by apple. Giving it a man page would even be better. But the way it is is certainly much better than nothing.