5

I am looking for a solution to have the AirPort WiFi or other icon in the menu bar show when an active Internet connection is established.

I live in a funky WiFi connection area and connect true a router and extender. The router requires a password to connect. I use a WiFi extender to boost the signal from router.

The WiFi icon shows full connection in menu bar but that is only to the Extender. The detail view for WiFi shows the following (left: active, right: not active):

with internetwithout internet

The WiFi shows happy connection but it does not show missing internet connection.

Sometimes I lose the active Internet connection without knowing it and it is not been displayed in WiFi icon, but the Skype shows that, easy to see with a glance.

skype no internet

As a fix for that I use Skype that displays only when actually connected to Internet.

skype showing Internet

Can I modify the AirPort WiFi in menu bar to blink or something when it has lost the actual Internet connection?

I do not want to have Skype running to quickly see if I still have Internet.

And I do not want to have to use Terminal or System Preferences to just to see if I am still connected. Eventually in my browser I will get the notification that the site is not available, or check your internet, or something like it.

4

I made an AppleScript program that checks the internet using ping, and if it finds that your internet is down, it will alert you. You can get it here: https://www.dropbox.com/s/j4i9keisp8r79sm/Internet%20Test.app.zip

If you want to make it yourself, then here is the code:

repeat
    try
        do shell script "ping -c 5 google.com"
    on error
        display dialog "You are not connected to the internet"
    end try
    delay 15
end repeat

Set the application as a start up item. If your internet breaks, it will alert you. You can get a notification center alert instead of a dialog by changing the line after on error to read

display notification "Internet is down"

Added bonus: if you have a Router that will automatically disconnect you after certain time of inactivity, this will prevent that, since you are always showing as active.

  • going (running) to check it, it makes sense to use the ping – Ruskes Mar 10 '14 at 20:41
  • now that is a EXCELLENT answer, just tried it and it works like a charm, in addition it solves the little problem for the router trowing me out if I do not use Internet for a while. you deserve the +25 points. – Ruskes Mar 10 '14 at 20:47
  • 1
    Dropbox itself does a good job of reporting that the connection is down, but it has a nasty habit of chewing through between 5 and 10% CPU any time it thinks the internet is unreachable, so until that gets fixed, people that care about efficiency (or battery life) should be aware of that downside. – bmike Mar 10 '14 at 20:51
  • @bmike fully agree on dropdox, same problem in having skype running just to know if Internet is up, I just love the little script by AnonymousAppDev :) – Ruskes Mar 10 '14 at 20:56
  • 1
    @bmike, I have a solution. Replace "display dialog" with "display notification" (minus the quotations). Done. – PoisonNinja Mar 10 '14 at 21:04
6

With regard to modifying the system AirPort icon, I do not believe that what you are asking for is possible.

To show internet connectivity, I use a combination of WiFi Signal (which could be substituted for the OS X AirPort menu bar item) and Cloud:

  • AirPort off

  • AirPort on & not connected

  • AirPort connected & no internet

  • AirPort connected & internet

This works very well and takes up no more space on my menu bar as I use Cloud anyway.

Dropbox is also a good alternative as it also shows network connectivity, although it is slightly slower to respond especially on slower connections where the network test takes longer.

  • Nice answer, with lots of work done :), not sure this is much different then me using Skype as indicator, sorry to learn Apple does not consider this information important for a quick look display. – Ruskes Mar 9 '14 at 17:44
  • The problem with Dropbox as a connectivity canary is that it eats 5-10% CPU always checking if things are back up in my experience. Hopefully Apple's power usage shaming gets that resolved. – bmike Mar 10 '14 at 20:53
  • @bmike Yes, I gave Dropbox as an alternative since if a user is already running Dropbox, then it'd make no additional impact – grg Mar 10 '14 at 20:56
  • Could you add links for Cloud and WiFi Signal? Hard to Google :) – myhd Mar 11 '14 at 20:37
  • @myhd Links added – grg Mar 11 '14 at 20:38
5

Found a very simple App, Icon Ping enter image description here

The world icon will change color accordingly to the state of the connection:

Green if we receive pong packets back from 8.8.8.8. Connection OK. Yellow if we receive pong packets, but with a delay that is greater than 300 milliseconds. Connection Slow. Red if we don't receive pong packets for three seconds or more. Connetion not working.

You must log in to answer this question.

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