Several weeks ago, the wifi in the student office of the lab I worked in went bad. After some failed attempts to “repair” the router, we decided to re-install the TOMATO firmware.
The official recovery software (running on Windows) failed several times during transferring the image. I had a Manjaro Linux machine at hand, so I tried to find some ways that are easier to control. Some googling led me to this blog post. It’s a quite comprehensive guide to rescue an ASUS router with tftp utility. There are a few things that I want to add, though.
The hardest part for me was the network configuration part. Your machine needs to be connected to the router via ethernet and, probably since the router does not work at this point, needs to have a static IP address. Almost knowing nothing about IP and networking stuff before this, I messed with NetworkManager for several hours trying to set a static IP but failed. I finally became able to ping my router after installing dhcpcd and follow the configuration listed in Arch Wiki: dhcpcd/3.3 Static profile.
After being able to connect to the router, the next step was to transfer the image. The command used in the original blog post is
$ tftp
tftp> connect
(to) 192.168.1.1
tftp> binary
tftp> put RT-AC66U_3.0.0.4_266.trx
Sent 22765568 bytes in 76.5 seconds
tftp> quit
The problem that I met is, I did not see the “Sent xxx bytes in …” line. The terminal returned to prompt after about a minute, and nothing obvious happened. After checking up the Linux man page, I modified the command to
tftp -v -m binary 192.168.1.1 -c put image_file_name
The verbose (-v) option made the program output the “Sent xxx bytes in …” message.
So I had an indicator that the image file was successfully transferred.
I waited for 5 minutes mentioned in the article for the image to be processed, and then I rebooted the router. However, after several failed trials, I found that it requires ~40 minutes to finish TOMATO firmware install. This could probably due to the non-stock firmware. Just try to wait longer before rebooting.