Asus RT-N13U

From DD-WRT Wiki

Revision as of 20:21, 25 August 2010 by Capper (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!


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):

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: through

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 into your browser, and set a username and password.

Automounting ext3/FAT/FAT32

The following tutorial is provided by Gouryella (taken from

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 -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
echo "wget -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
echo "wget -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget -P /tmp/root/" >> /tmp/etc/config/ext3.wanup
#echo "wget -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.


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

1. Installing Optware (only to an ext3 drive)

wget -O - | tr -d '\r' > /tmp/
sh /tmp/
ipkg update
ipkg upgrade
wget -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 -P /opt/etc/samba/
wget -P /opt/etc/
wget -P /opt/etc/xinetd.d
wget -P /opt/etc/xinetd.d
wget -P /opt/etc/xinetd.d
wget -P /opt/etc/xinetd.d
wget -P /opt/etc/init.d
wget -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 or through samba \\, swat.

Note: Change the gateway in, 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


67,6Mbit/s CPU usage near max

Transmission daemon running:

Installing a Transmission-daemon onto Asus RT-N13U

I have just successfully installed and running this Transmission Torrent thingy

and thanks to "Gouryella" for showing us the light

adopted with slight Modification from [[1]] kudos to anonymous code-angels--Capper 22:07, 25 August 2010 (CEST)

1. Make the following folders

cd /opt
mkdir -p /opt/data/torrents/.config              # -p to make directories at the same time

The plan is to have everything torrent go to the folder /opt/data/torrents

2. Install Optware Transmission

/opt/bin/ipkg-opt -verbose_wget install transmission
Note: I like to see the progress of the downloading process, so I know the right thing is happening. This is done with the -verbose_wget parameter.

3. Started and stopped Transmission to get the basic work folders

/opt/bin/transmission-daemon -g /opt/data/torrents/.config/transmission-daemon
killall transmission-daemon

With the command above you get the basic folder structure of:

/opt/data/torrents/.config/transmission-daemon/settings.json  #file

4. Edit settings.json

nano /opt/data/torrents/.config/transmission-daemon/settings.json

5. Delete contents of settings.json and copy-paste following code into it.

     "blocklist-enabled": 1,
     "download-dir": "\/opt\/data\/torrents",
     "download-limit": 100,
     "download-limit-enabled": 1,
     "encryption": 2,
     "max-peers-global": 35,
     "peer-port": 25000,
     "pex-enabled": 1,
     "port-forwarding-enabled": 1,
     "rpc-authentication-required": 0,
     "rpc-password": "",
     "rpc-port": 9091,
     "rpc-username": "",
     "rpc-whitelist": "192.168.1.*",
     "upload-limit": 200,
     "upload-limit-enabled": 1

The file settings.json can also be downloaded from here (the wget command is one line):

 wget -O /opt/data/torrents/.config/transmission-daemon/settings.json 

but change to "download-dir": "\/opt\/data\/torrents", from "download-dir": "\/mnt\/data\/torrents",

6. Open listening port for WAN access

/usr/sbin/iptables -I INPUT 1 -p tcp --dport 25000 -j logaccept

7. Restart transmission

/opt/bin/transmission-daemon -g /opt/data/torrents/.config/transmission-daemon

8. Accessing Transmission web interface

Now you get web access to the Transmission page by going to That is, if your routers IP is

9. How to get transmission to download torrent files?

     - In a web browser go to your favourite torrent site/tracker and download a "<myfile>.torrent" file
     - In a web browser go to to enter the Transmission web page.
     - click "open"
     - click the text field (or "select" button)
     - point out the "<myfile>.torrent"
     - click "upload"

     and the torrent'ed file should start downloading shortly.

The downloaded file will turn up in the /opt/data/torrents folder.

The full space of the file will be reserved from the start, so in a FTP, WinSCP or Explorer via Samba it may seem like the file is all there immediately, but it is not! It is fully downloaded when the line turns green in the Transmission web interface at

You can see details about any of the torrent files by clicking the Inspector button on the right in the Transmission web interface.

10. Another interface option

You might also want to check out a front-end (remote-GUI) for the rpc version of transmission.

transmission-remote-gui is an application written in Free Pascal to remotely manage Transmission See:

transmission-remote-dotnet is a .NET application written in C# to remotely manage Transmission. See:

"Try the latest one (beta is welcomed over here)"

Installing a Network Printer onto Asus RT-N13U

As of v24-PreSp2 (first versions to work on Asus RT-N13U) jffs was removed due to the lack of space available. However, Brainslayer put the support of network printing onto the firmware, enabling use of a network printer. Special Thanks for TimeKiller for figuring out most of the solution.

1. First enable USB support

Enable the following under Services -> USB:

Core USB Support
USB 1.1 Support (UHCI)
USB 1.1 Support (OHCI)
USB 2.0 Support
USB Printer Support

2. Startup Settings

Go to Administrations -> Commands, and add this:

sleep 4
mkdir -m 755 -p /dev/usb
mknod -m 660 /dev/usb/lp0 c 180 0
/usr/sbin/p910nd -f /dev/usb/lp0 1 

Save on the Startup.

3. Reboot and Install Drivers

Reboot the router, then install drivers through tcp/ip (9101)

For Windows 7:

Go to Devices and Printers
Then, press Add a Printer
Got to Network Printers
Skip the detection, as Windows will not find anything
Go to "Add a printer using a tcp/ip address or hostname"
Device type: Autodetect
Hostname and ip address: your router's ip (default
Port Name: Anything (puts your router's ip by default)
After it says it could not detect a printer, select custom, then Advanced
Make sure the protocol is RAW and change the Port Number is 9101
Install your drivers and finish.

You should print a test page to see if it works.

4. Troubleshooting If the test page does not come, try these settings instead:

Go to Administrations -> Commands, and add this:

sleep 4
chmod +rwx /usr/sbin/p910nd 
mkdir -m 755 -p /dev/usb
mknod -m 660 /dev/usb/lp0 c 180 0
chmod +rwx /dev/usb/lp0
/usr/sbin/p910nd -b -f /dev/usb/lp0 0 

Save again on the Startup. Reboot then follow the steps above but instead of port 9101, put in 9100. You should print a test page again to see if it works. If it doesn't work, you somehow did not follow the instructions correctly.