last day (15 days later) » 

16:50
0
Q: How can I make my 3G router reset its connection in the middle of the night?

FiksdalI have a 3G router, which is my only internet connection. I pay per megabyte. The router hosts WiFi. It is is not physically connected to the computer. It gets its power from an electric socket. Sometimes I download large files. Between midnight and 6 AM downloading is 5.6 times cheaper (it cos...

I think that involves enabling telnet in your router, writing a script to send a reboot command to the router, and setiing this script to run at 00:01 in a scheduler app (e.g. Task scheduler, built-in app of windows). I just can't remember how to write the script and enable telnet in stupid ISP routers.
@VaradMahashabde Maybe it's easier to just find a program that emulates mouse clicks and clicks the button in the web interface twice?
@Fiksdal Program a reboot of the computer.
@Fiksdal The router firewall may view it as malware.
@jcbermu It's the router which needs to reset its cellular connection, not the computer.
@VaradMahashabde OK.
16:50
@Fiksdal Just saw the whole guide link Problems: you may need a scheduler for osx, it requires telnet and isp routers are stupid
@VaradMahashabde Alright, thanks. This is actually a third party router, though, I bought it independently of my ISP.
Surely the simplest option is just to get one of those electrical socket timers?
Can you enable telnet? @Fiksdal
@Mokubai Simplest, maybe, but not cheapest. Also, I live in the Indian countryside, so getting it is not really that simple either. I'd have to order it online and wait for about a week for it to arrive. It seems like an unnecessary piece of hardware for something my computer should already be able to do.
@VaradMahashabde I don't even know what telnet is.
"It's the router which needs to reset its cellular connection, not the computer" the "3G Router" you linked to appears to be a USB-powered dongle, so rebooting the computer should reboot it (assuming it's not plugged into an "always on" USB port)...?
16:50
@Ƭᴇcʜιᴇ007 It's plugged into an electric socket, not the computer. But I guess I could plug it into the computer instead. But my computer doesn't automatically boot the OS after a reboot, I have to press Enter in the Clover Bootloader. Also, I'd have to remove the login password from my OS, which is not a secure thing to do.
@Ƭᴇcʜιᴇ007 If there was a way to deprive a USB port from power for a few seconds, without rebooting the computer, that would be pretty cool and would work very well.
If you can provide page source code for the login page of the router and the page where the reset button is, I can see what script I can write that will automatically press the buttons in the UI and login for you. If you want to do this, just use pastebin or something to post the data. You would then schedule this script as a task.
@Narzard I've made a pastebin. There's no sepreate login page, though. Instead, there's this login element which appears on top of the page when the user clicks something that requires the password.pastebin.com/kNPCN6CM
@Fiksdal definition and uses and couldn't find how to enable but it is given in many guides as a sub topic
@VaradMahashabde Thanks :)
@Ƭᴇcʜιᴇ007 Thanks, that's all very interesting!
 
2 hours later…
19:18
$username = "username"
$password = "password"
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate("http://192.168.1.1")
while($ie.ReadyState -ne 4) {start-sleep -m 100}
start-sleep 4
$ie.document.getElementById("power_off_button").click()
start-sleep 4
$ie.document.getElementById("username").value= "$username"
$ie.document.getElementById("pass").value = "$password"
$ie.document.getElementById("loginform").submit()
start-sleep 20
this kind of (if you van view source when the password box is up, we can identify the correct username/password elementIDs and make it work

last day (15 days later) »