MacOS X: GeekTool & SSID/BSSID from Terminal

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
./airport --associate="heipei" --bssid="00:00:00:00:00:00" --password="supersecret"

2 Responses to “MacOS X: GeekTool & SSID/BSSID from Terminal”

  1. This is cool, but not that useful since my desktop is always buried. What I really would like is to show the BSSID in the menu bar, but translate it to a meaningful name like “Kitchen” etc.

    So is there a simple way to put arbitraty text in the menu bar, say from a perl script?

  2. Ha! I just have it a whirl anyway… and it lets you place it anywhere you want. Cool!

Leave a Reply