Get WET11 status automatically

I'm using Linksys WET11s for a rural wireless network. One thing I want to do is query the status of the WET11s from the command line, for logging and because I don't keep browsers running everywhere.

As it turns out, the WET11 makes use of a lot of Javascript, and it's pretty well commented, so figuring out the right thing to do was easy.

The first job is getting the status information out of the WET11. This does it, assuming it still has the default password (admin) and you know its IP address:

curl -u admin:admin http://192.168.0.240/info_data.js

That gives a block of data with all the status information encoded in it. Extracting it with some perl gives this sort of thing:

$ ./wq wet11-0

################### wet11-0 ###################
        SSID: acelere
     channel: 4
      txrate: 2 (2 Mbit/s)
     quality: 37
 MAC bridged: ffffffffffff
         MAC: ffffffffffff
          IP: 192.168.0.240
    firmware: 1.3.2.107.136

SSID          MAC           channel strength
acelere       ffffffffffff      4      71

Here is the code that does it for firmware version 1.3.2, and here is the code that does it for firmware version 1.4.3.

(They run on FreeBSD, Linux and Windows (with cygwin). It's just a quick hack, works with WET11 firmware 1.3.2 and 1.4.3, but might not work with future firmware.)

To make an update-every-second signal strength meter, I do this:

while true
do
  wq wet11-1 | grep quality
  sleep 1
done

...it definitely beats hitting reload while adjusting the antenna for the best signal.

More notes are here.

James Bowman - acelere.net