Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

how to reboot adsl modem with perl?

by MelaOS (Beadle)
on Feb 22, 2007 at 15:44 UTC ( [id://601577]=perlquestion: print w/replies, xml ) Need Help??

MelaOS has asked for the wisdom of the Perl Monks concerning the following question:

Hi, i have googled around yet i failed to find any information on how i can write a simple script to reboot my aztech dsl600eu modem. it would be also splendid if i were to able to get connection information, etc through the script. anyone can offer any advice on where i can get any information at all? thanks :)

Replies are listed 'Best First'.
Re: how to reboot adsl modem with perl?
by Fletch (Bishop) on Feb 22, 2007 at 15:53 UTC
    • Find out how to talk to the device (telnet, ssh, a web interface)
    • Figure out how to use that channel to reboot the device
    • Write code using the corresponding Perl module (e.g. Net::SSH or WWW::Mechanize) to do that same thing
    • Profit!

    (Underpants not included. Contents may have settled during shipping. Not valid with other offers. In case of swelling or boils discontinue use and see a physician immediately. Pony.)

      Just search and download "Imran's Broadband Helper Utility", it is perfect tool to reboot any ADSL Modem. It is a freeware also.
Re: how to reboot adsl modem with perl?
by marto (Cardinal) on Feb 22, 2007 at 16:36 UTC
    Can you reboot it from the configuration page (should be http://192.168.1.1)? If so then you can use WWW::Mechanize to get the connection information you are looking for, and to reboot the device.

    IMHO WWW::Mechanize is well documented and has some example code to get you started. If you have any other problems let us know.

    Cable modem status should give you an idea of how to do this using LWP::Simple.

    Update: I googled this device, it would seem that it does have a web interface, and you can reboot ('Restart') it from the 'Tools'->'SystemCommands' menu on the web interface. Consult your user guide for more information.

    Hope this helps.

    Martin
      Hi Fletch, Martin, Thanks for providing me somewhere to start. Hope my newbie perl skill will be enough to do the job :)
        No problem MelaOS,

        if you do have any problems post your code, a description of the problem along with the error message, and the kind monks will reply with advice.

        Martin
Re: how to reboot adsl modem with perl?
by Anonymous Monk on Sep 17, 2009 at 17:55 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://601577]
Approved by jettero
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-28 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found