Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • September 04, 2015, 04:05:43 PM
  • Proudly celebrating 10 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: restart router after few minutes of inactivity  (Read 4869 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
restart router after few minutes of inactivity
« on: April 01, 2012, 03:41:58 PM »
hello!

because of the low quality of the telephone line cable in my area and the large distance from the nearest dslam, my router gets filled with errors (not sure what this is, I was told so) and it needs restart to refresh and the dsl line become operational again

is there a software to restart/reset my router after few minutes of inactivity?

thanks!

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,539
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #1 on: April 01, 2012, 03:59:12 PM »
2 simple solutions:
- Get a better ISP
- Get a better router

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #2 on: April 01, 2012, 04:04:45 PM »
Unfortunately i have already done these without success

I need a program that will do this, i know programs that can detect network activity, exist

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #3 on: April 01, 2012, 04:47:00 PM »
The hard part will be resetting your router in a programmatical way.  What kind of router is it?  Also, how do you detect when to reset it?  Are you test pinging a site or something like that?

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,969
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #4 on: April 01, 2012, 05:05:43 PM »
You can usually reset routers via their config screen. Can you not automate opening the right page and click restart?

Alternatively start arguing with your telephone company that the service they are providing is not acceptable. If your DSL connection is that bad then your telephony is probably crappy too.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,976
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #5 on: April 01, 2012, 07:29:49 PM »
What's your router make/model ?

Do you have access to your routers configuration settings, (user/password) ?

This will be more easily accomplished by sending commands via telnet I would think but before that we can try turning some things off in the router, (like error logging).

Also, do you do a lot of BitTorrenting, (that can also screw up a router by having too many NAT sessions open - router dependant) ?

rgdot

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 1,801
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #6 on: April 01, 2012, 07:42:26 PM »
I have live(d) through many broadband issues and definitely sympathize.
Isn't this likely more the domain of a modem rather than router? Having said that, like mentioned, make/model is first thing to know.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,976
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #7 on: April 01, 2012, 08:27:16 PM »
Isn't this likely more the domain of a modem rather than router?

Unfortunately, router is rather generically used for combined modem/router these days, as is modem when they mean the combined modem/router, (parents).  :-\

Innuendo

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,184
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #8 on: April 01, 2012, 09:16:35 PM »
Unfortunately, router is rather generically used for combined modem/router these days, as is modem when they mean the combined modem/router, (parents).  :-\
Quote

Especially since the OP is talking about DSL. It's very rare to see separate routers & modems handed out by DSL ISPs. It's almost always a unit with both built in.

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #9 on: April 02, 2012, 10:59:54 AM »
my router is Pirelli (not sure which model)

it does have a way to reboot, by visiting http://router.ip/cgi-bin/restart.exe, I think

I never do bittorrent

so, I guess I can visit the above address every x minutes of inactivity? any hint how to do that?

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,969
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #10 on: April 02, 2012, 11:34:12 AM »
You may have the router set up to disconnect on inactivity - you need to check out the idle time in the DSL connection settings and set it to never disconnect (usually if it is done by time just put 0)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #11 on: April 02, 2012, 11:42:20 AM »
You may have the router set up to disconnect on inactivity - you need to check out the idle time in the DSL connection settings and set it to never disconnect (usually if it is done by time just put 0)

this cannot be done, because I want it always on (I may connect via my cell phone)

I just want it to reboot after x minutes of inactivity, so that the line will refresh and errors will be refreshed

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,969
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #12 on: April 02, 2012, 12:48:01 PM »
my router is Pirelli (not sure which model)

it does have a way to reboot, by visiting http://router.ip/cgi-bin/restart.exe, I think

I never do bittorrent

so, I guess I can visit the above address every x minutes of inactivity? any hint how to do that?

There is usually a setting in the router that sets the time limit an admin can be logged in to the router settings before you are automatically logged out again. Set that to a very large number then open the reset.exe page regularly.

You can probably automate this with Firefox as there is a plugin the does refresh page after so many minutes so just load the restart page and left the REfresh After addon in firefox reset your router after every so many minutes.

It probably won't be very convenient because restarting you router will add regular delays in internet access as each restart can take a couple of minutes.

I would suggest your best bet would be to argue with your telephone provider and/or ISP to get the problem resolved or find a better way to connect to broadband that works properly.

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #13 on: April 02, 2012, 01:10:40 PM »
...
is there a software to restart/reset my router after few minutes of inactivity?
...
When you say "inactivity", your goal is to have the reset happen when you are not working and would therefore not be inconvenienced by a reset?

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #14 on: April 02, 2012, 01:21:16 PM »
...
is there a software to restart/reset my router after few minutes of inactivity?
...
When you say "inactivity", your goal is to have the reset happen when you are not working and would therefore not be inconvenienced by a reset?

yup
reset after 30 minutes of inactivity will rarely cause problems, because being inactive for that long, will probably mean that I am afk
when I return to keyboard, it will be much more probable to be in the time between two resets, so the internet connection will be operational and already refreshed

firefox trick would work, autohotkey would probably do it better (without me having firefox always on), the problem is how to detect inactivity

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,969
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #15 on: April 02, 2012, 01:35:18 PM »
the problem is how to detect inactivity

You could always make a screensaver to do it ;)

Seriously I think in Windows 7 you can schedule a task to run after so much inactivity.

Another (and simple) altenative would be to set your router to connect on demand and give it an idle timeout to disconnect. Almost all routers I have seen have this option (though I don't know your model specifically).

Connect on demand is pretty quick (much faster and less hassle than a router reset).

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #16 on: April 02, 2012, 01:44:39 PM »
screensaver will not detect network inactivity, it will detect GUI inactivity
that connect on demand is interesting, but I found nothing about it in my router's webpage :S

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #17 on: April 02, 2012, 01:49:21 PM »
For the moment, let's just assume that Kalos cannot improve the quality of his DSL connection.  Here's an AHK script that will check every minute for physical inactivity (not network inactivity).  If the physical inactivity exceeds 30 minutes, the aforementioned URL is run.  You can change the myIdleTime variable to what minutes value you would like:

Code: Autohotkey
  1.  
  2. myIdleTime := "30" ; Value in minutes.
  3.  
  4. SetTimer, CheckIdle, 60000 ; Check every minute.
  5.  
  6. Return ; End of auto-execute section.
  7.  
  8.  
  9. CheckIdle:
  10. {
  11.     If ( A_TimeIdlePhysical > ( myIdleTime * 1000 * 60 ) )
  12.     {
  13.         Run, http://router.ip/cgi-bin/restart.exe
  14.     }
  15. }
  16. Return
  17.  

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #18 on: April 02, 2012, 01:52:36 PM »
that would be a handy workaround thanks!

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #19 on: April 02, 2012, 08:36:58 PM »
You could always make a screensaver to do it
that's what I was thinking.  Plus I'd have a shortcut to manually activate the screensaver/reset script whenever I was getting up from the computer for more than a few minutes, so even if I came back in 5 minutes, the reset would be finished.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,976
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #20 on: April 02, 2012, 10:44:48 PM »
Task Schedule for Windows 7, (may have to tweak since I don't have a Pirelli), attached below.

You'll need wget.exe which is in the archive, I've put it in C:\ for this purpose but just move it wherever and change the Task accordingly.

1) Open the Task Scheduler and import the Reset Pirelli.xml file
2) Task is listed, double-click to edit

2012-04-03_13-34-46.jpgrestart router after few minutes of inactivity

Change the parameters as you like.

A bit more info on what constitutes an Idle state wrt the Task Scheduler:
Quote
Idle Conditions
You can set a condition that tells the task to run only if the computer is in an idle state for a specific amount of time when a trigger is activated. When you set this condition, you also set the amount of time to wait (after the task is triggered) for the computer to enter an idle state.

The Task Scheduler service will check if the computer is in an idle state every 15 minutes. A computer is considered to be in an idle state when a screen saver is running. If a screen saver is not running, then the computer is considered to be in an idle state if there is 0% CPU usage and 0% disk input or output for 90% of the past fifteen minutes and if there is no keyboard or mouse input during this period of time. Once the Task Scheduler service detects that the computer is in an idle state, the service only waits for user input to mark the end of the idle state.
« Last Edit: April 03, 2012, 12:08:44 AM by 4wd »

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,563
    • View Profile
    • App's Apps
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #21 on: April 03, 2012, 04:25:02 PM »
My IdleStart application can launch an app after a user specified length of idle time. I just tested it and it works with URL's too.

Just use the URL of the restart page instead of the path to an application in the command line parameters.

It will relaunch that page again and again, whenever that length of idle time is reached, until you either close the application or pause it from the tray icon. So just set it and forget it, and it won't bother you while you are using the PC.

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
Re: restart router after few minutes of inactivity
« Reply #22 on: April 04, 2012, 04:27:57 PM »
excellent
thanks