Working on my laptop a little bit more since I bought myself a new one I began the never-ending quest of doing things in MacOS via command-line that you’d have to do by GUI otherwise. But let me start by introducing GeekTool, a funny little PrefPane to display the output of commands on your desktop. Mine looks like this right now:

GeekToolMost of the information there is redundant or meaningless. But two things I do care about: The SSID and BSSID (MAC-address) of the access-point I’m currently connected with. To get that info via the GUI you can Alt-Click the Airport-logo in the menubar, but you can also query it via commandline:

SSID: /usr/sbin/system_profiler SPAirPortDataType|grep "Current Wireless Network"BSSID: /System/Library/PrivateFrameworks/Apple80211. framework/Versions/A/Resources/airport -I|grep BSSID

In case you’re wondering: I have a wireless network at home with two APs, and sometimes I want to know which one I’m connected to, to see which one is causing trouble and to generally watch how the two signals propagate through the building.

Update

Hey, even better than just bitching about being on the “wrong” AP is manually changing to a different BSSID:

./airport -z<br /> ./airport --associate="heipei" --bssid="00:00:00:00:00:00" --password="supersecret"