05.29.08

Connecting to hidden wifi networks easily on OS-X (Tiger)

Posted in Wifi, OS-X at 5:12 pm by tal

A friend of mine keeps her router's SSID hidden, which is a good practice. Sure, it is not really more secure against a hacker who has half a brain, but it does a pretty good job at preventing random people from poking at your router or trying to guess your password (which is not so hard thanks to tools such as these).

Sadly Apple's inadequate solution for a GUI for the airport makes it really hard to connect to a hidden network. This becomes very annoying if the signal is weak and you keep getting disconnected. Instead of trying to reconnect you have to manually(!) connect, which involves entering the network name all over again (it's not on the list, since it is hidden) AND the password (of course, why would it remember the password?!). *sigh*.

Solution: So, apparently apple has a neat utility that allows you to control (and get info about) your WiFi network hidden in /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport (see: osxdaily).

Using this utility I was able to write a one-liner script that would connect me to her network, which makes the whole process a lot simpler.

Notice: The '-h' option reports incorrectly that the modifier required to specify the BSSID is "--bssid=<arg>" while it is actually "--ssid=<arg>"