Linksys WRTSL54GS

From DD-WRT Wiki

Revision as of 16:56, 8 July 2007 by Tjyang (Talk | contribs)
Jump to: navigation, search

Contents

Overview

This page describe installaton of DD-WRT on WRTSL54GS. WRTSL54GS come with a USB port. With this port and DD-WRT firmware, doors are open for many different applications of this hardware.

Running WRT DD-WRT v23 SP2


DD-WRT v23 SP2 std (c) 2006 NewMedia-NET GmbH
Release: 09/15/06 (SVN revision: 3932)

DD-WRT login: root
Password:
==========================================================

 ____  ___    __        ______ _____         ____  _____
 | _ \| _ \   \ \      / /  _ \_   _| __   _|___ \|___ /
 || | || ||____\ \ /\ / /| |_) || |   \ \ / / __) | |_ \
 ||_| ||_||_____\ V  V / |  _ < | |    \ V / / __/ ___) |
 |___/|___/      \_/\_/  |_| \_\|_|     \_/ |_____|____/

                       DD-WRT v23 SP2
                   http://www.dd-wrt.com

==========================================================


DD-WRT VeryBusyBox v1.2.1 (2006.09.15-18:06+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 2880      2880         0 100% /
/dev/mtdblock/4           4352      2536      1816  58% /jffs
/dev/mtdblock/4           4352      2536      1816  58% /opt
~ #

Installation Procedures

  • The default lan ip address for wrtsl54gs is 192.168.1.1.
  • Download 23sp2 for WRTSL54GS.
  • Browse Linksys web server.
  • Upgrade the default linksys firmware using the standard version, dd-wrt.v23_wrtsl54gs.bin.
    • There is no need to use the mini-generic one as stated in the hwsupport.txt file.
C:\tmp\dd-wrt.v23_sp2_standard>dir
 Volume in drive C has no label.
 Volume Serial Number is 30F9-EE95

 Directory of C:\tmp\dd-wrt.v23_sp2_standard

02/18/2007  10:56 AM    <DIR>          .
02/18/2007  10:56 AM    <DIR>          ..
09/13/2006  04:59 PM            50,443 changelog.txt
09/15/2006  08:11 PM         3,502,080 dd-wrt.v23_asus.trx
09/15/2006  08:11 PM         3,502,080 dd-wrt.v23_generic.bin
09/15/2006  08:11 PM         3,503,104 dd-wrt.v23_wrt54g.bin
09/15/2006  08:11 PM         3,503,104 dd-wrt.v23_wrt54gs.bin
09/15/2006  08:11 PM         3,503,104 dd-wrt.v23_wrt54gsv4.bin
09/15/2006  08:11 PM         3,503,104 dd-wrt.v23_wrtsl54gs.bin
08/02/2006  04:24 AM             3,108 hwsupport.txt
09/13/2006  05:02 PM               592 notes.txt
               9 File(s)     21,070,719 bytes
               2 Dir(s)  12,612,669,440 bytes free

C:\tmp\dd-wrt.v23_sp2_standard>

Turn on SSHd

Go to web interface (default user in v23sp2 is root, password admin), by default at 192.168.1.1... then go to Administration->Services and turn on Secure Shell -> SSHd and Password Login.

Turn on JFFS2

SSH to your WRTSL45GS and run:

nvram set jffs_mounted=1
nvram set enable_jffs2=1
nvram set sys_enable_jffs2=1
nvram set clean_jffs2=1
nvram set sys_clean_jffs2=1
nvram commit
reboot

This reboot takes a while, be patient and don't power the unit off.

Add more packages

To get USB working, install these packages:

ipkg update
ipkg install kmod-usb-uhci
ipkg install kmod-usb-core
ipkg install kmod-usb2
ipkg install kmod-usb-storage
ipkg install hdparm
ipkg install kmod-vfat
ipkg install kmod-ext2
ipkg install kmod-ext3

Then you need to load the modules:

insmod /jffs/lib/modules/2.4.30/usbcore.o
insmod /jffs/lib/modules/2.4.30/ehci-hcd.o
insmod /jffs/lib/modules/2.4.30/scsi_mod.o
insmod /jffs/lib/modules/2.4.30/usb-storage.o
insmod /jffs/lib/modules/2.4.30/sd_mod.o

Modules won't stay loaded across reboots - see USB howto for more: USB wiki page. Basically, you want to make your own startup script in /jffs/etc/config. Make sure it ends in .startup, like myscript.startup.

My script:

#!/bin/sh
insmod /jffs/lib/modules/2.4.30/usbcore.o
insmod /jffs/lib/modules/2.4.30/ehci-hcd.o
insmod /jffs/lib/modules/2.4.30/scsi_mod.o
insmod /jffs/lib/modules/2.4.30/usb-storage.o
insmod /jffs/lib/modules/2.4.30/sd_mod.o
insmod /jffs/lib/modules/2.4.30/fat.o
insmod /jffs/lib/modules/2.4.30/vfat.o
insmod /jffs/lib/modules/2.4.30/ext2.o
insmod /jffs/lib/modules/2.4.30/ext3.o
sleep 2

mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
mount /dev/scsi/host0/bus0/target0/lun0/part2 /opt

Note that scripts in /jffs/etc/config appear to run in parallel!

Getting Samba2 running

This isn't easy! when I did ipkg-install samba, it was broken (running a binary gives you a bad symbol or something about fstat64).

How I did it: use Optware, with opt mounted on your USB HD (see my script above). Yeah, you've gotta mount /opt somewhere because the samba2 package alone is >7mb!

When optware is installed and working, ipkg-opt install samba2 should fix you up.


Turn on SNMP monitoring

This router device can be monitored by a SNMP Manager.

Dude, a free network monitoring tool

Enable snmp client on dd-wrt v23 sp2

  • snmp client dd-wrt support both snmp v1 and v2.
  • see following screenshot.

Image:Wrtsl54gs-snmpv2-dude.jpg

USB Hard disk

  • WD 1600JB External
<6>usb.c: USB disconnect on device 01:02.2-1 address 2
<6>hub.c: new USB device 01:02.2-1, assigned address 3
<6>scsi1 : SCSI emulation for USB Mass Storage devices
<0>  Vendor: WD        Model: 1600JB External   Rev: 0108
<0>  Type:   Direct-Access                      ANSI SCSI revision: 02
<0>Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0
<0>SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)
<6> /dev/scsi/host1/bus0/target0/lun0: p1
<7>WARNING: USB Mass Storage data integrity not assured
<7>USB Mass Storage device found at 3
~ #

  • mount /dev/scsi/host1/bus0/target0/lun0/part1 /tmp/usb/1
~ # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 2880      2880         0 100% /
/dev/mtdblock/4           4352      1964      2388  45% /jffs
/dev/scsi/host1/bus0/target0/lun0/part1 156250144  10562880 145687264   7% /tmp/usb/1
~ #

  • check, what are the contents ?
~ # ls -l /tmp/usb/1
drwxr-xr-x    2 root     root        32768 Jan 27 15:31 Recycled
drwxr-xr-x    3 root     root        32768 Jan 14 08:45 System Volume Information
drwxr-xr-x    2 root     root        32768 Aug  8  2006 autorun
-rwxr-xr-x    1 root     root           36 Nov 15  2005 autorun.inf
drwxr-xr-x    5 root     root        32768 Aug  8  2006 wd_windows_tools
~ #

USB flash disk

  • Test of its performance.

/tmp # ls -ld /dev/scsi/host0/bus0/target0/lun0/*
brw-------    1 root     root       8,   0 Jan  1  1970 /dev/scsi/host0/bus0/target0/lun0/disc
brw-------    1 root     root       8,   1 Jan  1  1970 /dev/scsi/host0/bus0/target0/lun0/part1
brw-------    1 root     root       8,   2 Jan  1  1970 /dev/scsi/host0/bus0/target0/lun0/part2
brw-------    1 root     root       8,   3 Jan  1  1970 /dev/scsi/host0/bus0/target0/lun0/part3
/tmp # hdparm -tT /dev/scsi/host0/bus0/target0/lun0/part2

/dev/scsi/host0/bus0/target0/lun0/part2:
 Timing cached reads:   156 MB in  2.00 seconds =  78.00 MB/sec
 Timing buffered disk reads:   20 MB in  3.24 seconds =   6.17 MB/sec
/tmp # date
Sun Jul  8 10:38:27 UTC 2007
/tmp #

Hobbit System Monitoring server on WRTSL54GS

TBC.

Hobbit System Monitoring client on WRTSL54GS

TBC.

Known bugs of DD-WRT V23sp2 with WRTSL54GS

  • 192.168.1.1 will not startup after some DD-WRT GUI operation.
    • Fix, close all the exising browser window and power cycle the WRTSL54GS.