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....
| |||||||
| 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 |
| LinkBack | Thread Tools | Display Modes |
| | #42 |
| Junior Member Join Date: Oct 2008
Posts: 1
Rep Power: 0 | 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 |
| | |
| | #43 |
| Junior Member Join Date: May 2008 Age: 31
Posts: 3
Rep Power: 0 | Some has the script for linux? I use opensuse 10.3 |
| | |
| | #44 |
| Junior Member Join Date: Dec 2008 Age: 25
Posts: 4
Rep Power: 0 | 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. |
| | |
| | #46 |
| Junior Member Join Date: Dec 2008 Age: 25
Posts: 4
Rep Power: 0 | 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). |
| | |
| | #47 |
| Junior Member Join Date: Oct 2008
Posts: 10
Rep Power: 2 | 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 ? |
| | |
| | #49 |
| Junior Member Join Date: Jan 2009 Age: 29
Posts: 4
Rep Power: 0 | 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 |
| | |
| | #50 |
| Amor vincit omnia | 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. |
| | |
| | #51 | |
| Bronze Member Join Date: Dec 2008
Posts: 132
Rep Power: 1 | Quote:
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. | |
| | |
| | #52 |
| Amor vincit omnia | 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. |
| | |
| | #53 | |
| Bronze Member Join Date: Dec 2008
Posts: 132
Rep Power: 1 | Quote:
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. | |
| | |
| | #54 |
| Amor vincit omnia | 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? |
| | |
| | #55 |
| Bronze Member Join Date: Dec 2008
Posts: 132
Rep Power: 1 | 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) |
| | |
| | #56 |
| Amor vincit omnia | 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. |
| | |
| | #57 |
| Platinum Member Join Date: Aug 2007 Location: Chennai
Posts: 4,232
Rep Power: 12 | @superprash2003 one more user password. |
| | |
| | #58 |
| Bronze Member Join Date: Dec 2008
Posts: 132
Rep Power: 1 | |
| | |
| | #59 |
| Gold Member | @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. |
| | |
| | #60 |
| Amor vincit omnia | 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. |
| | |
| Tags |
| automatic, bsnl, bsnl night unlimited, modem, rebooting, router, schedule, scheduling |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |