Skip to content

Instantly share code, notes, and snippets.

@joshenders
Last active June 21, 2023 22:02
Show Gist options
  • Save joshenders/3941269 to your computer and use it in GitHub Desktop.
Save joshenders/3941269 to your computer and use it in GitHub Desktop.
How to flash RT-N66U with Shibby's TomatoUSB firmware

Original: http://www.shadowandy.net/2012/03/asus-rt-n66u-tomatousb-firmware-flashing-guide.htm

Download Asus RT-N66U Flash utility

Download Shibby RT-N66U firmware

K26RT-N is appropriate for the RT-N66U. Go ahead and pick the latest release by date. Inside that directory you want the to pick the Asus RT-N66u 64k. The 64k in the name means that 64k of flash memory will be used as NVRAM. Inside that directory the .trx file with AIO in the name has all possible features compiled in and enabled. If this is your first time installing, AIO is a good jumping off point.

Preparing for firmware restoration to TomatoUSB (Shibby)

The steps are simple, you will need to:

  1. Connect the ASUS RT-N66U to your network
  2. Start the firmware restoration process (using firmware restoration utility in the ASUS Utility package) so that it is searching for router
  3. Put the ASUS RT-N66U into firmware restoration mode and start the firmware restoration process

Before you proceed, pull out the power cable to your RT-N66U and have a pen ready to press the reset button (between the USB ports and WAN port)

Flash the TomatoUSB firmware onto the RT-N66U.

  1. Launch the firmware restoration utility (this is one of the tools in the Utility you installed earlier)
  2. In the firmware restoration utility, browse for the TomatoUSB firmware you have downloaded earlier
  3. Start the firmware flashing and a prompt should appear stating that it is an incompatible firmware. Proceed to the next step.

Putting the RT-N66U into emergency firmware restore mode

  1. Press and hold on to the reset button
  2. While holding down the reset button, plug in the power cable so that the RT-N66U turns on. Note: Keep holding the reset button until the power led starts to flash (on and off). When power led starts flashing, release the reset button and proceed.
  3. On the firmware restoration utility, agree to the prompt saying that it is a incompatible firmware. The utility should be scanning for device. Proceed to the next step
  4. Wait until the flashing is complete
  5. The router will automatically power cycle when it is complete

Finally, clearing the NVRAM before you use TomatoUSB

It is always a good practice to clear out the previous settings (in NVRAM) whenever you flash to different firmwares. This is true for PC BIOSs as well. In this case, it is required to flush out the NVRAM from values that may have been previously stored by the stock firmware that are no longer valid for TomatoUSB.

You can either flush the NVRAM either through key presses or through web admin.

Clearing NVRAM via key presses

  1. Power off the RT-N66U
  2. Press and hold down the WPS button
  3. While holding the WPS button, plug in the power cable to turn RT-N66U on
  4. Keep holding the WPS button for 30 seconds before releasing The router should reboot
  5. Congratulations. The NVRAM has been cleared.

Clearing NVRAM via web admin

The TomatoUSB administration web should be at http://192.168.1.1. If it is not, do a “ipconfig” or “ifconfig” and navigate to the gateway address with your web browser. If you are not able to get an IP address from DHCP, you might want to set your computer’s IP address to 192.168.1.2/24.

When prompted for a login, the default is:

  • User: root
  • Pass: admin

Once you are in, follow the next step to clear out the previous settings

  1. Navigate to Administration -> Configuration
  2. Under Restore Default Configuration, select “Erase all data in NVRAM memory (thorough)
  3. Click “OK”
  4. Wait for the router to be ready
@AaronCompNetSys
Copy link

I had similar experiences, here was my process for fixing.
NOTE: if the router is in a constant reboot loop (it actually boots the wifi interface and then reboots), then flashing it will may not make a difference. I was not able to bring one back to life, no factory or aftermarket firmware resolved my bootloop issue. It was an older unit with B1 stamped on it. My newer one does not have B1 stamped on it.

As others have mentioned it takes FOREVER to write the system using the stock recovery. You must be quick about starting it too. I tried the 30MB and 20MB system flash and it took over 30 minutes before I gave up on it. I found using the webui to be better than the utility that you install, you just have to be quick about it.

Steps:

  1. Set your IP to 192.168.1.11/24 GW:192.168.1.1
  2. Point your web browser to 192.168.1.1 in advance.
  3. Use the power switch to power the unit up in recovery, by holding the button next to it as you power it up, it usually only takes a second or two and the power light blinks slowly (on 2 sec, off 2 sec).
  4. Manically refresh your browser and once you get the recovery webui, quickly put in the smallest compatible firmware you have. I used Shibby's 7MB VPN version.
  5. After submit the power light should go out and stay out. It will stay out until the system is flashed. The 7MB one took about 15-20 minutes. If the light does not go out, I think you might have been too slow, I was never able to get it to work unless the light went out.
  6. Once flash is complete, the power light will come back one and nothing else will happen. You can now reboot manually and Tomato should come up after the standard couple auto reboots.
  7. From Tomato webui, flash whatever system you actually want, the 20MB one took a minute or two to flash and reboot.
  8. Wipe NVRAM from Tomato webui.

@still-dreaming-1
Copy link

This says to use the K26RT-N firmware, but it does not explain why. According to the router list (http://tomato.groov.pl/?page_id=69), you can you that version or K26RT-AC. Based on information from the download page and the names you see inside the download links, it appears the N version uses version 5 of some SDK, while the AC version uses version 6 of this SDK. What is the difference between these? Which one should I use?

@allenwalker3
Copy link

I gave up on tomato and went back to the factory firmware. The DLNA server on tomato is slow and inferior to the factory firmware, as is the networking to a USB drive connected to the router. I get 9MB/s with the factory firmware and less than 1MB/s with tomato.

@ethomas997
Copy link

The thing that tripped me up for a while was that after the firmware is uploaded, the router takes a long time (30+ minutes) to process the update and reboot. If you cut the power during that time the update fails and the router ends up showing only the "ASUSTeK - CFE miniWeb Server" page. During that processing the router shows no signs of life (other than the LAN led blinking if connected). Finally it reboots, the other lights come on, and it's good to go.

Copy link

ghost commented Apr 18, 2016

I have noticed an error in linkage on the newest build "build5x-136-EN-MultiWAN".

If you try to navigate to the VLAN page it's a broken link. It directs to /advanced-vlan-r1.asp, however if I remove the -r1 from the link it appears to load the page properly.

Hopefully this can be fixed in the future as it's more of an annoyance than anything else.

Other than that, so far so good on everything else.

@siemsen
Copy link

siemsen commented Jul 13, 2016

I followed AaronCompSysNet's instructions (thank you) and hit a speed bump. Once the router had rebooted, supposedly with Tomato running, I couldn't reach 192.168.1.1 from the computer connected directly to the router's LAN1 port over Ethernet. Purely by chance, I was doing this at work. Our local wireless administrator came by asking if I was responsible for the "rogue" wireless router that was offering an SSID of "Tomato24". Cool! I connected to the router over wireless. I was still connected from another laptop (with its wireless disabled) over an Ethernet cable to the LAN1 port on the router. I couldn't ping 192.168.1.1 from that laptop. This despite rebooting the router. Using the wireless connection, I used the web interface to clear NVRAM. After the router rebooted, and the LAN1 connection started working.

BTW I installed tomato-RT-N66U_RT-AC6x--137-AIO-64K.zip. I think that's Tomato 1.37, right? The web interface said it's Tomato 1.28. Now to take it home and have some fun...

@cpryor6
Copy link

cpryor6 commented Jul 19, 2016

I have one of the older units marked B1 and ran into the reboot loop after not getting the webui up fast enough and having the upload fail partway through. I was able to recover it by clearing NVRAM which gave me the default ASUS login page as if it was brand new out of the box. I was quicker with the webui next time and got the 9MB VPN version installed in like 15 minutes. Thanks to the OP and contributors for this writeup.

@robertvorthman
Copy link

For Mac OSX users, ASUS has an app in the Mac App Store called "ASUS Firmware Restoration". I just used it to flash my RT-N66U with Tomato on my MacBook and it was easy.

@netrbrunet
Copy link

netrbrunet commented Jul 28, 2016

Thank you to all' this was great. And extra credit to docbill for the simplified version.

Note, my new N66U's disk did not come with the recovery utility, and I had to download it from ASUS site. At first, I was trying to upload tomato via the default firmware's updater but this is not the same as the specialized firmware recovery utility.
However, I should note that it never gave me an error (maybe a newer version of the updater?). It uploaded the file (a short progress bar), and then started a subsequent "system recovery in progress" progress bar which took about 5-10 minutes to complete.

@morgant
Copy link

morgant commented Sep 9, 2016

I just did this from a Mac and found the process to be very unreliable. I ultimately got it to work with a combination of @docbill's & @AaronCompNetSys's instructions, plus the note I found in Googling regarding watching for whether the antenna lights were active or not, that really helped).

  1. Erase the NVRAM (because of failed flashing attempts, it was trashed anyway; you might move this step to the end or skip entirely if you're wiping the NVRAM via Tomato's web interface)
    1. Turn off router
    2. Hold down the WPS button
    3. Press the power button to turn the router back on (the power light will flash quickly)
    4. Continue holding down the WPS button for a full 30 seconds, then release
    5. The router will reboot
  2. Flash the firmware using ASUS Mini Web:
    1. Set your Mac/PC to static IP in 192.168.1.1 range (I used 192.168.1.2 (IP), 255.255.255.0 (subnet mask), and 192.168.1.1 (gateway))
    2. Turn off router
    3. Unplug router
    4. Hold down the reset button
    5. Plug the router back in
      6 Press the power button (the power light should blink slowly—2s on, 2s off)
    6. Load http://192.168.1.1/ in the browser on your Mac/PC
    7. Quickly select the firmware you want to use (MIPSR2-138-Mega-VPN didn’t work for me, but MIPSR2-137-Mega-VPN did)
    8. Click ‘Upload’
    9. AS SOON as the “Received file” message loads in your browser, LET GO OF THE RESET BUTTON!
    10. The power light on the router should go off (if it doesn’t, it didn’t work… maybe not fast enough selecting the firmware, maybe a poorly timed release of the reset button… go back to the beginning and try again.)
    11. Wait for 5+ minutes for the firmware to process/install (the power & antenna lights will remain off for this entire time, though the ethernet light for the port you’re plugged into should stay on)
    12. Once successfully installed, the router should reboot (power light will come back on, then the two antenna lights.. if this doesn’t happen, esp. the antenna lights, something didn’t work… I’d suggest trying a slightly older firmware version)
    13. Give it another minute or so and then load http://192.168.1.1/ in the browser of you Mac/PC
    14. Log in with the default username/password of “root”/“admin”
    15. If the NVRAM wasn’t successfully cleared, do so now (either manually as described above or through your new firmware).

@deviantintegral
Copy link

I was having real trouble getting larger images to flash at all, either through the recovery app, the web UI, or TFTP. I ended up searching for the smallest image I could find, and used tomato-K26-1.28.RT-N5x-MIPSR2-120-MiniVPN.trx. From there, I could flash a recent all-in-one image.

@dalehamel
Copy link

Process that worked for me on a Mac:

  • Install the asus device discovery and firmware flash utils from app store
  • Reset NVRAM (not sure if necessary, but why not) using steps above
  • Put it into emergency firmware restore mode (otherwise the upload craps out at about 25%) using steps above
  • Upload a small tomato firmware, I just used http://tomato.groov.pl/download/K26RT-N/build5x-120-EN/Asus%20RT-Nxx/tomato-K26-1.28.RT-N5x-MIPSR2-120-MiniVPN.trx because @deviantintegral recommended it. This is because the finicky part of this process seems to be going from Asus -> tomato.
  • Reset it manually (toggle switch on and off)
  • Wait for a new DHCP address (about 30 seconds)
  • Installed a fully featured, recent all-in-one image, checking the "clear NVRAM on reboot" setting so that it automatically clears the NVRAM again. This takes a few minutes to upload and reboot, and will reboot a couple of times, but the Web UI is very informative on the progress.
  • Confirm the new firmware version
  • Enjoy my new, recent, tomato firmware.

@tomaszkoperski
Copy link

Double check the version of your router. I've spent some time following the instruction here without success. Finally I've double checked and it seems ASUS released a "B1" hardware version of RT-AC66U, which is not compatible with all previous generation firmwares for RT-AC66U (A1).

@cumanzor
Copy link

@tomaszkoperski: Do you know if there's a tomato-shibby (or AdvancedTomato) version that is compatible with the RT-AC66U_B1 hardware revision?

@Trefilov22
Copy link

Is there any newer Tomato than from 2015? The file I am looking at doesn't have the same naming schematic as the one to poster says...

@Trefilov22
Copy link

Trefilov22 commented Apr 21, 2017

And why couldn't you use the firmware update option from inside the Router? I only ask this because my laptop doesn't have an ethernet port to connect directly to the router, I pretty much have to do everything thru WiFi...

@kikiSK
Copy link

kikiSK commented May 14, 2017

I ask for help.
How to connect Asus VDSL AC68U / main router / and Asus RT N66U Tomato 1.28 shibby I think Lan to WAN port

@rackflot
Copy link

I have the RT-66R router, will this firmware work on this one too?

@quangv
Copy link

quangv commented Oct 26, 2017

anybody have a mirror of this? http://tomato.groov.pl/download/K26RT-N/ is down for me

edit: yeup, it's back

@stullekovski
Copy link

stullekovski commented Oct 29, 2017

Looking for the same as @quangv. http://tomato.groov.pl/download/K26RT-N is still down.
Especially for versions before 138 MultiWAN for my RT-N66U. Thanks a lot!

Edit: it's back online.

@FarFetchd
Copy link

Thanks @docbill @AaronCompNetSys, excellent instructions. Anyone else who arrives here: take what people are saying about loooooong reboot time seriously. For me it was like 20 minutes after seeing "Failed to connect to the wireless router. Check if the router's power LED is blinking, which denotes rescue mode".

Finding the smallest possible Tomato firmware to initially install, and then installing your desired one from there, sounds like the way to go; that's what I would try if I (shudder) had to do this again.

@saulp
Copy link

saulp commented Mar 30, 2019

READ ME FIRST:

Skip the instructions in the original post. Read docbill's and AaronCompNetSys' instructions first.

Especially the second link, with the process to simply skip the unnecessary and frankly crappy Asus software:

1. docbill

2. AaronCompNetSys

(thank you both!)

@klydeinside
Copy link

What worked for me was to flash the DD-WRT firmware from the console administration web console, then flash the shibby firmware from the DD-WRT admin web console.

This is so much easier lol. Idk why anyone is doing it any other way. Fk that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment