tags: cisco linksys linux openwrt router wifi wrtu54g-tm x-wrt
20 Apr 2011 20:59
OK, so some time ago I bought a Linksys WRTU54G-TM. It's powered by Infineon ADM8668 processor (at 200 MHz) and has 64 MB RAM, which makes is pretty powerful router. Also it's really cheap. It looks like this:
The problem with this router is that there was no cool open source software for it. Linksys opened its sources, but I meant something like DD-WRT or OpenWRT. The problem is that the CPU architecture is different from for example the widely known and used WRT54G series.
Nonetheless there was some heavy work done to run a custom Linux firmware on it. After some successes, the author decided to port OpenWRT distribution to this router. And this is how it's done :-).
The OpenWRT is a command-line distribution of Linux for a bunch of routers. There is a web interface called X-Wrt which is installable as a opkg package to the OpenWRT systems, but there is no real information of how to install it on specifically WRTU54G-TM.
The good news is it can be done, the bad news is you have to hack it a little (but only very little). So let's go.
First, you need to "update" the software of the router to the OpenWRT version. The reference here is: http://wiki.scottn.us/wrtu54g-tm. Just log in to the router WWW interface, select Administration » Firmware Upgrade and choose this file wrtu54g-tm-openwrt-devel-b5.bin (download it from http://wrt.scottn.us/wrtu54g-tm-openwrt-devel-b5.bin).
This takes a while. Router then reboots. Give it a few minutes to load and install. After that the power LED keeps blinking which is probably a bug (in the official firmware, the LED blinks while the system is loading, but once it's up it lights still).
Connect to one of 4 Ethernet ports and you should be given an address IP in the 192.168.1.* network. If not, assign yourself one (for example 192.168.1.10). Then you can confirm the router is up, by pinging it:
Trying to ssh to it will reveal you can't really do it, since you don't know the root password. This is tricky, but you need telnet to the router:
You'll be given the root shell. Set the password:
You'll need to enter the password twice for confirmation. Don't forget it :-).
Now you can ssh to the router:
Deal with the RSA "host not known" warnings etc, and supply the password you just set.
If you connected the router to the network (by Ethernet cable to the "Internet" port) and your ISP has DHCP server, you should already have the Internet connectiong:
If you need to supply the static IP address, edit the following file:
You can use vim (busybox version) editor:
wan network corresponds to the Internet connection, while lan to the 4-port switch.
In this scenario it's possible you also have to supply the DNS servers, so instead of checking the Internet connectivity by pinging google.com, ping some IP address, like:
Once you have the Internet connection, you can update the packages repositories, so you can install the X-Wrt interface:
mv /etc/opkg.conf /etc/original.opkg.conf
cat > /etc/opkg.conf
Enter the following:
src/gz adm8668 http://wrt.scottn.us/packages
src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/brcm47xx/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
arch all 5
arch brcm47xx 10
arch adm8668 20
… and press Ctrl-D. Your /etc/opkg.conf file should now contain the lines above. Update the repositories:
Install the X-Wrt, which is packed in package named webif:
Now if you point your web browser to http://192.168.1.1/ you should have a poor 404 page. It seems the permissions of the /www directory are wrong. I just did that to fix the problem:
chmod -R a+rX /www
Now you can log to the Web interface in with your login (root) and password.
You can now play with the router settings using the browser :-). Much simpler.