Adventures with DD-WRT
Part 2: Picking a Firmware & Initial Flashing

DD-WRT_ControlPanel

Disclaimer: I am documenting what I did myself. There may be errors or omissions. The process is long, complicated, and convoluted. I am not responsible for any loss of data or damage that may occur if you try this yourself. You have been warned.


As I mentioned in the previous part, the three biggest distros seem to be OpenWRT, DD-WRT, and Tomato.

OpenWRT seems to be the most modular and customizable. But I would also say it is the least user friendly from my attempts to figure it out. It is so modular that a web-gui doesn't even come with it by default and many of the OpenWRT people seem comfortable hacking away at the terminal. I really didn't want to go this route (though you will see that I end up doing a considerable amount of terminal hacking myself despite my hopes to avoid it). Furthermore, the documentation is not as friendly either. The first things they talk about are getting the cross-compiler tools and building things yourself. I actually believe there are pre-compiled packages you can just download, but the documentation I found doesn't mention that.

Openwrt-8.09_RC1-screenshot


Tomato seems to be on the opposite end. The way people talk about it, it sounds to be the most user-friendly. But there also seems to be no emphasis or focus on customizability. Since I want to install my own packages, I wasn't sure you could do this based on the documentation. I later found more documentation connected to an offshoot variation of Tomato which includes USB support, that does support the idea of what I want to do. If I had known this earlier, I might have went with Tomato instead. But there is actually not a whole lot of Tomato specific documentation, and there are places where they just point you to DD-WRT documentation.

784px-Tomato_Firmware_-_Bandwidth_Real_Time


DD-WRT seems to be the middle-ground between the two projects. There is emphasis on both the web-gui and modularity. There is also a ton more documentation and a fairly big forum. There are lots of pre-packaged builds…both too many and still not enough. It might just be the documentation, but they seem to support a lot more routers and know which ones don't work. DD-WRT apparently makes money by selling customizations and I think their web-gui might be closed off. It is pretty decent, and from what I've read, a lot more polished and friendlier than the optional one from OpenWRT. (I do hear that Tomato's GUI is still yet nicer and faster; I do notice that DD-WRT's gui is a bit sluggish to load a page.) Apparently DD-WRT's semi-closed model caused some anger in the the past with the free software advocates. You should look up the history if you are interested.

617px-Ddwrtv24rc7


Since I was semi-familiar with DD-WRT from my Airlink experience and was reasonably comfortable with the documentation, I decided to continue with the DD-WRT path.


Picking a Firmware

The next hard part was figuring out which firmware to pick. As I said, there are both too many, and still not enough. The problem with too many is that they have lots of SVN way point releases, and they have lots of variations. In addition to just size and feature sets like micro, mini, standard, big, mega, they also have variants like "STD NoKaid No Hotspot NoStor", "Open VPN JFFS Small", and so forth. Then on top of that, they have variations called VINT, NEWD, and NEWD2. Then they have things like v24 SP1 and v24 preSP2, plus directory names like TNG which I think mean preSP2, but I'm making a lot of guesses. On top of that, directories are split up between the two main contributors, BrainSlayer and Eko. And of course, you have all the different architectures. To an outsider, you have no idea where to go or what to pull and may completely miss the fact that there are other binaries because you looked in the wrong section.

Then at the same time, there are not enough variations because of the limited ROM space, you want only the packages you want, but you must sometimes get packages you don't want which waste space. 


There is a table of features here:

http://www.dd-wrt.com/wiki/index.php/What_is_DD-WRT%3F#Notes


Looking at the trade-offs, I think DD-WRT makes some really ridiculous trade-offs at times. For example, why do you get radvd which is like DHCPD for IPv6 on firmwares that don't support IPv6? Why do all versions come with an ad system (AnchorFree)? And though not marked on the table, why does my Mini-USB version (which I ultimately pick) come with HotSpot? It's cool these features are available, but hotspot and ad systems are pretty specialized and probably not common for most users. They should be packaged in their own special variation. Conversely, for my aforementioned Mini-USB version, I can't get https to access the web-gui so my passwords must be sent to the web-gui in plain-text. I get ext3 but not ext2 (but some have ext2 and not ext3) which tripped me later on. And I don't have a way to get their OpenVPN with web-gui interface if I want USB. (This can be installed separately, but the GUI part doesn't work with it.)


Initial Flashing of the Router

I am not going to go into a lot of detail about the initial flashing of DD-WRT because there is already a lot of documentation out there. (In contrast, the stuff I do in subsequent parts have very little if any documentation so I will be more detailed there.)


For the Asus WL-520gU, I recommend you start here:

http://www.dd-wrt.com/wiki/index.php/Asus_WL-520GU


But for my part, if you have a Windows box, the place to start is to grab the firmware for your router that has the .trx extension if available. These are specially designed to work with the manufacturer's flashing tool so you don't have to go to extra lengths to get DD-WRT installed on the router. Fortunately, the Asus WL-520gU has this. You will need to connect the Windows machine directly to the router and use Asus's Rescue.exe tool. I believe the documentation recommends you disable the Windows firewall and use Internet Explorer any time you use the browser interface for flashing firmware. I certainly did this because I didn't want any trouble here.

AsusRescue

If you don't have a Windows machine, there are detailed instructions on the above linked DD-WRT page. In trying to unbrick that Airlink router, I ended up doing a lot of those things. I didn't really feel like doing it again so it was worth it to boot up a Windows box and install the Asus tools.


Flashing: Take 2

Once flashed, DD-WRT should just be on the router, and it provides its own flashing tool within the web-gui so you can change the firmware you want. Since the .trx didn't have the feature set I wanted (like USB) I needed to flash it again with a different variant. 

I ended up picking:

v24-sp2 (06/09/10) mini-usb - build 14583M NEWD Eko

It took a bit of digging around the file repository to find. Eko builds are in a different section than BrainSlayer builds.

I will say I got lucky I didn't brick my router. I didn't understand all the variations. I understood a few, but the documentation was not at all clear. Let me clarify that. The documentation may be clear, but the documentation is not at all centralized. The documentation I was reading said nothing about half this stuff. Apparently for things like NEWD and build number, you are supposed to read sticky posts in the forum. But I did not see this anywhere in the web documentation and it wasn't until much later that I stumbled upon the specific forum posts.

v24-sp2 is probably what most people want nowadays as it is the modern release.

Mini-USB is what I needed to get USB support, while still having enough space left over to install things in the ROM area via JFFS. (I don't need FTP so I skip the mini-USB-FTP variant.) I had to find the Eko builds because he is the only one who builds Mini-USB. Apparently VINT, NEWD, and NEWD2 are the types of drivers. VINT is for "vintage". NEWD2 is really new stuff and I think related to Linux Kernel 2.6. I read that my router doesn't support 2.6, only 2.4, so I shouldn't get this one. (I think 2.6 does work on the Asus RT-N16.) As for build number, the forum suggests which ones are the best. I didn't know about this, so I picked the most recent based on what some random poster posted claiming it was always best to pick the most recent. This apparently is wrong, and there are suggested release numbers.

It just happens that mine works and I think well enough that I am not compelled to downgrade it.


Anyway I downloaded the new firmware to my desktop and reflashed the router using the built-in DD-WRT Upgrade tool in the web gui. After that easy step, I was good to go.

DD-WRT_Upgrade

At this point, we now have working DD-WRT installation. The router provides all the normal things you would expect from original manufacturer's software through the web gui, such as enable DHCPd, setup WiFi encryption, etc. All this is pretty common stuff so I am not going to discuss it. But feel free to enjoy your router at this point.

But for me, the process is just getting started. The hardcore customization begins next time.


Links:

Part 1: Introduction (previous)

Part 3: Enabling JFFS & Adding USB Storage (next)


Copyright © PlayControl Software, LLC / Eric Wing