Thursday, February 3, 2011

WRT54Gv2.2 Ram Upgrade + Overclock.

I bought a WRT54Gv2.2 back in the day for $50. Original device came with 16mb ram and a CPU that tots along at 216Mhz. I initially only installed 3rd party firmware that offered more control over various settings, as well as improves bit-torrent by a whole lot (stock firmware has this useless feature that retains connections for far too long, thus causing the router's memory to eventually fill up and hang due to heavy bit-torrent activity).

While surfing and looking online, people were realizing that they could overclock the processor in the WRT to improve max speeds the router was capable of handling, as well as increase ram size to enable crazier max simultaneous connections. I decided to do both (hehe).

The board in full view
1st I tore apart the WRT54G, this is done pretty easily without tools, you just need to push the front blue part off and then separate the chassis. The board is shown here (after modding actually, I don't have a before picture). As you can see, I've thermal epoxied on a heatsink on top of the main processor, as well as desoldered, and soldered in a larger ram chip (original is 16mb, now it's up to 64mb). I've also added a Jtag header on the bottom of the board, just in case I need to Jtag the bugger when I screw things up too bad (haven't done that just yet though).

I'll 1st touch on the ram upgrade (seems to be the most interesting/difficult). To remove the original ram chip without damage to the board, I used hot air. 1st apply plenty of liquid flux to both sides of the ram chip, then using aluminium foil, cut out just the rectangle over the ram chip and then wrap the other parts (especially plastic parts) with the foil, this will prevent other parts from being blown off the board by the hot air gun, and prevent parts from melting.

The original 16mb ram IC
Next set the hot air gun to the right temp, I like to use a low air speed to avoid blowing stuff around. Get the gun warmed up 1st, then slowly in a gently swirling motion, bring the hot air to the RAM IC. The flux may smoke and bubble a little, that's normal. Wait until the solder starts to start to look shiny, then attempt to push the IC with a tweezer or something, if it moves the solder is properly melted and the IC can now be lifted.

Remove the IC with tweezers, and then clean the rest of the board up with desoldering braid + flux, lastly remove the flux using flux remover or alcohol. The IC on my WRT54G were from Hynix.,16)22ET(Rev0.5).pdf

Sacrificial DDR ram module
You'd have to source for a suitable 64mb ram chip, I got mine off some 256mb DDR ram modules (that was single sided and had 4 chips, thus I was pretty sure each chip was 64mb). Mine are from Transcend, the sticker being shown here. Buying modules at that point of time was cheaper then buying the ram ICs seperate (probably due to me buying one off quantities, bloody hell). You might wanna run memtest or something on the module before desoldering the ram ICs off to make sure they run right.

Elpida 64mb
To desolder the 64mb ICs off the module is pretty much the same deal, put some flux on, blow on it with hot air and then remove the IC. I didn't bother with a aluminium foil heat-shield this time as there wasn't really much stuff to blow around (only a few decoupling capacitors per IC) and I wasn't too worried if I damaged the PCB. After removing the ICs, you'll want to remove all the RoHS (lead free) solder on it's pins, clear up any shorts carefully and then straighten all it's pins (if you've bent any). Inspect each pin carefully for solder bridges, it's gonna be difficult to do that later. The ICs from my module were from Elpida.

Soldered on 64mb chip
Now with the board and IC clean, carefully position the chip on the clean pads, taking note of the orientation. Next tack on corner on, and then the opposite corner. I like to use a chisel tip to solder this things. Then apply some flux on the pins, put a small amount of solder on the iron tip, and swipe the legs. Don't worry about swiping multiple legs each pass, the flux and solder mask will ensure the solder goes where it's supposed to, if you form a bridge, another swipe after clearing the tip (on a sponge etc.) will clear it up, else you'd need to reach for the desoldering braid. After you're done with all the pins, inspect each pin for the proper amount of solder and no bridging.

Jtag header
Next boot up the WRT54G, it should bootup and work with 16mb ram (since the config hasn't been changed to address 64mb). In some situations it may not work straight away (may need to reset the WRT54G). If it still can't get it to boot reliably (keeps blinking) and you've verified the connections are all correct and good, you will have to build a JTAG cable, backup everything and then wipe the NVRAM. This forces the WRT to re-determine the ram timings, which may be too tight for the 64mb IC to work reliably and boot up. However I have only encountered this once out of all the upgrades I've done.

To config the WRT for full 64mb access. Telnet to it and then issue this commands.

nvram set sdram_init = 0x0113
nvram set sdram_ncdl = 0x000000
nvram commit

After which disconnect and reconnect power, and you should see the WRT working on 64mb of ram. sdram_ncdl is what determines memory timings, wiping it forces the WRT to determine new memory settings by itself, it may take a longer time to boot up the 1st time but it should get there.

Processor Heatsink
Next to overclock the processor. You'd 1st want to put a heatsink on the processor. I used thermal epoxy on mine, so it's stuck pretty good. The below are the possible frequencies available.

Valid Clk Freqs
CPU     SB      
192     96
200     100     
216     108
228     1143
240     120
252     126
264     132
280     120
300     120

I've gone all the way to 300Mhz, but I wouldn't recommend it if you haven't got good cooling. To change the clock frequency, telnet and issue this commands.

nvram set clkfreq=240,120

nvram commit

Upon reboot it should now be be operating in the new frequency, if it hangs, you'd need to reset the router.

There are guys out there installing weird and random packages that extend the usability of this router (more packges etc. The stock FLASH on this thing can be upgraded, I've not found the need yet (I don't use the router for other stuff), there are also guys out there adding SD cards to their routers to get around the space issue. I've installed Tomato on it, I think it's up to 1.28 right now.

The internet is a really cool, and I'm sure there are more ideas floating out there. Happy hacking. xD


  1. Really good stuff. Thanks for the post. I'm going to give the memory upgrade a whirl once I look a little more into soldering memory modules. I've only soldered big components so far where not so much craft was needed. Just checked out the rest of your blog. Lots of cool stuff! Thanks.

    1. Thanks for reading through all of that. There are plenty of SMD soldering guides and videos out that'll make this a breeze.

      Whatever way you choose to do it, make sure you have a magnifying glass and a strong source of light to inspect your work after you're done. If there are no shorts and the solder looks good, you're good to go.

  2. Thanks for this guide, it helps alot.
    Should also mention the USB mods that can make this extra ram worth so much more.

    1. I didn't know that you could put a USB port on the WRT54G (which doesn't have one natively). SD cards I know are possible and of course the extra ram does help if you're planning to run something big.

    2. Well the CPU has a USB bus built into it although USB1.1 its quite a bit faster than the SD Cards mod, and in my opinion much more reliable. I've had both.