How to Retart my TP-Link TD-W9970 via Command Line
How to Retart my TP-Link TD-W9970 via Command Line
Hi all
I have a TP-Link TD-W9970 Modem-Router,
and currently when I want to Restart it, I log into the web interface, and then choose System Tools -> Reboot.
I would like to automate this, so I can create a small .BAT file in windows, and then run this file,
and it will perform the reboot,
without me having to log into the router's web interface, and click my way thru it.
What is the simplest way to do it?
Thank you
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
- Copy Link
- Report Inappropriate Content
If you are running Linux, install the "expect" package and then you can run the below script to re-set the TD-W9970 V2 router via telnet with just a couple clicks on the script.
I have some scripts set up to check for modem internet drop out every 5 minutes.
If the checking script can't ping to outside it runs the modem reset script as shown below.
#!/usr/bin/expect
#### Make sure package "expect" is insatlled ####
###### login and reset the router #####
#If it all goes pear shaped the script will timeout after 20 seconds.
set timeout 20
#This spawns the telnet program and connects it to the variable name
spawn telnet 192.168.1.1
#The script expects login
expect "username:"
#The script sends the user variable
send "admin"
send \n
#The script expects Password
expect "password:"
#The script sends the password variable
send "my_password"
send \n
#This hands control of the keyboard over to you
####interact
#reset the router
send "dev reboot"
send \n
- Copy Link
- Report Inappropriate Content
Hi kesz
Really cool!
Thank you so much
- Copy Link
- Report Inappropriate Content
Information
Helpful: 1
Views: 9500
Replies: 13