Readme

License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Click to read the The GNU General Public License
Support
I'm unable to provide one-on-one support, sorry. But please visit the forums at http://www.linksysinfo.org/ or http://www.hyperwrt.org/ if you need help in upgrading, configuring or to report a problem. There are a lot of people in these forums that are very helpful and are very knowledgeable with these routers and in networking. Be nice and do a search first though. :)
Upgrading The Firmware
Before proceeding, please verify that your router is a Linksys WRT54G v1, v2, v3, v4 (not v5), or a WRT54GL. This is not for the WRT54GS, WRT54GX, etc.

Some recommendations: To upgrade: Go to the Administration page, Firmware Upgrade, then upload the file "code.bin."
Changelog
13c 13b 13a 13 show more...
Cisco / SES Button
If SecureEasySetup is disabled (Advanced Wireless settings), the Cisco button is converted into a wireless on/off button which is the same thing as doing an "ifconfig eth1 up/down" command. You can also run a custom script by creating one at /tmp/ses_button. Here are a few examples that can be entered in the startup script:

reboot
echo "#!/sbin/reboot" > /tmp/ses_button
chmod +x /tmp/ses_button
start/stop telnetd
echo "#!/bin/sh
killall telnetd || telnetd" > /tmp/ses_button
chmod +x /tmp/ses_button
DNS, DHCP & Dnsmasq
Why computers always get "192.168.1.1" for DNS.
By default all DNS requests are handled by Dnsmasq (192.168.1.1). Dnsmasq then forwards the requests to the proper DNS servers and caches the results. This is also how the names entered in the Static DHCP/Domain Name page are able to work. You can disable this behavior by disabling "Use Dnsmasq for DNS" in the Basic Setup page.
Why DHCP-served IP addresses do not begin at "192.168.1.100".
Dnsmasq does not give sequentially ordered IP addresses. The addresses are calculated based on your computer's MAC address and "a variable." This is normal and your computers will still get an address within the range you defined. It's just a little different from the way the original Linksys firmware worked.

For those who want the details, it's calculated using something like [lease_start + [[mac_hash + variable] % lease_max]]. The "variable" changes whenever Dnsmasq sees a conflict.
Why are computers not in the DHCP lease table even though they are "connected."
The lease table is cleared when the router is upgraded, unplugged, rebooted, and in situations where a config change requires a reboot. If your computer is already connected when this happens, it will remain connected but will not be in the lease table until the next time it tries to renew.
Kai
There is no built-in code to run a Kai daemon, but you can copy & paste the following into your startup script to download and run Kaid everytime the router starts up:



Save, then reboot when you're done. It may take up to 2-4 minutes for the program to fully start. The setup page will be located at http://192.168.1.1/ext/kai.asp

For information about Kai and for other ways to get a Kai daemon running on the router: http://www.teamxlink.co.uk/

LED Command
You can control some of the LEDs with the led command:
led <white/amber/dmz/diag/wl> <on/off> [...]
Simple examples:
led white on -- white Cisco logo
led diag on -- flashes the power light on my v4.
You can also shorten and string several keywords together:
led wh on am on wl of -- turn on the white and amber leds, and turn off the wlan led
A flashing for no reason Cisco logo:
#!/bin/sh
while true; do
  led wh on am of
  usleep 200000
  led wh of am on
  usleep 200000
done
Amber when a wireless client is connected, white when there's data being transferred wirelessly:
#!/bin/sh
I=`nvram get wl0_ifname`
while sleep 1; do
  if [ "`wl assoclist`" != "" ]; then
    XFER=`ifconfig $I|grep bytes`
    if [ "$XFER" != "$PXFER" ]; then
      LED="am on wh on"
      PXFER=$XFER
    else
      LED="am on wh of"
    fi
  else
    LED="am of wh of"
  fi
  if [ "$LED" != "$PLED" ]; then
    led $LED
    PLED=$LED
  fi
done
NVRAM -- Additional variables used in this firmware
KeyValues (default in bold)Description
ajax0, 1Use XMLHTTP in Device List and Site Survey. Allows these pages to update the information without reloading the entire page.
capfix0, 1On some browsers like Opera, the text "Capture()" is displayed instead of the correct one. This variable enables a work-around to the problem.
dhcpc_ckps0, 1If enabled, udhcpc is always kept running. If it crashes for example, udhcpc is restarted.
dhcpd_auth0, 1Allow dnsmasq to be the authoritative server.
dhcpd_quirk0, 1Allow renewal of leases not in the DHCP table. If the router is rebooted for example, a computer will still be allowed to renew a now non-existing lease.
dhcpd_slt(minutes), 0, -1Override lease time for static DHCP leases. 0 means use the same value as the normal DHCP lease. -1 means the lease is "infinite."
dnsmasq_conf(blank)Adds the string to the Dnsmasq configuration.
dstcode5, 0Use new 2007 US rule for daylight savings time. Do not enable before 2007.
dvlrssi0, 1Get wireless RSSI information for Device List.
dvlwds0, 1Get WDS interfaces for Device List.
forcewep00, 1Enables a work-around to a WEP bug. Forces WEP to always use the first index internally.
ifstat0, 1Use ifstat, the tool that watches for byte transfer statistics for the Status page.
klogd0, 1Use klogd to forward kernel messages to syslog. This is also required if you wish to view firewall dropped/accepted connection messages via syslog
log_file0, 1Enable syslog output to /var/log/messages. Used for debugging.
mourowhi0, 1Enables mouse highlighting of table rows on some pages.
noffx0, 1In Firefox 1.0.x, drop-down listboxes are not displayed properly if the last item is selected when the page loads. This disables a work-around for that problem.
tz(unset)Manually set the time zone and daylight savings time using TZ. To use, set the time zone in the GUI to GMT+0 and disable daylight savings time. Example for California: PST8PDT,M4.1.0/2,M10.5.0/2. More information.
STA, WDS & WET Configurations
Security
Not all security settings are supported in STA, WDS and WET modes. The table below lists known working configurations.

 WRT-A / Access Point
WEPWPA/TKIPWPA/AESWPA2/AESWPA2/AES+TKIP
WRT-BWEPSTA,WDS,WET
WPA/TKIPSTA,WDS,WETSTA,WDS
WPA/AESSTA,WDS,WET
WPA2/AESSTA,WDS
WPA2/AES+TKIPSTA
(Tested using two WRT54G/L)


Basic Client Mode Setup
 WRT_AWRT_B
Basic Settings
Internet Connection TypeDHCPDHCP
Router IP192.168.1.1192.168.3.1
DHCP ServerEnabledEnabled
Basic Wireless Settings
Wireless ModeAccess PointClient Mode


Basic WDS Setup
 WRT_AWRT_B
Basic Settings
Internet Connection TypeDHCPDisabled
Router IP192.168.1.1192.168.1.2
DHCP ServerEnabledDisabled
LAN GatewayN/A192.168.1.1
LAN DNSN/A192.168.1.1
Basic Wireless Settings
Wireless ModeWDSWDS
WDS ModeLink to the followingLink to the following
Remote BridgesWireless MAC
of WRT_B
Wireless MAC
of WRT_A


Basic WET Setup
 WRT_AWRT_B
Basic Settings
Internet Connection TypeDHCPDisabled
Router IP192.168.1.1192.168.5.1
DHCP ServerEnabledDisabled
Basic Wireless Settings
Wireless ModeAccess PointWET
Syslog
Syslog is a useful tool that can be used to read the router's debug messages. To use:
  1. Install a syslog daemon on your computer like Kiwi Syslog Daemon or WallWatcher for Windows.
  2. Go to Administration, Log, then enter your computer's IP address.
Building The Firmware
I do not recommend this for everyone, but you don't have to be a total Linux 1337 to do this either (I'm certainly not). An experienced Windows programmer with some Linux experience for example should be able to handle this also.

A Linux x86 PC/VM is needed. A good experience in C programming and a little JavaScript and HTML know how is also required.


1. Download
2. Prepare
3. Configure
Run "make menuconfig" from release/src/router/busybox/ and release/src/router/. You don't have to change anything here since the default options are ok, but you should still run both and save the settings.
4. Build...
Go to release/src/ and run make.

I can't really help any further than this... the rest... you're on your own! Have fun fixing my bugs! :D