OpenWRT BackFire on WRT54G

aughust 2012


This is mostly straight from the OpenWRT site. I'm using the WRT54G v 2.2 mentioned in The LinkSys WRT54G revisited.

Procedure 9.  Debricking

  1. Fail

    I needed to debrick because the installation of OpenWRT failed. That's the reason I'm TFTP'ing an OpenWRT image, as opposed to the latest official firmware.

  2. Unplug the device

    Just power it off.

  3. Connect the WRT54G to a computer

    Put an ethernet cable between the PC and one of the LAN ports of the WRT54G, and give the NIC on the PC an IP:

    apprentice@host:~$ ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up

  4. A little script to upload the new firmware during boot

    The DD-WRT Wiki tells how to interpret the LED blinking at powerup. I adjusted one of the scripts at that page, after reading WRT54 Tips:

    while ! ping -W1 -c1 -q 192.168.1.1 -q >/dev/null 2>&1 ; do sleep .1 ; echo -n . ; done cat <<EOF|tftp 192.168.1.1
    bin
    put openwrt-wrt54g-squashfs.bin
    EOF
    ping 192.168.1.1

    The image can be fetched from the OpenWRT fileserver.

  5. Connect to the web interface

    Directing a browser to 192.168.1.1 shows that the upload somehow did succeed.

Procedure 10.  Ensure TFTP availability

  1. Enable SSH

    From the PC, log onto the WRT54G using telnet, and set the root password.

  2. Enable the TFTP boot timeout

    Following the WRT54G-specific installation HOWTO, say:

    nvram set boot_wait=on
    nvram set boot_time=10
    nvram commit && reboot

  3. Sysupgrade

    Upload openwrt-brcm47xx-squashfs.trx, and, till following the Wiki, do

    root@OpenW:~# sysupgrade /tmp/openwrt-brcm47xx-squashfs.trx

  4. Securing SSH

    Configure DropBear to listen on the WAN port, and make it use keys for root (in /etc/dropbear/authorized_keys), not passwords:

    root@OpenWrt:~# sed -i "/RootPasswordAuth/ s/'on'/'off'/" /etc/config/dropbear

    (We'll restart dropbear later.)

  5. Configure wireless

    root@OpenWrt:~# mv /etc/config/wireless /etc/config/wireless.dist
    root@OpenWrt:~# wifi detect>/etc/config/wireless
    root@OpenWrt:~# sed -i 's/option disabled 1/option disabled 0/' /etc/config/wifi
    root@OpenWrt:~# /etc/init.d/network restart

Procedure 11.  Configuration as Access Point

  • To be documented next time I have time...