Archive

Posts Tagged ‘Asus Wl500gP2’

USB on Asus Wl500g Premium v2

August 26th, 2009 No comments

Enable USB Support from DD-WRT Web Interface
The first step is to enable USB support from the DD-WRT web interface. Open your favorite web browser and type “http://192.168.1.1” in the address bar and hit “Enter“. Once you log into the DD-WRT control panel, select “Services” -> “USB“. Enable the USB supports that you need. Then hit “Save” and “Apply Settings” buttons on the bottom. The router will reboot.

DD-WRT USB Support

Prepare USB Flash Drive
I used the open-sourced GParted to partition and format my USB flash drive. Initially I planned to make two partitions on my USB drive: one swap partition and one ext2 partition. After some reading, I found that making a swap partition on USB flash drives is not a good idea. So I eventually made two partitions on my USB drive and formated them as ext2 file system.

Install Ext2 Module
The DD-WRT firmware (dd-wrt.v24-12714_NEWD_mini_usb.bin) I uploaded to my Asus Wl500gP2 router supports fat, vfat, ext3 file systems out of the box. However, it doesn’t support the ext2 file system. Therefore, I need to install an ext2 module on the router. You can check if your firmware supports the ext2 file system by issuing lsmod command and checking if ext2 is listed as a loaded module.

To install ext2 module, use the following command:

ipkg install kmod-ext2

Now use lsmod command to see if ext2 is loaded.

Enable JFFS from DD-WRT Web Interface
Again open your favorite web browser and log into the router’s DD-WRT control panel.

  • Under “Administration” -> “Management“: Enable JFFS2 and Clean JFFS2.
  • Save” and then “Apply Settings“.
  • Reboot the router.

Mount USB Flash Drive

  • Insert your partitioned and formatted USB drive into an available USB port and restart the router to force detection.
  • Check the /dev tree to see if your USB device was detected:
    root@DD-WRT:~# find /dev/scsi
    /dev/scsi
    /dev/scsi/host0
    /dev/scsi/host0/bus0
    /dev/scsi/host0/bus0/target0
    /dev/scsi/host0/bus0/target0/lun0
    /dev/scsi/host0/bus0/target0/lun0/disc
    /dev/scsi/host0/bus0/target0/lun0/part1
    /dev/scsi/host0/bus0/target0/lun0/part2
  • You will see a partN entry for each detected partition. Use following commands to verify that they can be mounted and written to:

    cd/
    mount -o noatime,nodiratime /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
    echo HELLOWORLD > /mnt/readme
    umount /mnt
  • The above steps should complete without error. Repeat for all partitions.
  • The noatime mount option disables the file system from automatically updating the last accessed time stamp, a common tactic to reduce writes on flash media.
  • The nodiratime mount option disables the file system from automatically updating the directory last accessed time stamp, also a common tactic to reduce writes on flash media.

Automatically Mount USB Flash Drive

  • You can now set them to mount automatically at boot by adding commands to a usb.startup script:

    mkdir -p /jffs/etc/config
    echo "mount -o noatime,nodiratime /dev/scsi/host0/bus0/target0/lun0/part1 /mnt" > /jffs/etc/config/usb.startup
    echo "mount -o noatime,nodiratime /dev/scsi/host0/bus0/target0/lun0/part2 /mmc" >> /jffs/etc/config/usb.startup
    chmod +x /jffs/etc/config/usb.startup
  • The contents of usb.startup will be executed automatically at boot, there is nothing you have to do to enable this, other than create the file and give it execute permissions (shown above).
  • Reboot the router and verify that the partitions mount automatically by running the mount command:

    root@DD-WRT:~# mount | grep -i part
    /dev/scsi/host0/bus0/target0/lun0/part1 on /mmc type ext3 (rw,noatime,nodiratime)
    /dev/scsi/host0/bus0/target0/lun0/part2 on /mnt type ext3 (rw,noatime,nodiratime)

Reference
DD-WRT: USB on ASUS WL500g Premium v2

Categories: Tips and Tricks Tags: ,

Flash Asus Wl500g Premium v2 to DD-WRT

August 24th, 2009 No comments

Legal Stuff First
Flashing the firmware of your router is done at your own risk. There are NO warranties.

Before Flashing

  • Download the correct version of the DD-WRT firmware for your router from DD-WRT Download Page. I needed USB support out of the box so I chose eko’s latest firmware (dd-wrt.v24-12714_NEWD_mini_usb.bin).
  • Temporarily disable your firewall, PeerGuardian and other such software that can interfere with the flashing processes (like Firmware Restoration Tool/Device Discovery).
  • Disable all but one network interfaces on your PC. This is nessesary because Asus Firmware Restoration Tool is not very intelligent in finding the correct interface to use for communicating with the router.
  • Configure Windows TCP/IP networking to have a static IP address 192.168.1.10.
  • Allways use a wired connection to upload the firmware. Do NOT use wireless connection.

Flashing
Although flashing firmware through the web interface is the preferred method, it didn’t work for me. I had to upload the DD-WRT firmware using Asus Firmware Restoration Tool. This needs the following steps:

  • Do a 30/30/30 reset on the router.
  • [Asus routers only] Power cycle the router to get out of the recovery mode.
  • Disconnect the router’s power cable.
  • Press the “Restore” button on the back of the router.
  • Keep pressing the “Restore” button while plugging in the power cable again.
  • Keep pressing the “Restore” button until the “Power” LED starts flashing slowly.
  • Start Asus Firmware Restoration Tool on your PC (You can find this tool on the CD or download it from the Asus website).
  • Select the correct firmware file you want to upload. Double check to make sure it’s the correct one!
  • Press “Upload” button and wait.
  • Once the firmware flashing process has completed, wait for at least three minutes for the firmware to write information to the nvram.

After Flashing

  • Do a power cycle of the router. Unplug the power cord, count to 30 and plug it back in.
  • Wait for the lights to return to normal. This usually takes about two minutes.
  • Do another 30/30/30 reset on the router.
  • [Asus routers only] Power cycle the router to get out of the recovery mode.
  • Reconfigure the router using the web interface. Do not restore your old settings by uploading an old configuration file, especially when there’s a big version difference between the old and the new firmware. Your router might become very unstable if you do that!

Reference
Styno, Firmware Updating Howto.

Categories: Tips and Tricks Tags: ,