I am on a train right now that provides free wi-fi. But you know how these networks work - one second you're chatting with your friend, next second you lose connection. Getting mad enough about not knowing if I have internet or not, I wrote a super simple Plasma applet to monitor the network connection. This is a bit different from the network manager icon, which shows you that you are connected to the wi-fi, but that does not mean the wi-fi router has access to the internet. So this monitors the internet availability directly by sending ping packets to kde.org google.com, one every 5 seconds. If the ping gets back, it shows green icon (user-online icon), if not, it turns into gray (user-offline) icon. Simple as that.
The code is at kde:scratch/mklapetek/pingz, feel free to improve it if you feel like, it's good enough for me for now :)
Update: One thing I didn't realized when running in plasmoidviewer is, that QProcess::execute(..) waits for the ping process to finish. This has the effect of completely hanging plasma every 5 seconds when added to panel or desktop. Fix will follow shortly (if I'll have internet).
Update2: Fixed.
Interesting,
I basically had the same idea a while back when implementing a lag-monitoring application - a screenshot of this is here: http://imagebin.org/index.php?mode=image&id=237944.
I also had in mind to port this to a plasma app, so you could easily stick that onto the desktop. Might do if others find it interesting
Having a two-state view is fine, but imo it is quite interesting to see the actual round trip time of your latest packets as well. (That's what lag-monitor does, plotting ping responsed based on time/rtt).
Code is here, if you are interested: https://github.com/krf/lag-monitor
Greets
Posted by: KRF | Sunday, 02 December 2012 at 22:50
Whoops, link was messed up - here's the corrected one: http://imagebin.org/index.php?mode=image&id=237944
Posted by: KRF | Sunday, 02 December 2012 at 22:51
Ahh, love the idea. Unfortunately the university I'm at also blocks pings, so it's not too useful for me at the moment... trains do seem like a pretty good use case though. (Took my first train ride with wi-fi earlier this year, and the experience was just as you describe.)
Posted by: Jonathan Frederickson | Monday, 17 December 2012 at 06:10
@KRF - thanks! Will check it out in some spare time :)
Posted by: Marty | Wednesday, 19 December 2012 at 14:13
thx, using it to observe an unstable vpn-connection.
Greetings watho
Posted by: Thomsen Wagner | Thursday, 07 February 2013 at 13:01
Ahh, love the idea. Unfortunately the university I'm at also blocks pings, so it's not too useful for me at the moment... trains do seem like a pretty good use case though.
Posted by: hiTop louis vuitton handbags | Sunday, 07 April 2013 at 07:26
Pingz - Super simple network connection internet availability monitor plasmoid thing
Posted by: replica rolex | Sunday, 07 April 2013 at 07:27
Good morning, I wonder what I have to do to use the video through my webcam, as I have created multiple accounts, including with gtalk, messenger and facebook and I can not use it
Posted by: lanseo | Monday, 08 April 2013 at 04:30
@lanseo - what are you talking about?
Posted by: Marty | Monday, 08 April 2013 at 12:39