Archive for the ‘Router’ Category

installing X-Wrt

June 8, 2008

The approach of OpenWrt(especially compared to DD-Wrt) is more like offering a basic system which can be highly customized, which is the approach I prefer. The standard web interface has limited functionality. X-Wrt is a seperate project that tries to provide a nice user interface, which nearly makes it unnecessary to use the shell, you can configure many things, install/remove packages,  traverse the file system, and you are able to e.g. analyze traffic trough same fancy graphs. And it is pretty easy to install, too. Making the shell obsolete is not my intention tough, as there are many things that can be done with the shell way easier than with some nice looking GUI.

There are different ways to install X-Wrt, I choose the one over ssh.

Connect to your router (note: routerIP being the IP of your router, e.g. ):

ssh root@routerIP

After that add a new source to your /etc/ipkg.conf:

echo “src X-Wrt” >> /etc/ipkg.conf

Now use ipkg to install the X-Wrt package:

ipkg install

This pretty much was it. After a reboot of your router, the Webif² should be display in your browser.(type in your router’s IP in the address bar of course)

the http daemon of OpenWrt doesn’t support a https connection. The root passwort will therefore be transmitted in plain text, which isn’t a clever idea when accessing your router over wlan.

A straightforward solution is:

ssh -L 5000:localhost:80 root@ being the router’s IP.

Now type in the browsers bar: localhost:5000

All information is now tunneled through ssh. Windows users can use Putty for this behavior.

Now go and enjoy your new graphs!



SD Card on OpenWrt

June 8, 2008

I recently switched to OpenWrt, as I had some problems with DD-Wrt and more important I just wanted to try it out. The change was pretty seamless, as most nvram variables are shared and therefore I didn’t even have to change much for the router to work correctly. If you don’t plan to go back to DD-WRT this script cleans up your nvram variables.(deleting those that aren’t used by OpenWrt)

Now you need to download the MMC Card module:

cd /lib/modules/2.4.30


See comments for an alternative link, if the one above doesn’t work.

Your card should be formated with ext2. The drivers for the ext2 filesystem are needed, too. They can be installed via a ipkg package:

ipkg update
ipkg install kmod-ext2

insmod ext2

Now you can test if the card works:

echo “0x9c” > /proc/diag/gpiomask
insmod mmc

mount /dev/mmc/disc0/part1 /mmc

Note: The gpiomask fits to the modification I described in the post below, adapt it corrosponding to your modification.

When I used DD-WRT my card was mounted under /mmc. Installing software in that mount-point caused same problems, hence I decided to mount the SD-Card to the root directory in OpenWRT. This enhances your available memory very seamlessly. Furthermore it would be possibly to have differend SD-cards containing different configurations of OpenWRT. If no card is attached the system will start in the normal behavior. First the needed files will be copied to the card:

mkdir /tmp/root
mount -o bind /rom /tmp/root
mount -o bind / /tmp/root
cp /tmp/root/* /mmc -a

/sbin/init is a link to the busy box init. This will be replaced with our own init script which will do the work for mounting the card to / and after that execute the init of busy box.

rm /sbin/init

This is the new init script(copy paste it to /sbin/init), after that make i executable(chmod +x /sbin/init)

echo “0x9c” > /proc/diag/gpiomask
insmod mmc
insmod ext2

sleep 15s
mount “$boot_dev” /mmc
[ -x /mmc/sbin/init ] && {
mount -o move /proc /mmc/proc && \
pivot_root /mmc /mmc/mmc && {
mount -o move /mmc/dev /dev
mount -o move /mmc/tmp /tmp
mount -o move /mmc/jffs2 /jffs2 2>&-
mount -o move /mmc/sys /sys 2>&-
exec /bin/busybox init

Now reboot. run


to test  if it works correctly. If the router doens’t boot or something doesn’t work as intended you can remove the card an everything should be just like before.

WRT54GL SD-Card Mod

May 17, 2008

Does your router lack some space, too? At least mine did, therefore I attached a SD-card, resulting in 1gig of new fancy space.  It’s a pretty easy mod if you have decent soldering skills. First what materials do you need?

  • up to 1 gig SD/MMC card
  • soldering rod, soldering tin, (soldering skills) and some isolated wire etc.
  • SD card socket
  • Router, for me it is a WRT54Gl v 1.1 from Linksys on which I run ddwrt.

The SD card socket is optional, the SD card can be soldered directly, but then it’s not that easy to exchange the card. My socket is from my old mp3 player, a other possibility is a SD card reader.

Opening the device is a hard task, all the advices on the internet didn’t work for me.

Push where you can see the red dots and then pull down the blue front cover. Maybe you need help from someone. For my the pushing method did not work, therefor I used a screwdriver to remove the front cover.

Now it comes to the soldering part. Where to solder which wires can be viewed on the next picture:

You will need the colors when soldering the socket, what is what you will be doing probably now:

Now solder the corresponding wires, the sixth and the third pin are both on ground and have to be connected. After that you might want to test if everything is working. I use ddwrt 2.4 where everything works just out of the box. First format the SD card, this can be done with the “mke2fs” command in Linux, you can do it with the router too, but thats way slower. The format will be ext2, don’t ask me how do achive this under Windows, you have to googlesearch that. Now just log into the Web GUI, click on “Administration”, and scroll down to “MMC/SD Card Support”.

The picture shows the correct settings. After a reboot go to the status tab. Your card should be listed under “Space Usage”, otherwise something didn’t work. The last step is making a slot in the casing. I made it with a drill. Here the final pictures:

Links: (German)