Search blogs
Did you find a problem ? Tell us about it! Get a blog Report blog Random blog

Asus WL-500g Premium/Deluxe, dd-wrt and USB

Posted on 07/06/2006

First, install the folowing modules :

  ipkg install kmod-usb-uhci // this is for USB 1.1
  ipkg install kmod-usb-core
  ipkg install kmod-usb2
  ipkg install kmod-usb-storage

The script below executes on every reboot all *.startup scripts located in /jffs/etc/config/

  console mode
  > ~ # nvram set rc_startup="
  > for I in `/bin/ls /jffs/etc/config/*.startup`
  > do
  >    sh $I &
  > done
  > "
  > ~ # nvram commit
  >
  web interface mode
  for I in `/bin/ls /jffs/etc/config/*.startup`
    do
      sh $I &
  done

A startup script must be made to start usb drivers on every reboot. Create a file, usb.startup in /jffs/etc/config/ directory that contains this :

 #!/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
 # remove the dash (#) from the line below if you use USB 1.1
 #insmod /jffs/lib/modules/2.4.30/uhci.o
 insmod /jffs/lib/modules/2.4.30/sd_mod.o

This is it. Here's my dmesg from Asus WL-500gP

  dmesg
  SCSI subsystem driver Revision: 1.00
  Initializing USB Mass Storage driver...
  usb.c: registered new driver usb-storage
  USB Mass Storage support registered.
  uhci.c: USB Universal Host Controller Interface driver v1.1
  PCI: Enabling device 01:03.0 (0000 -> 0001)
  uhci.c: USB UHCI at I/O 0x100, IRQ 2
  usb.c: new USB bus registered, assigned bus number 2
  hub.c: USB hub found
  hub.c: 2 ports detected
  PCI: Enabling device 01:03.1 (0000 -> 0001)
  uhci.c: USB UHCI at I/O 0x120, IRQ 2
  usb.c: new USB bus registered, assigned bus number 3
  hub.c: USB hub found
  hub.c: 2 ports detected

Now to access FAT/EXT partitions you must install
  ipkg install kmod-vfat
  ipkg install kmod-ext2
  ipkg install kmod-ext3

Add to /jffs/etc/config/usb.startup
   insmod /jffs/lib/modules/2.4.30/fat.o
   insmod /jffs/lib/modules/2.4.30/vfat.o

Now dmesg should show (The example below is from a 80 GB HD)
  Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
  SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
  Partition check:
  /dev/scsi/host0/bus0/target0/lun0

To mount a partition
 mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
 ls -l /mnt

You can also add the above line to /jffs/etc/config/usb.startup to mount the partition on reboot

 # multiple partitions
 mkdir /tmp/usb/1
 mount /dev/scsi/host0/bus0/target0/lun0/part1 /tmp/usb/1
 # list its contents
 ls -l /tmp/usb/1
 # second partition
 mkdir /tmp/usb/2
 mount /dev/scsi/host0/bus0/target0/lun0/part2 /tmp/usb/2
 # list its contents
 ls -l /tmp/usb/2

 

Tags: asus , wl-500gp , router , wi-fi , dd-wrt , usb
These icons link to social bookmarking sites where readers can share and discover new web pages. Bookmark page
  • digg
  • del.icio.us
  • YahooMyWeb
  • Furl
  • Fark
  • Ma.gnolia
  • Reddit
  • Smarking
  • Spurl
  • NewsVine
  • blinkbits
  • Yahoo Messenger
Razvan @ 13:46
Filed under: stuff

2 Comments for 'Asus WL-500g Premium/Deluxe, dd-wrt and USB' »

  1.  
    Sergiu
    August 20 2008 | 10:50
     
    Any idea how to put an USB hard disk in standby mode after 10 minutes of inactivity?
  2.  
    mythnick mythnick's home page
    September 28 2010 | 14:19
     
    salut dar daca am un wl-500w si vreAU sa il folosesc ca si client de torrent impreuna cu un hdd extern pe usb am deja instalat pe el dd-wrt (not big) si as vrea sa dea mount automat ??? can i do that ???

No trackbacks have been added to this post yet.

Leave a comment





Human test

Information for comment users
Your e-mail address is never displayed. Please consider what you're posting.