The version of OpenWRT that I flashed was Kamikaze 7.09 and it has been working beautifully. Very fast boot times, organized filesystem and configuration structure, and plenty of RAM and Flash to spare. The radio in this box is a Broadcom, which I'm not very used to. I have a BCM4318 in my budget Acer Aspire 3002 laptop, and it works quite well, but I basically use it for connecting to a single access point using WPA encryption.
On the WRT box (which I fondly hostnamed 'wart') I wanted to try out WEP (yes, the old, insecure, useless WEP), mostly because a lot of access points in my area use it. Typically one could just use something like
iwconfig wl0 enc <WEP key>to accomplish that. Sadly this doesn't work, although no error message is returned. Simply nothing happens, and the status of the interface ends up like:
wl0 IEEE 802.11-DS ESSID:"MUSIK"
Mode:Managed Frequency:2.462 GHz Access Point: 00:02:2D:0D:1B:39
RTS thr:2347 B Fragment thr:2346 B
Encryption key:<too big>
Link Signal level:-42 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:516 Invalid misc:0 Missed beacon:0
Encryption key:<too big>line. It seems that the wireless tools don't play too well with the Broadcom's "advanced" settings. Even after I got this to work I still got the same output from
After some searching I found out that the utility that controls most of the internals of the Broadcom hardware is called
wlc. Sure enough it was a "wepkey" option that should do the trick. The syntax seemed to be
wlc wepkey <WEP key>, only that always returned:
Command 'set wepkey' failed: -1
I couldn't find a docs for
wlcby searching online, so I fetched the full Kamikaze source tree to check its source code (hail to Open Source!). It turns out that the syntax expects you to inform the key slot to store to (1 through 4), and to use "=" to assign the "PRIMARY KEY", which is the slot that will be actually used. Thus, the command that worked for me was
wlc wepkey =1,<WEP key>. Notice that I'm using an hex WEP key. If you use an ASCII WEP key, prefix it with "s:".
And that did it for me. Now with a simple call to
wlcI can change WEP keys on the fly and get instant results.