What's new

Asuswrt-Merlin - custom build of the Asus RT-N66U firmware

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.

RMerlin

Asuswrt-Merlin dev
About:
This is a customized version of Asuswrt, the firmware developed and used by Asus on many of their routers.

Currently supported: RT-N66U, RT-AC66U, RT-N16 (Experimental)

The primary goals of this project are to fix bugs, add a few basic features and tweaks to the original firmware. This firmware will try to remain as close as possible to the original firmware. If you are looking for a slew of advanced features, then this project is not for you. Look at TomatoUSB or DD-WRT, two excellent products that might suit your needs better.

If however you prefer something as close as possible to the manufacturer's firmware, then this is for you :)

Latest release: 3.0.0.3.178.15

Asuswrt-merlin provides the following changes over the original firmware:

  • 64KB NVRAM
  • WakeOnLan web interface (with user-entered preset targets)
  • JFFS persistent partition
  • User scripts executed at init, services startup, WAN up, firewall up and shutdown.
  • SSHD (through dropbear)
  • HTTPS support
  • OUI (MAC address) lookup if you click on a MAC on the Client list (ported from DD-WRT)
  • Optionally turn the WPS button into a radio on/off switch
  • Saving your traffic history to disk (USB or JFFS)
  • Displaying monthly traffic history
  • Cron jobs
  • Monitor your router's temperature (under Administration -> Performance Tuning)
  • Display active/tracked network connections
  • Allows tweaking TCP/UDP connection tracking timeouts
  • Various bugfixes: crash issues related to VPN, etc...
  • layer7 and cifs kernel modules added
  • Optional user-settings for the WAN DHCP client (required by some ISPs)
  • Description field added to DHCP reservation entries
  • Dual WAN support (both failover and load balancing supported)
  • Disk spindown after user-configurable inactivity timeout
  • System info summary page
  • Wireless client IP and hostname on the Wireless Log page

Download:
You can download it from the Github repo:
https://github.com/RMerl/asuswrt-merlin/downloads

Or from my website:
http://www.lostrealm.ca/asuswrt-merlin

The source code including my changes can be found on Github: https://github.com/RMerl/asuswrt-merlin.

Changelog: http://www.lostrealm.ca/asuswrt-merlin/changelog.txt.


Hope you folks like it :)
 
Last edited:
Howdy folks,

Since I got my RT-N66U, I have been tinkering with its firmware. After managing to get the GPL sources to compile, I started applying a few minor changes to it.

As some people might be interested in such a tweaked version, I have been making them available for download from my website. These builds are currently based on 3.0.0.3.108 (build 112 is way too buggy to be used at this point, as they broke radvd in it).

The latest release is 3.0.0.3.108.2 (the last digit denotes my revision number). This build provides the following changes over stock 108:


I have no intention of doing any major changes in the future - there is no way I could provide anything remotely close to the level of features provided by Tomato or DD-WRT anyway. However, if you want something that remains as close as possible to the original Asus firmware, then these builds might suit you.

You can download them from my website: http://www.lostrealm.ca/tower/node/79. All code changes I made are included in the download archive.

Hope you folks like it :)

Great!! Really nice to se people doing there own firmwares and making them available!!! Keep up the good work and a big THANKS!!
best regards Mrcom
 
I have been wanting to do that but you did it , one word: AWESOME. Will check it out. My gripe with asus firmware was the inability to launch custom scripts or startup commands similar to dd-wrt's rc-startup. I have been experimenting with the builtin wl command to get better control on the wireless performace. Atleast try and see what the driver provides. The frustrating part was that it didn't survive a reboot. So, my question is could you provide a way to start custom startup script/command ?
Very much obliged.
-sri
 
Custom scripts (like DD-WRT does) are definitely something I want to implement. Myself, I have to manually run two custom scripts: one to update my 6in4 tunnel, and another to setup the IPv6 firewall, as by default the router routes everything.

I'm trying to hold off any real source-level change until at least the next stable release from Asus, but with the issues of recent betas, I might stop waiting and start working on implementing these.
 
Progress update:

USB gets mounted too late to be usable for startup scripts. So I had to fiddle with something else first:


Filesystem Size Used Available Use% Mounted on
/dev/root 17.5M 17.5M 0 100% /
tmpfs 124.8M 328.0K 124.5M 0% /tmp
devfs 124.8M 0 124.8M 0% /dev
/dev/mtdblock3 13.1M 644.0K 12.5M 5% /jffs

That last one gets mounted early enough ;)
 
Last edited:
Just curious if you have read thru ASUS's licence agreement ? If enough people take interest in this thread, I am considering a github.com posting/account. What do you think ?
-sri
 
I haven't read it, so I'm unsure what would be the legal implications of setting up a git repo with all the files they distribute in their GPL archive, and customizing it. I would assume it would be fine (especially considering their own firmware is based on Tomato), provided we make it clear that this is unofficial, unsupported by Asus, and so on. However, IANAL, so who knows for sure.

At this point, my personal wish-list for this enhanced firmware are:

  • MiniDLNA update (done)
  • WakeOnLan with web integration (done)
  • JFFS2 support (almost done, working out web integration, and will require thorough tests)
  • Custom scripts (almost done, need more thorough tests)
  • SSH support (I only quickly looked at it, the code is there but Asus took out bits needed for this to work - yet should be doable)
  • Actually giving this a name, beside "Merlin's custom builds" :)
  • Only the most obvious bugfixes to the original firmware (because sometime, fixing one thing can break something else - there might be a reason why a specific bug hasn't been fixed by Asus yet)

A few things I definitely do NOT want to do with this project:

  • So-called "performance tweaks" (as they typically open the door to stability issues - I trust engineers with the actual HW datasheets in hand to know better than me in their design decisions)
  • Re-working of any of the current inner workings (same reason)
  • Re-working of the WebUI

I want it to remain as close as possible to the original firmware, to ensure it remains as stable and reliable as the stock firmware is. And also to make it as easy as possible to upgrade to any new code base released by Asus (considering they make 1-2 of them every month so far). People willing to go with more "experimental" or radical changes can find that with the other existing projects (IMHO).
 
Awesome stuff, Eric. I was looking to modify the code for the same things as yours (custom scripts at startup, jffs) when I saw this page. Looks like you've got it pretty much wrapped up :)

For ssh, You can use the ssh.c file from rc.orig folder and then add start_sshd and stop_sshd calls in rc.c file (with checking a nvram variable for ssh enablement). SSH enablement option can be added to advanced_system_content.asp file in www folder.
I've done this and will test in morning and let you know.

Waiting for your build with jffs and scripts support :)
 
For ssh, You can use the ssh.c file from rc.orig folder and then add start_sshd and stop_sshd calls in rc.c file (with checking a nvram variable for ssh enablement). SSH enablement option can be added to advanced_system_content.asp file in www folder.

Thanks for the tip (I was going to grab the Tomato sources to recover that missing code). Got SSH working and integrated in the web interface :) I just need to test out pubkey authentication, and the sshd_forwarding option.
 
Great job, I really think I'm going to test this out! Would you consider adding the Web log features that are included in Tomato?
 
Great job, I really think I'm going to test this out! Would you consider adding the Web log features that are included in Tomato?

I haven't used Tomato in quite a few years (my previous router was on DD-WRT). What does this feature do?
 
What does this feature do?

It allows you to see two things. 1. Recently Visited Web Sites; Date/Time, IP Address, and Domain Name and 2. Recent Web Searches; Date/Time, IP Address, and actual words searched.

Very cool feature!

TIA,
Bill
 
It allows you to see two things. 1. Recently Visited Web Sites; Date/Time, IP Address, and Domain Name and 2. Recent Web Searches; Date/Time, IP Address, and actual words searched.

Very cool feature!

TIA,
Bill

Not something I would plan to implement as part of the firmware, sorry. That would require to tinker with the firewall or the network interface to be able to intercept traffic and interpret it.
 
Asus provided a telnet access in their stock firmware. I am also adding SSH for the next release of my custom builds.
 
I think i will try your next firmware then ;)

Is "ipkg" working?


My (and some other guys) problem is: Tomato USB has random errors in shell with cmd-line parameters and for that it is unusable for me..
 
ipkg working just as well as it does on the original firmware. You will get an error when updating repos, but that's because Asus' repo is missing the Packages.tgz file. I have been trying to get their tech support to fix it, but I have a feeling they do not understand what I am trying to explain to them, since it's been two weeks now, and the file is still MIA. Nonetheless, Oleg's repo is working fine. I was able to install lighttpd + php (with some manual tinkering) on my system. I just had to enable DownloadMaster first for it to initialize the /opt filesystem. It might not be straightforward as a fully supported feature, but it's still doable.

I'm also using an ext3-formatted USB flash for better optware support.

On another topic: JFFS, user scripts and SSH are now finalized and working great. I'm going to test them some more for a few days before releasing the next build.
 
ipkg working just as well as it does on the original firmware. You will get an error when updating repos, but that's because Asus' repo is missing the Packages.tgz file. I have been trying to get their tech support to fix it, but I have a feeling they do not understand what I am trying to explain to them, since it's been two weeks now, and the file is still MIA. Nonetheless, Oleg's repo is working fine. I was able to install lighttpd + php (with some manual tinkering) on my system. I just had to enable DownloadMaster first for it to initialize the /opt filesystem. It might not be straightforward as a fully supported feature, but it's still doable.

I'm also using an ext3-formatted USB flash for better optware support.

On another topic: JFFS, user scripts and SSH are now finalized and working great. I'm going to test them some more for a few days before releasing the next build.

For the asus problem, we can just comment out the asus repo from ipkg.conf. Also, we can simply install our own ipkg or opkg and corresponding repos using http://code.google.com/p/wl500g-repo/wiki/Using
 
I am still using the Tomato firmware, but one thing that continues to annoy me about the Asus firmware is the problem they have with correctly displaying the connected client list. Many times it hangs on certain connected clients. I had that same problem on the rt-n56u also. Yet the custom firmwares, or Tomato have no problem with it.

I haven't tried this firmware, but it probably has that problem seeing that's it's mostly made by Asus?
 
Impressive. Subbed for future updates. Right now I am going to jump to .112 official, but looking forward to a custom build of the official .112 :D
 
Status
Not open for further replies.

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top