Script to disconnect Linksys WRT54G wireless router on Windows - Page 3

Have a question or want to start a discussion? Post it! No Registration Necessary.  Now with pictures!

Threaded View
Re: Script to disconnect Linksys WRT54G wireless router on Windows
Wilson wrote:
Quoted text here. Click to load it

My WRT54G (v8.00.2) is not configured the same as yours so I can not
test the script for you.  Nor does my device connect directly to the
internet, rather it sits behind my DSL modem.  No connect/disconnect
buttons.

FWIW, by using Win32::Internet on a WinXPsp2 using Perl 5.6.1, I can
"click" the 'DHCP Clients Table' button located under Status | Local
Network.

Perhaps you should try cURL within a batch file and forgo the
programming, but you will still need to know how call a web site outside
of a web browser -- same as if you were using Perl.

--

Len

Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Fri, 23 Nov 2007 23:25:23 -0600, l v wrote:
Quoted text here. Click to load it

Hi lv,
My WRT54G also sits "behind" a DSL modem.

If you navigate to the Linksys WRT54G "Status -> Router" page, do you see
the "Disconnect" or "Connect" button?

This connects or disconnects from the DSL modem (depending on whether you
are already connected or disconnected).

Re: Script to disconnect Linksys WRT54G wireless router on Windows
Wilson schreef:

Quoted text here. Click to load it

Most WAN-routers also have a textual interface (like telnet) that is
much easier to handle programmatically, so why go the non-easy way?

--
Affijn, Ruud

"Gewoon is een tijger."


Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Sat, 24 Nov 2007 15:13:48 +0100, Dr.Ruud wrote:

Quoted text here. Click to load it

I am almost to the point of giving up on Perl so I think I'll follow Ben's
prior suggestions which seem to be more powerful than Perl.

I think, based on my experience only, that for Perl to interpret Javascript
is something nobody has ever posted, so, who am I, an avowed beginner and
non programmer, to get it working first.

I have just one or two more experiments to try. I don't have a programmers'
mind, but I do see a few more things I can tweak and try as every time I
try something, I see something else that "might" be the culprit or the
solution.

I find that part fun even though I don't know how to program. I sure hope
to post a solution for the world to benefit - but first I have to get it
working.

Thanks for the advice.

Re: Script to disconnect Linksys WRT54G wireless router on Windows

Quoted text here. Click to load it

Err, no; you misunderstood me. The tool I pointed you at (WSP) helps
find out what's actually going on between the browser and the router, so
you can then emulate that in Perl (or anything else, for that matter).
If you were feeling macho you could just run tcpdump and work from
there... :)

Ben


Re: Script to disconnect Linksys WRT54G wireless router on Windows
Dr.Ruud wrote:
Quoted text here. Click to load it

I port scanned my WRT54G when I first got it.  Unlike my DSL modem, it
does not respond to telnet nor ssh.  I am guessing the OP's wireless
device is the same.

--

Len

Re: Script to disconnect Linksys WRT54G wireless router on Windows
Wilson wrote:
Quoted text here. Click to load it

Wilson

As I stated, my WRT54G is configured differently than yours -- no
"disconnect" or "connect" button under "Status -> Router".

While c.l.p.m is not the proper newsgroup for this, I see from your HTML
posting, that you have your WRT54G set to use PPPoE.  Mine is not.

Let me guess at your problem.  Your DSL modem changes public IP address
on occasion.  When it does you need to re-connect your WRT54G to get the
new pubic IP address as well.  Am I correct?

I set my WRT54G to use a Static IP (Setup -> Basic Setup).  My DSL
modem's IP address is 192.168.1.1

I use the following settings for the WRT54G:
Internet IP Address:    . . .  192.168.1.10
          Subnet Mask:   . . .  255.255.255.0
          Gateway:     . . .  <my DSL ip>
          Static DNS 1:     . . .  my ISPs 1st DNS server
          Static DNS 2:     . . .  my ISPs 2nd DNS server
          Static DNS 3:     . . .  0.0.0.0

Local IP Address:    . . .  192.168.2.1
          Subnet Mask:   . . .  255.255.255.0

I then have no need to disconnect and re-connect the WRT54G when my
DSL's pubic ip address changes.

--

Len

Re: Script to disconnect Linksys WRT54G wireless router on Windows


Quoted text here. Click to load it

You can also record and generate the script in minutes  using
SWExplorerAutomation (SWEA) from http://webius.net

Re: Script to disconnect Linksys WRT54G wireless router on Windows
Wilson wrote:
Quoted text here. Click to load it

FWIW this isn't a proof. It merely shows that /to date/ nobody smart
enough or interested enough has looked into it.

For three hundred years Fermat's Last Theorem stood unproven. That
doesn't mean it was impossible to prove. Someday someone will prove the
Riemann Hypothesis too.

Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Fri, 23 Nov 2007 23:36:51 +0000, Mark McIntyre wrote:
Quoted text here. Click to load it

OK. Agreed.

Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Thu, 22 Nov 2007 08:27:27 -0500, Sherman Pendley wrote:
Quoted text here. Click to load it

Hi Sherman,
After calming down, I must apologize for saying "Perl can't do it", as, as
you noted, I am not a programmer, nor do I have a programmer's mentality
... so who am I to say whether it can be done or not. In my frustration, I
guess I was "blaming" perl but I did not mean to malign that language.

It's just that I really hate it when I have to do anything manual and,
despite the fact I'm not a programmer-type person, I always try to cut down
on the number of button clicks I do, even if it's only three or five clicks
when I do it a lot. I find that makes me much more efficient even if there
is a lot of up-front work to get the job done.

So, I _will_ automate the task of disconnecting and reconnecting from the
ISP - I just don't know how yet. I have just a few more things to try
(although I said that days ago) and I'll get the damn thing working.

Thanks and sorry for not being of the mind and body like you guys are!
I admire you and what you can do with code!
Wilson

Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Sat, 24 Nov 2007 18:13:08 GMT, Wilson wrote:

Quoted text here. Click to load it

Hey, you can learn to work the computer, or let the computer work you.


Quoted text here. Click to load it

Yep, computer is nice for automation and repetitive tasks.

Quoted text here. Click to load it

I do not do windows, I run Mandriva Linux.
I plugged Mechanize into my Software Management application search
box, and 7t'h selection click gave me

perl-WWW-Mechanize-Shell - WWW::Mechanize::Shell - An interactive
shell for WWW::Mechanize

This module implements a www-like shell above WWW::Mechanize and also
has the capability to output crude Perl code that recreates the
recorded session. Its main use is as an interactive starting point for
automating a session through WWW::Mechanize.


Re: Script to disconnect Linksys WRT54G wireless router on Windows
["Followup-To:" header set to comp.lang.perl.misc.]
Quoted text here. Click to load it

So Wilson does have a programmer's mind after all.

Quoted text here. Click to load it

I didn't realize Wilson is using Windows. If he does he should be able
to use WWW::Mechanize::IE, which lets him use IE's JavaScript
interpreter.

    hp

--
   _  | Peter J. Holzer    | It took a genius to create [TeX],
|_|_) | Sysadmin WSR       | and it takes a genius to maintain it.
| |   | hjp@hjp.at         | That's not engineering, that's art.
__/   | http://www.hjp.at/ |    -- David Kastrup in comp.text.tex

Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Fri, 23 Nov 2007 17:29:57 -0600, DTC wrote:
Quoted text here. Click to load it

Can you post that Perl script? I'd love to try it out on my Linksys WRT54G
wireless router!

Re: Script to disconnect Linksys WRT54G wireless router on Windows
Wilson wrote:
Quoted text here. Click to load it

I'll see if we have it saved somewhere. We haven't worked with Linksys
units for some time.

Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Sat, 24 Nov 2007 11:14:22 -0600, DTC wrote:

Quoted text here. Click to load it

Thanks.

Re: Script to disconnect Linksys WRT54G wireless router on Windows
Quoted text here. Click to load it

I think I've narrowed down the problem to the acceptance of the Linksys
security certificate when the Linksys WRT54G router is first contacted.

The way I tested that was to set it to http instead of https in the router
configuration. Just a few more tries before I give up totally on Perl and
go with something else.

Re: Script to disconnect Linksys WRT54G wireless router on Windows
On Mon, 26 Nov 2007 05:41:09 -0800, Wilson wrote:
Quoted text here. Click to load it

Drat. Failed again.
Does anyone know what a "read timeout" is telling me?
Wilson

C:\\perl>fixrouter.pl
500 read timeout
Content-Type: text/plain
Client-Date: Mon, 26 Nov 2007 14:17:22 GMT
Client-Warning: Internal response

500 read timeout

Re: Script to disconnect Linksys WRT54G wireless router on Windows
[f'ups set to clpm. Please stop cross-posting everything.]

Quoted text here. Click to load it

The Client-Warning says this response is faked by LWP, and the message
says that, well, a read timed out. The server isn't responding
sufficiently promptly: set a longer timeout with $ua->timeout, or find
out why it's failing to respond.

Ben


Re: Script to disconnect Linksys WRT54G wireless router on Windows
You omitted the security issue.  Leaving the router wide open for a Perl
script is like unprotected sex, and the security programming in Perl is
non-trivial to do safely.


On Thu, 17 Jan 2008 03:05:57 -0800 (PST), stuart.t.taylor@gmail.com
wrote in

Quoted text here. Click to load it

--
Best regards,   FAQ for Wireless Internet: <http://Wireless.wikia.com
John Navas      FAQ for Wi-Fi:  <http://wireless.wikia.com/wiki/Wi-Fi
           Wi-Fi How To:  <http://wireless.wikia.com/wiki/Wi-Fi_HowTo
Fixes to Wi-Fi Problems:  <http://wireless.wikia.com/wiki/Wi-Fi_Fixes

Site Timeline