Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Change location automatically based on network' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change location automatically based on network
Authored by: cudaboy_71 on Jan 18, '05 03:47:07PM

i've wondered about automatically changing location based upon available SSID for quite a while. but, i dont think this addresses it, unless i am missing something. (most likely i am. i dont speak SED so well. but, it looks like it is just getting the SSID airport is currently using, no?)

to me this seems like putting the cart before the horse.

lemme 'splain:

my 'locations' define which SSID to join. so, when i go to work, my location profile tells the computer to join one of the 3 available SSIDs broadcasting in my area.

similarly, when i go home, my home profile joins one of two broadcasting SSIDs (dont ask).

now, somebody 'splain to me:

if the script changes the location profile based upon which SSID is connected, but the location profile is needed to define which SSID to connect all just seems kinda circular to me. what am i missing?

now, if the script got a location based upon *avialable* SSIDs in the area, that could work. but, predefining the SSID in the script seems like it would require me to select the SSID from the airport menu.

if it aint broke, break it!

[ Reply to This | # ]
Change location automatically based on network
Authored by: chris_on_hints on Jan 18, '05 05:18:15PM

As I understand it, your mac will join whatever WiFi network it can, from the list of networks that:
a) you have given it permission to join automatically
b) that it knows the password for (ie keychain)
c) obviously must be available
It will just join the one which is available, without changing the location.... AFAIK, the networks arent necessarily part of a 'location'.

Now, if you need different IP settings or email settings for each different WiFi network, your mac will join the network for you, but you would have to tell it to change settings manually. I experience this between my home (manual IP setting) and my parent's house (DHCP IP address). When I got home last time, my mac joined my home network, but was trying to get an IP via DHCP... (ie still set to the parent's house location) my internet connection was only working when i remembered to change the location (to tell my machine to revert to its manual IP).

Does that make sense? At least, this is my experience of how it works....

This script looks good, as it the mac would automatically join which ever network is available, then change the location setting to whatever you told it was appropriate. You could also get the script to do additional things (like mounting specific network drives etc) by just adding them to the script at the correct place... the only risk is that which ever commands you add would be executed as root, so BE CAREFUL. Commands that might run ok in your terminal window might have slightly different behaviour (or security issues) when run as root...

[ Reply to This | # ]
Change location automatically based on network
Authored by: tomofdarkness on Jan 18, '05 06:12:40PM

I have a university wireless network that I have access to, which requires a special setup with a Network Password to logon. When I have it set to connect automatically, OS X doesn't even see that the network is there. I'd love to have a script that would try automatic, and if it didn't find anything, try that location, and if it didn't find that, try automatic again, or something... Actually, I'm having trouble describing exactly what I want, which is why I haven't actually done anything about it.

[ Reply to This | # ]