Having trouble automatically reconnecting your unattended Mac to a wireless network because of unreliable signal quality? If you would like to have it keep reattempting reconnection until it manages to connect it's fairly simple to setup.
You need to use the
airport command line tool in the Terminal. Open a terminal and run the following command (with no line breaks), typing in your password when prompted:
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport prefs joinmode=automatic joinmodefallback=keeplooking
Unlike the
JoinModeFallback setting of 'prompt' (which can be set in System Preferences) or 'donothing,' if it fails to join a network it will wait about a minute and then scan for a network to join again. It will do this until it succeeds. Very useful for an unattended Mac acting as a server, especially if you're not in the same location as it.
Note that this may have a negative affect on your battery life if running on a laptop.
[
crarko adds: I haven't tested this one. I didn't have any unreliable wireless connection handy so I don't need the repeated attempts to join.
Here are the other options for the listed preference settings:
JoinMode (String)
- Automatic
- Preferred
- Ranked
- Recent
- Strongest
JoinModeFallback (String)
- Prompt
- JoinOpen
- KeepLooking
- DoNothing
I believe JoinMode = Ranked and JoinModeFallback = Prompt are the defaults, if you want to switch back. If you type in the above command with just
prefs and no other parameters it will tell you what the curent settings are. You might want to record those before making any changes.]