Script for reseting my router.
#1
Could it be possible to make a script xbmc compatible to automatically reset a router? If you have ever used JDownloader, there is an option (LiveHeader/Curl tab) to record a script with the steps you do when you manually conect to your router and reset it.

In the wiki section of the JDownloader web page there are also lots of scripts to automate this and other ways to do it.
Reply
#2
Yeah it could be done, easiest way IMO would be if your router accepted telnet connections. Knock up a simple python script to login to the router and issue the reset command.
Reply
#3
I don't know if my router accepts telnet, it's a Comtrend 536+. What I know is that there are lots of routers that are DLNA compatible.
Reply
#4
if you go to Management -> Access Control you will see if telnet is an option Smile

if it is you can write a simple script to reboot the router... but i'm not familiar with your router so don't know!! if is isn't... you could look at a newer firmware to see if it is included Smile

have you tried to telnet the router? use putty or from command line:

Code:
telnet [host-ip] 23
Reply
#5
I found this python code that is exactly for my router model:

Code:
#!/usr/bin/python
#
# Copyright (C) 2009 dieguz2
# License: GNU GPL v2
# http://dieguz2.blogspot.com/
# Script for comtrend hg536+ ( firmware A101-302JAZ-C03_R21.A2pB021g.d15h )
# This scripts connect to router and reset ip in 45s. In this example use default values for jazztel .

import getpass
import sys
import telnetlib
import time

HOST = "192.168.1.1"
LOGIN = "admin"
PASS = "admin"
PROMPT = " -> "
WAITTIME = 40 # Number of second
CONNECTIONNAME = "0.8.35 2" # to see your connections, manually connect to router (telnet 192.168.1.1) and use "wan show" .You should choose you PPPoE connection Use a combination of VCC + Con Id. For example ""0.8.35 2""

tnt = telnetlib.Telnet(HOST)

tnt.read_until("Login: ")
tnt.write(LOGIN + "\n")

tnt.read_until("Password: ")
tnt.write(PASS + "\n")

tnt.read_until(PROMPT)
tnt.write("ppp config " + CONNECTIONNAME + " down\n")

time.sleep(3)
tnt.write("\n")
tnt.write("ppp config " + CONNECTIONNAME + " up\n")

time.sleep(WAITTIME)

tnt.read_until(PROMPT)
tnt.write("ppp config " + CONNECTIONNAME + " up\n")

tnt.write("\n")

tnt.read_until(PROMPT)
tnt.write("13\n") # press option to exit

tnt.close()

Will this work in the xbox?
Reply

Logout Mark Read Team Forum Stats Members Help
Script for reseting my router.0