WRTIMAGE                         HyperWRT Thibor

using PayPal

HyperWRT is a GPL firmware project for the Linksys WRT54G/WRT54GL/WRT54GS and WRTSL54GS wireless routers based on the latest stock Linksys firmware. The original goal of the HyperWRT project was to add a set of features--such as power boost--to the Linux-based Linksys firmware, extending its possibilities but staying close to the official firmware. Over time, it has continued to be updated with newer Linksys firmware, and incorporated many more features typically found in enterprise routing equipment.

The original HyperWRT project was started in 2004 by Timothy Jans (aka Avenger 2.0), with continued development into early 2005. Another programmer called Rupan then continued HyperWRT development by integrating newer Linksys code as it was released.

Later in 2005, I picked up HyperWRT development with another developer called tofu with HyperWRT Thibor for the WRT54GS and HyperWRT +tofu for the WRT54G. We frequently collaborated and added features from each other's releases.

After February 2006, tofu discontinued development and his code was incorporated into HyperWRT Thibor. HyperWRT Thibor is the most current version of HyperWRT as of March 2006.

Features
Downloads
Current version firmware downloads can be found here:

model serial no. prefix upgrade from stock firmware upgrade from HyperWRT
WRT54G v1-v4 CDF0-CDF9,CDFA HyperWRT G Thibor15c HyperWRT G Thibor15c
WRT54G v5-v7 CDFB not compatible not compatible
WRT54GL CL7A HyperWRT G Thibor15c HyperWRT G Thibor15c
WRT54GS v1-v3 CGN0-CGN5 HyperWRT GSv3 Thibor15c HyperWRT GSv3 Thibor15c
WRT54GS v4 CGN6 HyperWRT GSv4 Thibor15c HyperWRT GSv4 Thibor15c
WRT54GS v5-v6 CGN7 not compatible not compatible
WRTSL54GS CJK0 HyperWRT SL Thibor17c HyperWRT SL Thibor17c

There are no code differences between my G, GS, and GSv4 versions. They are completely identical in appearance and functionality, and all built on a GSv3 code base. The only difference in the files is the codepattern header that the Linksys stock firmware looks for when upgrading or using tftp.

Also, if you are changing from one firmware type to another (i.e. Sveasoft to HyperWRT, or DD-WRT to HyperWRT, or even tofu to Thibor) you should always "Clear NVRAM, restore factory defaults" from the Administration page, Factory Defaults tab after flashing with HyperWRT Thibor. Not erasing NVRAM and restoring the defaults is the cause of many odd and unreproducable issues.

Older version firmware downloads can be found here:

  • Thibor 15a for the WRTSL54GS
  • Thibor 15b3 for the WRT54GSv1-3
  • Thibor 15b3 for the WRT54GSv4
  • Thibor 15b3 for the WRT54Gv1-4
  • Thibor 14 for the WRT54GSv1-3
  • Thibor 14 for the WRT54GSv4
  • Thibor 14 for the WRT54Gv1-4
  • Thibor 14 for the WRTSL54GS
  • Thibor 13d
  • Thibor13d for the GSv4, Upgrades from stock firmware
  • Thibor 13c
  • Thibor13c for the GSv4, Upgrades from stock firmware
  • Thibor 12+wol

    Source Code Downloads can be downloaded here:

  • Thibor15c Sourcecode for the WRT54G/WRT54GS/WRT54GL
  • Thibor15a Sourcecode for the WRTSL54GS
  • Thibor14 Sourcecode
  • Thibor13c SourceCode
  • Thibor12a+wol Sourcecode

    using PayPal
    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 you are using Firmware compatible for your router. There are two basic versions of HyperWRT Thibor: G/GL/GS (using GSv3 codebase) and SL (using SL codebase). However, there are different firmware files for the G/GL/GS, and the correct one to use depends on the firmware version that will be upgrading to HyperWRT Thibor.

    • If you're running any earlier version of HyperWRT (i.e. Avenger's 2.0/2.1b, Rupan, qwerty, tofu, or Thibor), flash with the respective Thibor firmware: G or GS. See my note below for the WRT54G/WRT54GL.
    • If you're running with a stock WRT54GS v1-v3, flash with HyperWRT Thibor GS.
    • If you're running with a stock WRT54GS v4, flash with HyperWRT Thibor GSv4. This is absolutely the one and only time you should flash with this version. Once you flash with this version, the code running on the router is the same as HyperWRT Thibor GS.
    • If you're running with a WRT54GS v5 or WRT54G v5, HyperWRT is not compatible with your router. This is due to these models having less flash memory than previous models.
    • If you're running a WRT54G or a WRT54GL, you will need to use the G/GL version initially. I have not tested this as I don't have a G or GL router. Many have reported that it is working though.
    • No version of HyperWRT has been developed at this time for other WRT54* models like the WRT54GC, WRT54GR, WRT54GX, etc.
    Some recommendations:
    • Avoid upgrading over a wireless connection since they can drop out.
    • If you're using DHCP on your computer, renew the lease early or reboot your computer to make sure it doesn't try to renew (and possibly unbind) in the middle of the upgrade. In Windows, you can renew the lease by running "ipconfig /renew".
    • Do not hit stop, or navigate away from the upgrade page. Do not reboot, or unplug the router. Do not do anything to interrupt the upgrade or you may end up with a dead brick.
    • It will take a few minutes for the firmware to upload. Upload progress bars are based on time, not the amount of data uploaded so don't worry if it goes past 100% and loops back again, or if it doesn't reach 100% at all.
    • Once the upgrade is finished, you will see a page indicating the result and then router will reboot on its own. If the page appears broken or empty, wait for one minute, make sure the router doesn't have a flashing diag or power light, then load http://192.168.1.1/ manually.
    • If you upgraded from a different firmware, erase any left over settings and restore the defaults by going to Administration:Factory Defaults and choosing Clear NVRAM. Manually re-enter the settings, do not use the Restore feature.
    • If for any reason a firmware upgrade fails, you have to reboot the router before trying again.
    To upgrade: Go to the Administration page, Firmware Upgrade, then upload the file "code.bin."
    Changelog
    15c
    • Fixed Access Restrictions screwing with ipaddr and macaddr blocking.
    • Added bf1942, battlefield2, CounterStrike, CS:Source and MSN File Transfers to Applications list in QoS.asp.
    • Made menu lists grey in QoS.asp
    • Made text boxes in DMZ.asp larger.
    15b3
    • Fixed DDNS....yet again, pptp fix broke it.
    • integrated changes to DMZ.asp I've been working on.
    15b2
    • Fixed Zoneedit.
    • Fixed PPTP not giving correct IP to DDNS.
    • Fixed WOL.
    • Fixed Logging bug.
    • Fixed Large file transfer issue for Gv2.2 type. enter "nvram set cpu_overdrive=1;nvram_commit" in the command page, or via Telnet/SSH.
    • Fixed rtsp_conntrack.
    15b1
    • Added Zoneedit to DDNS.
    15b
    • Fixed cosmetic QoS page bug that caused Summary not to show.
    15a
    • Fixed Access Restrictions not working(G/GS/GL).
    • Changed Logon Prompt to Router Name(G/GS/GL).
    • Added Prioritize ACK & ICMP to QoS page(G/GS/GL).
    • Added rtsp_conntrack to the kernel(G/GS/GL).
    • Added Qwerty's Etherwake mod to busybox(G/GS/GL).
    • Fixed some screwy web gui code in QoS.asp(G/GS/GL).
    • Fixed Reboot command not working. a busybox issue.
    • Added GUI RW support for NTFS, REISERFS, EXT2, EXT3, FAT, FAT32. Only FAT32 can be claimed by the router though. Perhaps a skilled user will make the mkfs.ntfs, mkfs.reiserfs, mkfs.ext2, etc as addons.
    • Wol didn't work. Until qwerty gets to update it, i have changed over to Ether-wake which is present in Busybox.
    15
    • Using 4.71.1 Codebase(WRT54G/GS/GL Only).
    • Added Progressive QoS and Integrated Layer7 support(WRT54G/GS/GL Only).
    • Added PPTP DHCP Option to Index.asp(WRT54G/GS/GL Only).
    • Using 2.00.5 Codebase(WRTSL54GS Only).
    • Updated to Busybox version 1.1.2
    • Updated Iptables to version 1.3.5
    • Updated Dropbear to version 0.48.1 and integrated Rupan's patch
    • Added Layer7 support to the command line. the Protocols are in /etc/l7-protocols.
    • Fixed Numerous Web Page bugs.
    • Integrated grcore's dhcp patch for when the LAN is disabled.
    • Updated Log page.
    • Updated HRedirect.asp to reflect it's redirect, not forwarding.
    • Added Service Type for PPPoE.
    • Fixed Dial On Demand bug, P2P QoS was the cause; i've removed it for now.
    • Fixed Incorrect UPnP IGD Name.
    • Integrated jchuit's ddns.c to fix ddns not updating.
    • The Iptables matches installed are:layer7, ipp2p, webstr, string, limit, multiport, comment, addrtype, tcpmss, u32, connlimit, connmark, state, psd, tos, mac, mark, iprange, icmp, time.
    • The Iptables targets installed are:TTL, MARK, CONNMARK, IPMARK, DNAT, SNAT, LOG, REDIRECT, CLASSIFY, IMQ, DSCP, TOS, REJECT, TCPMSS, MASQUERADE, autofw, TRIGGER.
    • All fixes and additions are relevant to ALL versions(G/GS/SL) with the exception of codebase changes.
    • Thibor15 for the WRT300N is coming soon...
  • 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 addre s 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
    Key Values (default in bold) Description
    ajax 0, 1 Use XMLHTTP in Device List and Site Survey. Allows these pages to update the information without reloading the entire page.
    capfix 0, 1 On some browsers like Opera, the text "Capture()" is displayed instead of the correct one. This variable enables a work-around to the problem.
    dhcpc_ckps 0, 1 If enabled, udhcpc is always kept running. If it crashes for example, udhcpc is restarted.
    dhcpd_auth 0, 1 Allow dnsmasq to be the authoritative server.
    dhcpd_quirk 0, 1 Allow 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, -1 Override 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.
    dstcode 5, 0 Use new 2007 US rule for daylight savings time. Do not enable before 2007.
    dvlrssi 0, 1 Get wireless RSSI information for Device List.
    dvlwds 0, 1 Get WDS interfaces for Device List.
    forcewep0 0, 1 Enables a work-around to a WEP bug. Forces WEP to always use the first index internally.
    ifstat 0, 1 Use ifstat, the tool that watches for byte transfer statistics for the Status page.
    klogd 0, 1 Use klogd to forward kernel messages to syslog. This is also required if you wish to view firewall dropped/accepted connection messages via syslog
    log_file 0, 1 Enable syslog output to /var/log/messages. Used for debugging.
    mourowhi 0, 1 Enables mouse highlighting of table rows on some pages.
    noffx 0, 1 In Firefox 1.0.x, drop-down listboxes are not displayed properly if the last item is selected when the page loads. This enables 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.
    • 0 (zero) usually means off, and 1 (one) usually means on.
    • To set an nvram variable, use telnet or click the Administration tab, then the Run Comamnd button. Use the following format: "nvram set key=value". Ex: "nvram set capfix=1".
    • To remove an nvram variable and use the default setting, use "nvram unset key". Ex: "nvram unset capfix".
    • To get a list of all the nvram settings, use "nvram show".
    • To permanently save the changes, use "nvram commit".
    • A reboot may be needed before some changes go into effect.
    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
    WEP WPA/TKIP WPA/AES WPA2/AES WPA2/AES+TKIP
    WRT-B WEP STA,WDS,WET
    WPA/TKIP STA,WDS,WET STA,WDS
    WPA/AES STA,WDS,WET
    WPA2/AES STA,WDS
    WPA2/AES+TKIP STA
    (Tested using two WRT54GS)


    Basic Client Mode Setup
      WRT_A WRT_B
    Basic Settings
    Internet Connection Type DHCP DHCP
    Router IP 192.168.1.1 192.168.3.1
    DHCP Server Enabled Enabled
    Basic Wireless Settings
    Wireless Mode Access Point Client Mode


    Basic WDS Setup
      WRT_A WRT_B
    Basic Settings
    Internet Connection Type DHCP Disabled
    Router IP 192.168.1.1 192.168.1.2
    DHCP Server Enabled Disabled
    LAN Gateway N/A 192.168.1.1
    LAN DNS N/A 192.168.1.1
    Basic Wireless Settings
    Wireless Mode WDS WDS
    Bridge Restrict Enabled Enabled
    Remote Bridges Wireless MAC
    of WRT_B
    Wireless MAC
    of WRT_A


    Basic WET Setup
      WRT_A WRT_B
    Basic Settings
    Internet Connection Type DHCP Disabled
    Router IP 192.168.1.1 192.168.2.1
    DHCP Server Enabled Disabled
    Basic Wireless Settings
    Wireless Mode Access Point WET
    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.
    Firewall Builder
    An application named Firewall Builder can now be used to compile a custom Firewall Ruleset for the WRT.
    1. To make this application compatible with Hyperwrt you will need to replace a file named linksys.xml in the "%installdir/resources/os" folder with this one: linksys.xml
    2. For instructions regarding configuration, see the Linksys/Sveasoft slideshow tutorial on their Website.
    SSHD
    SSH is now installed i the WRT. The only valid user is root. To access it, you can either:
    1. Use the usual webgui password (default:admin) 
    2. install a pubkey by pasting it into the box provided. You can use PuTTYGen or Linux to create the SSH key if you don't have one.
    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
    • Extract Linksys' source code.
    • Link, copy or move tools/brcm to /opt/brcm.
    • Add /opt/brcm/hndtools-mipsel-linux/bin and /opt/brcm/hndtools-mipsel-uclibc/bin to your PATH.
    • Remove the existing busybox, udhcpd, dnsmasq, ntpclient, and iptables directory. They will be replaced.
    • Extract the thibor15c source code into release/ and overwrite the existing files.
    • the "v4tools" directory is specifically for creating the GSv4 codepattern. if you are creating v4 version firmware rename "tools" to "v3tools" and then "v4tools" to "tools". Use the same procediure for the G with gtools.
    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.(edit: under busybox you should check that networking/wakeonlan is selected)
    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