Asus RT-N13U

From DD-WRT Wiki

Revision as of 17:34, 8 August 2010 by ZenKen (Talk | contribs)
Jump to: navigation, search

The Asus RT-N13U rev 1 is now supported and the latest builds are quite stable.

Recently Asus released the revision B1 of the RT-N13U. The B1 revision has a different flash chip, and current images will NOT work on revision B1 of the device. There should be B1 clearly printed on the bottom of your device, if it is of revision B1.

Much thanks to those who got DD-WRT working on the RT-N13U!

Contents

Device Specifications

Power Supply = 12VDC 1,0A

Ethernet Ports = 1x WAN RJ-45 10/100 Base T, 4x LAN RJ-45 10/100 Base T

Antennas = 3x internal antennas

USB ports = 1x USB2.0

Wireless standards supported: 802.11b (max. 11 Mbit/s), 802.11g (max. 54 Mbit/s), 802.11n (max. 300 Mbit/s, 2.4 GHz only)

RAM = 32 MB (64 MB in rev B1)

Flash = 4 MB (8 MB in rev B1)

CPU = Ralink RT3052F clocked at 384 MHz

Flashing DD-WRT to a stock Asus RT-N13U

Firefox sometimes has problems with newer DD-WRT builds. It is recommended that you use either Internet Explorer or Chrome

This works ONLY on revision 1, NOT revision B1!!!

1. Get the latest firmware from the main page (Just search for RTN13U):

http://dd-wrt.com/site/support/router-database

You need the asus-to-ddwrt.trx file for initial flashing.

2. To prevent issues and delays while waiting for DHCP to assign an IP, just set a static IP.

IP: 192.168.1.2 through 192.168.1.254
Netmask: 255.255.255.0
Gateway: 192.168.1.1

It is also recommended that you disconnect all other connections, apart from the one you're working on. Also disable all network adapters, except the one that the RT-N13U is connected to, on the machine you're working on. This is to prevent issues with the Asus Firmware Restoration Utility.

3. Disconnect power adapter from the RT-N13U.

4. Push and hold the button located under the router labeled "restore". While continuing to hold the restore button, plug the power adapter back into the router. If the power LED starts to blink, you can let go of the restore button. The router is now in restore mode.

5. You can now use the Asus Firmware Restoration utility to flash the asus-to-ddwrt.trx image to the router. If you do not have the Asus Firmware Restoration utility, you can install it from the CD included with the router. The process should only take about a minute or two. The Firmware Restoration utility will complete and report that the router is being rebooted, you can now close the utility. Give the router a minute, pull the plug, wait a few seconds, and then reconnect the power.

6. You can now set your network adapter to automatically obtain its IP address again.

7. If the flash was successful, you should be able to access the Web GUI. Enter 192.168.1.1 into your browser, and set a username and password.

Automounting ext3/FAT/FAT32

The following tutorial is provided by Gouryella (taken from http://www.dd-wrt.com/phpBB2/viewtopic.php?p=454647#454647)

The RT-N13U only has 4 MB flash, which is almost full with DD-WRT installed. Ext3 needs an extra 200 KB of storage, and the driver is not present in the DD-WRT firmware yet [BS].

I wrote a smart script that downloads the ext3 driver and mounts the 1st partition to /opt during boot (after WAN is up)


1. Just paste the following into the text box in Administration -> Commands and click Save Startup when complete:

mkdir /tmp/etc/config/
echo "wget http://www.home.karneval.cz/10102207/jbd.ko -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
echo "wget http://www.home.karneval.cz/10102207/mbcache.ko -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
echo "wget http://www.home.karneval.cz/10102207/ext3.ko -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget http://www.home.karneval.cz/10102207/fat.ko -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget http://www.home.karneval.cz/10102207/vfat.ko -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget http://www.home.karneval.cz/10102207/nls_iso8859-1.ko -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget http://www.home.karneval.cz/10102207/nls_cp437.ko -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
echo "insmod /tmp/root/jbd.ko" >> /tmp/etc/config/ext3.wanup
echo "insmod /tmp/root/mbcache.ko" >> /tmp/etc/config/ext3.wanup
echo "insmod /tmp/root/ext3.ko" >> /tmp/etc/config/ext3.wanup
#echo "insmod /tmp/root/fat.ko" >> /tmp/etc/config/ext3.wanup
#echo "insmod /tmp/root/vfat.ko" >> /tmp/etc/config/ext3.wanup
#echo "insmod /tmp/root/nls_iso8859-1.ko" >> /tmp/etc/config/ext3.wanup
#echo "insmod /tmp/root/nls_cp437.ko" >> /tmp/etc/config/ext3.wanup
#echo "rm /tmp/root/*.ko" >> /tmp/etc/config/ext3.wanup
echo "mount /dev/scsi/host0/bus0/target0/lun0/part1 -o noatime,nodiratime /opt" >> /tmp/etc/config/ext3.wanup
chmod +x /tmp/etc/config/ext3.wanup
echo "nobody:*:65000:65000:nobody:/mnt:/bin/false" >> /etc/passwd

Enable the following under Services -> USB:

Core USB Support
USB 2.0 Support
USB Storage Support
Automatic Drive Mount


2. Reboot router with an ext3 formatted USB drive plugged in

If the drive was successfully mounted (which may take some time), uncomment the last echo to save +-500 KB RAM. Uncomment other lines for fat/fat32 support.

Debugging:

dmesg
lsmod
ls /tmp/root
cat /tmp/etc/config/ext3.wanup
ls /tmp/etc/config/

Installing Optware Light

The following tutorial is provided by Gouryella (taken from http://www.dd-wrt.com/phpBB2/viewtopic.php?p=454647#454647)


1. Installing Optware (only to an ext3 drive)

wget http://www.home.karneval.cz/10102207/optware-install.sh -O - | tr -d '\r' > /tmp/optware-install.sh
sh /tmp/optware-install.sh
ipkg update
ipkg upgrade
wget http://www.home.karneval.cz/10102207/sort -P /opt/bin
chmod +x /opt/bin/sort
ipkg install htop iperf libuclibc++ nano samba2 tftp-hpa vsftpd
killall xinetd
rm /opt/etc/samba/smb.conf
rm /opt/etc/vsftpd.conf
rm /opt/etc/xinetd.d/tftp
rm /opt/etc/init.d/S80samba
wget http://www.home.karneval.cz/10102207/smb.conf -P /opt/etc/samba/
wget http://www.home.karneval.cz/10102207/vsftpd.conf -P /opt/etc/
wget http://www.home.karneval.cz/10102207/netbios-ssn -P /opt/etc/xinetd.d
wget http://www.home.karneval.cz/10102207/netbios-ns -P /opt/etc/xinetd.d
wget http://www.home.karneval.cz/10102207/tftp -P /opt/etc/xinetd.d
wget http://www.home.karneval.cz/10102207/vsftpd -P /opt/etc/xinetd.d
wget http://www.home.karneval.cz/10102207/S98iperf -P /opt/etc/init.d
wget http://www.home.karneval.cz/10102207/S99trans -P /opt/etc/init.d
chmod +x /opt/etc/init.d/S98iperf
sh /opt/etc/init.d/S10xinetd
chmod 777 /opt

You now should be able to access /opt/ through ftp://192.168.1.1 or through samba \\192.168.1.1, 192.168.1.1:901 swat.

Note: Change the gateway in optware-install.sh, if you have different IP range.


2. My choices for basic testing:

htop - 0.8.3-1 - An interactive process viewer.
iperf - 2.0.4-1 - A tool for measuring TCP and UDP bandwidth performance.
nano - 2.2.4-1 - A pico like editor
samba2 - 2.2.12-2 - Lightweight Samba suite provides file and print services to SMB/CIFS clients.
tftp-hpa - 5.0-1 - A tftp package (for pxe booting)
vsftpd - 2.2.2-1 - ftp daemon with an emphasis on speed and security
xinetd - 2.3.14-9 - Highly configurable, modular and secure inetd

3. Test results:

USB flash vsftpd speed:

dither 1-2,5MB/s write (checked also USB 2.5" HDD 3.5MB/s constant)
6MB/s read

USB flash samba2 speed:

1MB/s write
4MB/s read

iperf:

67,6Mbit/s CPU usage near max

Transmission daemon running:

http://www.home.karneval.cz/10102207/rt-n13u.png