India Broadband Forum


Automatic rebooting of router at 2 AM and 8 AM

This is a discussion on Automatic rebooting of router at 2 AM and 8 AM within the Broadband How to forums, part of the Indian Broadband Forums category; @Mr Tooth_Fairy http ...with screen shots . ....Amend suitably for BSNL and timings. .....Add to book marks....

Go Back   India Broadband Forum > Indian Broadband Forums > Broadband How to

India Broadband Forum


Broadband How to All sorts of technical know how related to internet connections, modems, routers and switches besides other equipment you use for internet connectivity

                      

Reply

 

LinkBack Thread Tools Display Modes
Old 11-09-08, 09:01 AM   #41
Platinum Member
 
Join Date: Aug 2007
Location: Chennai
Posts: 4,232
Rep Power: 12
essbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of light
Default

@Mr Tooth_Fairy
http
...with screen shots .
....Amend suitably for BSNL and timings.
.....Add to book marks.
essbebe is offline   Reply With Quote
Old 11-13-08, 04:40 PM   #42
Junior Member
 
Join Date: Oct 2008
Posts: 1
Rep Power: 0
mumbayite is on a distinguished road
Default Scheduled tasks not running

HI
the script and the .exe file i made using AutoHotKey run fine when i double click it.
Problem is that they dont run in the scheduled tasks.
What could be wrong?

i am the only user of my pc and hence dont have any pass to log on... also its obvious my profile is that of the admins.. so i dnt understand wht could b wrong....

helpsssssssssssss
mumbayite is offline   Reply With Quote
Old 11-27-08, 09:21 AM   #43
Junior Member
 
Join Date: May 2008
Age: 31
Posts: 3
Rep Power: 0
jaivenkit is on a distinguished road
Default

Some has the script for linux? I use opensuse 10.3
jaivenkit is offline   Reply With Quote
Old 12-18-08, 03:42 PM   #44
Junior Member
 
Join Date: Dec 2008
Age: 25
Posts: 4
Rep Power: 0
mgtm7m is on a distinguished road
Smile Scheduling Automatic Disconnect/Reconnect/Reboot of BSNL modem

Hello Everyone,

I know this is a much searched and discussed topic in these forums. However I would like to present an improved autohotkey code that overcomes the shortcomings of the previous ones.

Prvious methods: (search in forum)
1. Using TST.exe like here --(triband-nu-solution-automated-router-reboot)
2. Using AutohotKey like here -- (automatic-rebooting-router-2-am-8-am)

The problem with the above two methods :
1) The Telnet Scripting Tool waits for characters before sending the next command. Sometimes it gets struck here.
2) In the AHK method, The send/sendkey commands send the string inputs only to the currently active window. Hence if the telnet window is not the current window (topmost) or if you have locked your desktop, the inputs are not sent to telnet window and hence the script is not executed.
3) Further any input from the keybord/mouse while the autohotkey script is running interferes with the command being sent to telnet window and may screw up the automation.
4) Also when you reboot the modem in addition to internet the existing LAN connections are also broken.
So as an improvement that takes care of these problems I present here an autohotkey script.This is by far the most failsafe method. It does not wait for characters to appear like the TST.exe method nor does one have to worry about the telnet being the active window(so u can lock ur desktop too) and of course you dont need to reboot the modem(which takes time, disconnects LAN and may be injurious to ur modem )

I have UTStarcom WA3002G4 modem with BSNL connection.So I will illustrate using this.

edit: Note :the 5th and 6th lines of code as displayed below should be on the same line in notepad
__________________________________________________ _______________
Code 1: Disconnect from the internet

SendMode Input
Run telnet.exe
WinWait, C:\WINDOWS\system32\telnet.exe
BlockInput, on
ControlSend , ahk_parent, o{SPACE}192.168.1.1{ENTER}, C:\WINDOWS\system32\telnet.exe
WinWait, Telnet 192.168.1.1
ControlSend , ahk_parent, admin{ENTER}, Telnet 192.168.1.1
ControlSend , ahk_parent, admin{ENTER}, Telnet 192.168.1.1
ControlSend , ahk_parent, ppp config 0.0.35 1 down{ENTER}, Telnet 192.168.1.1
BlockInput, off
sleep 1000
WinClose Telnet
__________________________________________________ _______________
Code 2: Reconnect to the internet

SendMode Input
Run telnet.exe
WinWait, C:\WINDOWS\system32\telnet.exe
BlockInput, on
ControlSend , ahk_parent, o{SPACE}192.168.1.1{ENTER}, C:\WINDOWS\system32\telnet.exe
WinWait, Telnet 192.168.1.1
ControlSend , ahk_parent, admin{ENTER}, Telnet 192.168.1.1
ControlSend , ahk_parent, admin{ENTER}, Telnet 192.168.1.1
ControlSend , ahk_parent, ppp config 0.0.35 1 up{ENTER}, Telnet 192.168.1.1
BlockInput, off
sleep 1000
WinClose Telnet
__________________________________________________ _______________
Code 3: Reboot the modem (If incase u need it)

SendMode Input
Run telnet.exe
WinWait, C:\WINDOWS\system32\telnet.exe
BlockInput, on
ControlSend , ahk_parent, o{SPACE}192.168.1.1{ENTER}, C:\WINDOWS\system32\telnet.exe
WinWait, Telnet 192.168.1.1
ControlSend , ahk_parent, admin{ENTER}, Telnet 192.168.1.1
ControlSend , ahk_parent, admin{ENTER}, Telnet 192.168.1.1
ControlSend , ahk_parent, reboot{ENTER}, Telnet 192.168.1.1
BlockInput, off
sleep 1000
WinClose Telnet

__________________________________________________ _______________

Note that
1.the words in bold are particular to your case. first admin is username , 2nd is password.
2.between the commands blockinput on and blockinput off, u will not be able to move your mouse from a brief time (<500msec)
3.Always try to use only the disconnect and reconnect codes (less time consuming and more efficient)

So all u need to do is get autohotkey(Google for Autohotkey installer),install it , rightclick -> create new ahk script, copy paste the above codes, then schedule them using windows scheduler (u can run the .ahk file directly or make exe).(Disconnect at 1.59/7.59 am, Reconnect at 2.01/8.01 am)

Also note that disconnecting and reconnecting changes ur ip address. So the code is good for rapidshare.

For use with other modems replace the underlined commands with equivalent commands for the particular modem. you can find them by manually tenetting to 192.168.1.1 and going through various commands in your modem (type 'help' or '?')(especially look for ppp connect/disconnect commands) like I did or google for it.
Hope this helps someone.

Last edited by mgtm7m; 12-18-08 at 10:55 PM.
mgtm7m is offline   Reply With Quote
Old 12-18-08, 03:45 PM   #45
Platinum Member
 
just4kix's Avatar
 
Join Date: Dec 2007
Location: Pune
Posts: 8,899
Blog Entries: 6
Rep Power: 19
just4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to behold
Default

Thank you. Repo given.
just4kix is offline   Reply With Quote
Old 12-20-08, 05:34 PM   #46
Junior Member
 
Join Date: Dec 2008
Age: 25
Posts: 4
Rep Power: 0
mgtm7m is on a distinguished road
Default

Thanks Just4Kix,
Just want to add some more info here.

The above automatic disconnect/reconnect is obviously for always on modem using PPPoE.From your post titled 'Solution for multiple machines connecting to same BB connection' since the values of vci/vpi are different for bsnl/mtnl, one needs to modify the command given to modem as well.
syntax of following command :
ppp config 0.0.35 up

follows

ppp config port.vpi.vci [up/down]
(note that the command/syntax depends upon the modem u have.)
the port is generally 0.(at least in my case).vpi, vci depends on ISP. you can find urs in ur modem configuration page at 192.168.1.1 (default) -> advanced setup -> WAN -> ATM PVC configuration (or similar).
mgtm7m is offline   Reply With Quote
Old 01-13-09, 05:40 PM   #47
Junior Member
 
Join Date: Oct 2008
Posts: 10
Rep Power: 2
ghoshprannoy is on a distinguished road
Default

Does the above reboot code for UTStarcom WA3002G4 actually work ? I dont have the modem but if it works i will buy it. Or else i will buy a bsnl type 1 modem which supports Imran's Broadband utility. Is Dlink dsl 502T still in market now ? By the way do all Bsnl type 1 modems work with Imran's Broadband utility ?
ghoshprannoy is offline   Reply With Quote
Old 01-13-09, 05:48 PM   #48
Platinum Member
 
just4kix's Avatar
 
Join Date: Dec 2007
Location: Pune
Posts: 8,899
Blog Entries: 6
Rep Power: 19
just4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to beholdjust4kix is a splendid one to behold
Default

Everything in this guide has been tested on UT-300R2U (version 1, version 2.2) and WA3002G4.

Imran's utility will also work.
just4kix is offline   Reply With Quote
Old 01-22-09, 10:29 PM   #49
Junior Member
 
Join Date: Jan 2009
Age: 29
Posts: 4
Rep Power: 0
sundeep_sarathy is on a distinguished road
Question In Telnet modems password is not working

Hi, I use GLB-502T modem

As said by Admin, I tired to Run>>telnet>>o 192.168.1.1>>Busybox on localhost login:>>admin>>password:>>I entered my password

Now as per Admin article I should get "#" symbol where I should type "reboot". But I get message "Login incorrect".

But when I give those userid and password in the browser when its url is 192.168.1.1, I am able to go into modem's web page (configuration page)

Please see attachment for Telnet screen details. Can any one help me?

Thankyou,
Sundeep
Attached Images
File Type: bmp telnet.bmp (663.5 KB, 18 views)
sundeep_sarathy is offline   Reply With Quote
Old 01-24-09, 07:43 PM   #50
Amor vincit omnia
 
Join Date: Dec 2007
Posts: 2,682
Blog Entries: 4
Rep Power: 4
cool_techie_tvm will become famous soon enough
Default

This thread just popped up in the search results, hence am commenting on it.

Are u sure about the password being entered in the command prompt. Try manually telnetting the router, enter the username/password combination which u use to access the web interface. It should work. Else try resetting the modem. Make sure to backup connection details before resetting.
cool_techie_tvm is offline   Reply With Quote
Old 01-24-09, 08:57 PM   #51
Bronze Member
 
Join Date: Dec 2008
Posts: 132
Rep Power: 1
DM111PUSP is on a distinguished road
Default

Quote:
Originally Posted by sundeep_sarathy View Post
Now as per Admin article I should get "#" symbol where I should type "reboot". But I get message "Login incorrect".
The only reason you can get the error "Login incorrect" is that either you have typed the wrong Username or wrong Password(or both wrong).

from your screenshot also it looks like you have not typed anything when prompted for password.

So it will be better for you try repeat the entire process.. and if then also you face this problem.. please write here.
DM111PUSP is offline   Reply With Quote
Old 01-24-09, 09:16 PM   #52
Amor vincit omnia
 
Join Date: Dec 2007
Posts: 2,682
Blog Entries: 4
Rep Power: 4
cool_techie_tvm will become famous soon enough
Default

D-Link routers have this nifty feature, while telnetting and while the username/password is being entered, the username is listed. But the password is kept blank. Hence in the screenshot the password is blank.
cool_techie_tvm is offline   Reply With Quote
Old 01-24-09, 09:40 PM   #53
Bronze Member
 
Join Date: Dec 2008
Posts: 132
Rep Power: 1
DM111PUSP is on a distinguished road
Default

Quote:
Originally Posted by cool_techie_tvm View Post
D-Link routers have this nifty feature, while telnetting and while the username/password is being entered, the username is listed. But the password is kept blank. Hence in the screenshot the password is blank.
Thanks for the ^^ info...

Anyway.. through googling i came to know that the the real problem is in the username..
the username for this modem is "root", and the password is the same which works in web interface.
DM111PUSP is offline   Reply With Quote
Old 01-24-09, 09:44 PM   #54
Amor vincit omnia
 
Join Date: Dec 2007
Posts: 2,682
Blog Entries: 4
Rep Power: 4
cool_techie_tvm will become famous soon enough
Default

What baffles me in http://www.indiabroadband.net/broadb...html#post98654 (Automatic rebooting of router at 2 AM and 8 AM) is that the poster says he is able to login to webinterface using the username/password combination. Or is the telnet username/password different from the ones used to access the web interface?
cool_techie_tvm is offline   Reply With Quote
Old 01-24-09, 10:09 PM   #55
Bronze Member
 
Join Date: Dec 2008
Posts: 132
Rep Power: 1
DM111PUSP is on a distinguished road
Default

Actually this is a perfect example of a really poor implementation by Dlink.. where they allow "Admin" as the username with web interface but "root" as the username for telnet session.(both sharing the same password)
DM111PUSP is offline   Reply With Quote
Old 01-24-09, 10:13 PM   #56
Amor vincit omnia
 
Join Date: Dec 2007
Posts: 2,682
Blog Entries: 4
Rep Power: 4
cool_techie_tvm will become famous soon enough
Default

I possess a D-Link 2540T router. I just tried admin/*password* as well as root/*password* in telnet console. And guess what? It worked. I have always used admin/*password* for rebooting the modem. Thanks to this thread i came to know about the second username/password combination.
cool_techie_tvm is offline   Reply With Quote
Old 01-25-09, 12:13 AM   #57
Platinum Member
 
Join Date: Aug 2007
Location: Chennai
Posts: 4,232
Rep Power: 12
essbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of lightessbebe is a glorious beacon of light
Default

@superprash2003
one more user password.
essbebe is offline   Reply With Quote
Old 01-25-09, 08:52 PM   #58
Bronze Member
 
Join Date: Dec 2008
Posts: 132
Rep Power: 1
DM111PUSP is on a distinguished road
Default

Quote:
Originally Posted by essbebe View Post
@superprash2003
one more user password.


Is there other Username and Passwords also, other than "Admin" and "root"?
DM111PUSP is offline   Reply With Quote
Old 01-26-09, 03:50 AM   #59
Gold Member
 
Join Date: Apr 2007
Location: Jaipur
Posts: 775
Blog Entries: 1
Rep Power: 3
Gary4gar is on a distinguished road
Default

@cool_techie_tvm
D-link router are running on busybox. that why their username is "root" instead of admin in web interface. and like all linux terminals busybox does not show passwords
if you are familar with linux, then you would understand.
Gary4gar is offline   Reply With Quote
Old 01-26-09, 08:45 AM   #60
Amor vincit omnia
 
Join Date: Dec 2007
Posts: 2,682
Blog Entries: 4
Rep Power: 4
cool_techie_tvm will become famous soon enough
Default

As u might be knowing from my linux queries in other forums, i am no pro in linux. Still sticking with Ubuntu/Fedora because of ease of use.

U might be surprised to know that my D-Link router supports admin,root as username. This is what i had posted in post #56.
cool_techie_tvm is offline   Reply With Quote
Reply

Tags
automatic, bsnl, bsnl night unlimited, modem, rebooting, router, schedule, scheduling

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Tata Indicom Telenet Tndsl 2120 Router And Linksys Wireless Router Settings ziahaq21 Tata Indicom broadband 7 08-08-09 06:17 PM
Automatic Router Reboot & Scheduling torrent clients (tutorial) Procrush BSNL broadband 18 04-08-09 09:50 PM
Help needed on Billion 5200S ADSL Router Config anserkk Tata Indicom broadband 8 02-06-09 07:40 PM
Configuring wireless router with Zeenext ankroh ZeeNext 0 12-19-07 03:15 AM
want information abt rebooting router in590 nu aashu_gpt MTNL broadband 1 03-27-07 05:08 AM


All times are GMT +5.5. The time now is 06:37 PM.


India Broadband Forum