Skip to main content

WRT54GL & UNIBlocks

Linksys WRT54GL is a well known very hackable WiFi router.
Of the numerous open source (and some closed source) software available for extending the functionality of this router, DD-WRT is the most popular. DD-WRT is a linux based replacement firmware (Wikipedia Entry | Official Site).

DD-WRT allows one to connect a SD Card to the router. The SD card can be used to store logs, webpages etc..
The following webpages describe the hardware modification required to add a SD Card to the router:
DD-WRT Wiki | craig at powco

DD-WRT also dumps system messages one one of its two serial ports. The serial ports can be accessed by connecting then to your Computer's COM Port via a RS-232 Level Translator. The modification goes something like this.

Well, as it turns out, UNIBlocks are pretty convenient to get these mods done. Here are some photos on how I did it!




Here is the screen shot of the console output I received from DD-WRT over Serial Port 0 when I first attached a 16MB SD Card to it. The 1GB SD card show in the photo above was giving me problems (it was probably because of the bad flash block that it might have developed over the months of use or might be because that support for larger memory cards in DD-WRT is not complete, I had also tried to work a brand new 2GB SD card with it - the router detected the card alright this time but it kept rebooting!):


Screenshot of the webpage showing the memory capacity of the SD Card:


And finally, you can use WinSCP to browse the file system on the router and copy files to and fro. The SD card is formatted automatically by the router with the ext2 filesystem. The card is mounted in /dev/mmc.
More on this here: http://www.dd-wrt.com/wiki/index.php/WinSCP








Here's text for the console output:

CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Tue Jun 20 16:22:41 CST 2006 (root@localhost.localdomain)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena
Initializing Devices.

No DPN
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.37.0
CPU type 0x29008: 200MHz
Total memory: 16384 KBytes

Total memory used by CFE: 0x80300000 - 0x803A39C0 (670144)
Initialized Data: 0x803398D0 - 0x8033BFE0 (10000)
BSS Area: 0x8033BFE0 - 0x8033D9C0 (6624)
Local Heap: 0x8033D9C0 - 0x803A19C0 (409600)
Stack Area: 0x803A19C0 - 0x803A39C0 (8192)
Text (code) segment: 0x80300000 - 0x803398D0 (235728)
Boot area (physical): 0x003A4000 - 0x003E4000
Relocation Factor: I:00000000 - D:00000000

Boot version: v3.7
The boot is CFE

mac_init(): Find mac [00:1A:70:5A:92:0D] in location 0
Nothing...

eou_key_init(): Find key pair in location 0
The eou device id is same
The eou public key is same
The eou private key is same
Device eth0: hwaddr 00-1A-70-5A-92-0D, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Reading :: Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3856 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
CPU ProcId is: 0x00029008, options: 0x0000004d
Linux version 2.4.37 (root@dd-wrt) (gcc version 3.4.6 (OpenWrt-2.0)) #7585 Sat Oct 10 02:08:51 CEST 2009
Setting the PFC to its default value
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
CPU: BCM5352 rev 0 at 200 MHz
Using 100.000 MHz high precision timer.
Calibrating delay loop... 199.47 BogoMIPS
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
PCI: Setting latency timer of device 00:01.0 to 64
PCI: Setting latency timer of device 00:05.0 to 64
sb_doattach: incoming bus is PCI but it's a lie, switching to SB devid:0x4320
PPPoL2TP kernel driver, V0.13
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v3.3 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 262144
Physically mapped flash: Filesystem type: squashfs, size=0x2a491b
partition size = 2798592
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x003f0000 : "linux"
0x00124c00-0x003d0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x003d0000-0x003f0000 : "ddwrt"
sflash not supported on this router
Initializing Cryptographic API
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
ip_conntrack version 2.1 (512 buckets, 4096 max) - 336 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
ipt_random match loaded
netfilter PSD loaded - (c) astaro AG
ipt_osf: Startng OS fingerprint matching module.
ipt_IPV4OPTSSTRIP loaded
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
802.1Q VLAN Support v1.8 Ben Greear
All bugs added by David S. Miller
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
starting Architecture code for broadcom
Booting device: Linksys WRT54G/GL/GS
loading sysinit
boardflags are 0x2558
enable Afterburner, boardflags are 0x2758
sh: can't create /proc/switch/eth1/reset: nonexistent directory
sh: can't create /proc/sys/net/ipv4/tcp_congestion_control: nonexistent directory
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
Size = 14560, hardsectsize = 512, sectors = 29120
VFS: Can't find ext2 filesystem on dev mmc(121,1).
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
3632 inodes, 14528 blocks
726 blocks (5.00%) reserved for the super user
First data block=1
2 block groups
8192 blocks per group, 8192 fragments per group
1816 inodes per group
Superblock backups stored on blocks:
8193

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
eth1: Operation not supported
wl0.1: No such device
wl0.2: No such device
wl0.3: No such device
eth1: Invalid argument
eth1: Invalid argument
br0: Bad file descriptor
br0: Bad file descriptor
eth1: Operation not supported
wl0.1: No such device
wl0.2: No such device
wl0.3: No such device
eth1: Invalid argument
eth1: Invalid argument
SIOCGIFFLAGS: No such device
vlan1: Setting MAC address to 00 1a 70 5a 92 0e.
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
need_reboot=1: committing changes
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
nvram_commit(): end
Restarting system.
Please stand by while rebooting the system...


CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Tue Jun 20 16:22:41 CST 2006 (root@localhost.localdomain)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena
Initializing Devices.

No DPN
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.37.0
CPU type 0x29008: 200MHz
Total memory: 16384 KBytes

Total memory used by CFE: 0x80300000 - 0x803A39C0 (670144)
Initialized Data: 0x803398D0 - 0x8033BFE0 (10000)
BSS Area: 0x8033BFE0 - 0x8033D9C0 (6624)
Local Heap: 0x8033D9C0 - 0x803A19C0 (409600)
Stack Area: 0x803A19C0 - 0x803A39C0 (8192)
Text (code) segment: 0x80300000 - 0x803398D0 (235728)
Boot area (physical): 0x003A4000 - 0x003E4000
Relocation Factor: I:00000000 - D:00000000

Boot version: v3.7
The boot is CFE

mac_init(): Find mac [00:1A:70:5A:92:0D] in location 0
Nothing...

eou_key_init(): Find key pair in location 0
The eou device id is same
The eou public key is same
The eou private key is same
Device eth0: hwaddr 00-1A-70-5A-92-0D, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Reading :: Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3856 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
CPU ProcId is: 0x00029008, options: 0x0000004d
Linux version 2.4.37 (root@dd-wrt) (gcc version 3.4.6 (OpenWrt-2.0)) #7585 Sat Oct 10 02:08:51 CEST 2009
Setting the PFC to its default value
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
CPU: BCM5352 rev 0 at 200 MHz
Using 100.000 MHz high precision timer.
Calibrating delay loop... 199.47 BogoMIPS
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
PCI: Setting latency timer of device 00:01.0 to 64
PCI: Setting latency timer of device 00:05.0 to 64
sb_doattach: incoming bus is PCI but it's a lie, switching to SB devid:0x4320
PPPoL2TP kernel driver, V0.13
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v3.3 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 262144
Physically mapped flash: Filesystem type: squashfs, size=0x2a491b
partition size = 2798592
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x003f0000 : "linux"
0x00124c00-0x003d0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x003d0000-0x003f0000 : "ddwrt"
sflash not supported on this router
Initializing Cryptographic API
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
ip_conntrack version 2.1 (512 buckets, 4096 max) - 336 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
ipt_random match loaded
netfilter PSD loaded - (c) astaro AG
ipt_osf: Startng OS fingerprint matching module.
ipt_IPV4OPTSSTRIP loaded
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
802.1Q VLAN Support v1.8 Ben Greear
All bugs added by David S. Miller
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
starting Architecture code for broadcom
Booting device: Linksys WRT54G/GL/GS
loading sysinit
boardflags are 0x2558
enable Afterburner, boardflags are 0x2758
sh: can't create /proc/switch/eth1/reset: nonexistent directory
sh: can't create /proc/sys/net/ipv4/tcp_congestion_control: nonexistent directory
mmc: starting module with: SD_DI=0x4, SD_DO=0x10, SD_CLK=0x8, SD_CS=0x80
Size = 14560, hardsectsize = 512, sectors = 29120
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
eth1: Operation not supported
wl0.1: No such device
wl0.2: No such device
wl0.3: No such device
eth1: Invalid argument
eth1: Invalid argument
br0: Bad file descriptor
br0: Bad file descriptor
eth1: Operation not supported
wl0.1: No such device
wl0.2: No such device
wl0.3: No such device
eth1: Invalid argument
eth1: Invalid argument
vlan1: Setting MAC address to 00 1a 70 5a 92 0e.
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
Apply:submit_button=[Management] service=[management] sleep_time=[0] action=[4]
nvram_commit(): end

Comments