Hi guys,

I am not new to perl, however I am rather new to LWP...

I have a unique problem I was hoping you guys could help me with some
suggestions...

we have a Dlink DSL504 router in the office.. and it has no other config
system other then http..

Our connection drops out almost daily, and usually at night when there is
noone to manually restart it.
So I wanted to see if I couldn't automate restarting the link...

The firmware html interface is almost totally Javascript based..

I have picked it apart and managed to create two forms, one to disconnect
and one to connect..
(so I could see what was being passed to the router)

the disconnect form works, the connect doesn't... don't know why...

Anyway, I have no idea if this is possbible but I have to try and make a
crontab job that tests the connection (I do that using LWP to fetch from
google and yahoo and if both are down the assume the connection is down and
restart the router.)

testing google and yahoo works fine.. my problem is working out how to
interface to the html app of the router.

should I try to use "links" to try and automate the connection?? or can LWP
do it?

to give you an idea, the disconnect form that works looks like this:

<FORM METHOD="post"
ACTION="http://192.168.1.1/Forms/page_PPPOE_Set?5648,0,0,0,0,0,0,0,0";>
<input type="hidden" name="page_HiddenVar" value="0">
<input type="hidden" name="PVC" value="1 AU_PPPoE, VPI=8, VCI=35, Router
with PPPoE">
<input type="hidden" name="iIndexOfISP" value="0">
<input type="hidden" name="LoginUserName" value="[EMAIL PROTECTED]">
<input type="hidden" name="LoginPassword" value="*********">
<input type="hidden" name="Authentication" value="pap">
<input type="hidden" name="ConnectOnDemand" value="enabled">
<input type="hidden" name="IdleTime" value="0">
<input type="submit" name="g_submit_Disconnect" value="Disconnect">
</form>

the connect form is almost identical except for the submit...

any advice or tips on how I can go about doing what I need would be greatly
appreciated..

like I said, I already have the script using LWP to test if the connection
is up,, I just need ideas on how to interface to the router.. (it needs a
login username and password to get in as well, seems to be .htaccess
compatable.)

any tips or suggestions would be greatly appreciated.


regards

Frank

Reply via email to