s***@xmission.com
2007-10-27 01:47:41 UTC
Has anyone come up with a better way of power-cycling an Actiontek 701 DSL
modem from a scheduled task/cron job/etc?
My modem has needed a theraputic reboot every few weeks ever since I've had
it. Normally, no big deal. But today, it managed to hang just a short time
after I'd left for work, leaving me unable to retrieve some files from my
home network all day. Still not a big problem, but slightly annoying, and
I'm bored enough to try to solve it.
So, I bodged up a script to test for connectivity every 15 minutes or so,
with the idea of bouncing the modem if the line is down. I started with the
idea of a serial/parallel/X10-controlled power switch, but then realized
that I don't need hardware for this: the Actiontec allows you to "save and
restart" on its web interface, so it should be a simple (?) matter to have a
shell script do the same thing.
After some fiddling and digging around in the modem's webpage sources, I
came up with an HTTP request that *should* do the trick...but I haven't
tested it for fear of bricking my modem. Can anyone take a look at this and
tell me if I'm on the right track?
Here's what I came up with:
---cut---
POST /cgi-bin/webcm HTTP/1.0
Authorization: Basic [Password here]
Content-Type: application/x-www-form-urlencoded
Content-Length: 123
getpage=..%2Fhtml%2Fbasic_setup_congrats.html&logic%3Acommand%2Fsave=&var%3Afrom=fromsave&Save+and+Restart=Save+and+Restart
---cut---
Thanks,
-Scott
modem from a scheduled task/cron job/etc?
My modem has needed a theraputic reboot every few weeks ever since I've had
it. Normally, no big deal. But today, it managed to hang just a short time
after I'd left for work, leaving me unable to retrieve some files from my
home network all day. Still not a big problem, but slightly annoying, and
I'm bored enough to try to solve it.
So, I bodged up a script to test for connectivity every 15 minutes or so,
with the idea of bouncing the modem if the line is down. I started with the
idea of a serial/parallel/X10-controlled power switch, but then realized
that I don't need hardware for this: the Actiontec allows you to "save and
restart" on its web interface, so it should be a simple (?) matter to have a
shell script do the same thing.
After some fiddling and digging around in the modem's webpage sources, I
came up with an HTTP request that *should* do the trick...but I haven't
tested it for fear of bricking my modem. Can anyone take a look at this and
tell me if I'm on the right track?
Here's what I came up with:
---cut---
POST /cgi-bin/webcm HTTP/1.0
Authorization: Basic [Password here]
Content-Type: application/x-www-form-urlencoded
Content-Length: 123
getpage=..%2Fhtml%2Fbasic_setup_congrats.html&logic%3Acommand%2Fsave=&var%3Afrom=fromsave&Save+and+Restart=Save+and+Restart
---cut---
Thanks,
-Scott