topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 23, 2024, 2:08 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: alarm when net connection *restored*  (Read 5968 times)

ur1sn00per

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 19
    • View Profile
    • Donate to Member
IDEA: alarm when net connection *restored*
« on: October 04, 2009, 11:27 AM »
there's loads of software to detect loss of connection
but what about when your connection is down?
Answer: Something basic - a sound alarm when connection is restored like a ping to a url e.g. your service provider
(ok, a modem/router/pc may need booting - but sometimes not).

Kamel

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 138
    • View Profile
    • Donate to Member
Re: IDEA: alarm when net connection *restored*
« Reply #1 on: October 04, 2009, 11:33 AM »
I also need this.... and amazingly enough, I think I *might* be able to code it. Let me see what I can come up with (if anyone more versed in the ways of coding is interested in this as well, by all means don't let my interest stop you).
I'm the guy you yell at when your DSL goes down...

Kamel

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 138
    • View Profile
    • Donate to Member
Re: IDEA: alarm when net connection *restored*
« Reply #2 on: October 04, 2009, 01:42 PM »
Alright, looks like I've got something worked up. It's nothing amazing just yet, but I will expand and refine as necessary.

It is my ultimate goal to make a utility which can detect a connection, play an alarm to indicate connected to the internet, maintain a connection, and when a connection is lost for a specified amount of time, play a connection lost alarm.

Please test this and let me know if it works. Please do provide as much feedback as possible.

Connection Alarm by Kamel (written in python, transferred to exe via py2exe)

Usage: connected_alarm.exe [host] [port]
Default host is www.google.com, default port is 80.
A host can be an IP address or a DNS.
*Note: usage of this program may require Microsoft Visual C++ 2008 redistributable be installed on the user's computer.

v0.1 Beta:
*Attempts to make a connection to a specified host and port (default www.google.com port 80), if a connection is successful, a 2600hz tone is played for 500ms.
*If no connection is made, it will keep retrying until a connection is made or the program is terminated.

Future:
*Ability to specify a sound file to play and/or specify which tone frequency/length is desired.
*Ability to check multiple hosts for connectivity
*Ability to run constantly, and be alerted when internet connectivity isn't present and is.
*Ability to run a system command upon connection and/or disconnection (for instance, a batch file)
I'm the guy you yell at when your DSL goes down...
« Last Edit: October 04, 2009, 02:02 PM by Kamel »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,901
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: alarm when net connection *restored*
« Reply #3 on: October 04, 2009, 02:35 PM »
works here, though the user interface is a bit minimalistic.  a blank dos box comes up and is empty.. when i connect to the internet i hear a high pitched sound and the window dissapears.

ur1sn00per

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 19
    • View Profile
    • Donate to Member
Re: IDEA: alarm when net connection *restored*
« Reply #4 on: October 04, 2009, 02:37 PM »
worked for me (XP)
disconnected net cable, ran it, connected again, got the alarm and terminated.
well done!

Kamel

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 138
    • View Profile
    • Donate to Member
Re: IDEA: alarm when net connection *restored*
« Reply #5 on: October 04, 2009, 08:14 PM »
Thanks, glad it suited your needs.
I'm the guy you yell at when your DSL goes down...