My university's wifi connection goes up at random times. It's faster, so I would want to be notified when it becomes available so that I can surf faster and I don't have to pay for mobile data that I consume while using my phone as a hotspot.

3 Answers 3


You could use Shell script in a Applescript Application that checks the available wifi list. And pops up a notification when the one you want is in the list.

The code is commented to explain how it works.

on idle -- A on idle handler will run the code within it and then set the app to idle. Using little cpu. It will then repeat this every #n of seconds ( determined by its return number)
    set theWifi to "weehronetwork" -- the wifi SSID
    set theList to paragraphs of (do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s| awk '{print $1}'") -- get the wifi list
    if theList contains theWifi then

        display notification with title "The WIFI" subtitle (theWifi & "  IS BACK UP") sound name "Sosumi" -- display a notification.

    end if

    return 60 -- run again in #n seconds

end idle

Save the Applescript as an Application and check Stay open.

enter image description here

When you first run the App. and it displays a Notification, it will then be shown in the System preferences --> Notifications. From here you can determine the Notification type.

enter image description here

enter image description here

Note. I have used a sound in this code. But if you uncheck 'Play Sound for notifications' the sound will not play.

  • This is really something.
    – Ruskes
    Commented Sep 21, 2014 at 8:08
  • Thanks for this. What a great solution. Sorry for not having said Thanks earlier. :)
    – Anton Unt
    Commented Apr 12, 2019 at 12:03

If the actual wifi extender is powered up at the times the connection is live & powered down otherwise, the phone ought to switch to it automatically, as soon as it's seen, same as if you just came into range after having been away.

If the wifi is on but not connected to the outside world, the only way to know if it's working is to connect to it & test whether you can 'see out'.

I'm not sure there's anything that could periodically probe to see if there's a viable connection, it's just assumed that if it's on, it's working.

If you mean the device currently connected to the phone's hotspot, rather than the phone itself, then someone smarter than me might have an answer regarding setting up the metric of each connection, but that's outside my knowledge-base

  • Yeah, I want to know how do do it in Mavericks on my Macbook Pro.
    – Anton Unt
    Commented Sep 20, 2014 at 20:48

You can set the preferred order of wi-fi networks, but I am not completely sure if this will automatically switch you over since you're likely to have a great signal from your hotspot. Nonetheless, it's worth trying before going to a 3rd-party solution.

System Preferences > Network Select your Wi-Fi adapter on the left Click "Advanced…" In the listbox on the Wi-Fi tab, you can drag and drop to reorder the networks listed. Make sure that your campus wi-fi is above your hotspot wifi network.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .