Test Wireless Signal Strength from the Command Line
If you’re trying to tweak a wireless router to get the best signal, being able to continuously measure the signal strength while you toy with the antennas, placement, and whatever else is really valuable. Here’s a way you can do this through the command line using the airport wireless tool we’ve discussed in the past:
To see a running tally of signal strength use the following command:
while x=1; do /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep CtlRSSI; sleep 0.5; done
You’ll see something like ‘agrCtlRSSI: -38′ with the last number changing frequently, but printed repeatedly on your terminal screen. You can stop this command from refreshing by hitting Control+C.
To report just a single line with signal strength, use the following:
clear; while x=1; do /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep CtlRSSI | sed -e 's/^.*://g' | xargs -I SIGNAL printf "\rRSSI dBm: SIGNAL"; sleep 0.5; done
Again just hit Control+C to stop the command. I found both of above code samples on MacOSXHints and they’ve been a big help when trying to position my hardware for maximum reception quality.