From DD-WRT Wiki

Revision as of 01:43, 29 August 2023 by Kernel-panic69 (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

It is extremely important to follow the guidelines for your specific router. Please see Installation for more information. Remember to follow the peacock thread first for background [1], use this page to identify your router model correctly, and see Where do I download firmware? to ensure that you are getting the correct file (or files, as often is required) for the job.


[edit] Buffalo

NOTE: For some models you can use the ddadder program.

[edit] Out-of-the-box: First-time-flashing for 'store-bought' Buffalo models

The web interface on a Buffalo router cannot be used the very first time to convert the Buffalo router from factory firmware to DD-WRT.

It is very easy to bypass this on most models (see specific models below for exceptions):

  1. Read the peacock announcement so that you understand about flashing and broadcom builds: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486
  2. Get a TFTP flash utility. Many operating systems include a GUI tftp tool.
  3. From the DD-WRT website, download the 14929 dd-wrt.v24_nokaid_generic.bin or the latest NEWD (NOT NEWD2 or K26) SVN release that is recommended in the broadcom forum announcements. There is a link to the recommended builds in a sticky at the top of the broadcom router forum.
  4. Plug your Ethernet cable (not wireless!) into a LAN port on the Buffalo.
  5. login to Use the webgui option to initialize the router to factory defaults
  6. Your IP address auto-assigned is usually, but you must manually set your computer to to flash the router. (Any 192.168.11.* will do except In most Microsoft Windows this is Start, Control Panel, Network Connections, find the LAN connection and right-click, find TCPIP and click Properties, and set the IP to and the Subnet to Do not change any other settings!
  7. In your TFTP utility, put in for the Server, and select the .bin firmware image you downloaded. No password is required for TFTP.
  8. Unplug the router. Get ready to start the TFTP upload.
  9. Plug in the router. The diag light with all the other lights may come on very quickly and go out. A few seconds later when the diag light blinks, immediately start the upload.
  10. Wait at LEAST five minutes after flashing. Reset your computer to auto IP and auto DNS.
  11. When you can access the router at set the username and password by manually typing in the entry.

Misc. Notes:

  • Though many companies let you upload firmware directly from your web browser, Buffalo encrypts their firmware, so you may be forced to use TFTP when first flashing factory firmware to DD-WRT firmware.
  • The first time you flash, the TFTP method can be used to bypass the 'encrypted' firmware requirement. After dd-wrt is installed, the router firmware can be upgraded through the Web interface normally.
  • All the Broadcom routers normally enter a special mode in the first few seconds after powered up, so be quick with TFTP, as explained above
  • I could not get a 30/30/30 reset to work with a router with Buffalo Firmware on it still. I had to use the buffalo web interface to set factory defaults.
  • If you have problems flashing, review the tftp steps at note 11 of the peacock announcement.

2010 03 15 with router whr-hp-g300n the supported device section on the main dd-wrt page directed me to "whr-hp-g300n-firmware.bin" and buffalo-to-dd-wrt_webflash-EU-US.bin". I unwrapped my new router, plugged it into a cheap hub and my fedora FC11 box into the same hub. An HP printer was also on the hub. I used firefox to browse to the Buffalo web based management page and selected firmware upgrade. I selected the "buffalo-to-dd-wrt_webflash-EU-US.bin" file and waited until the management screen told me the new firmware had been successfully uploaded. My Nfiniti router doesn't seem to have a reset button or power button so I disconnected/reconnected the power. The box eventually showed all green lights but I couldn't get the wrt web based management tool to come up - until I removed the hub from the equation. Then I used wrt's web tool to down load "whr-hp-g300n.bin". I'm up and running. No tftp used at all. (2010 03 19 The reset button is located on the end where the stand connects.)

[edit] Dicksons has suggested this method:

the non-gymnastic technique for doing a tftp flash on a buffalo is to:

  1. download your firmware (std and anything smaller works, newd if you're using an Eko build)
  2. set your computer into the buff's native default subnet ( will do)
  3. get the the tftp client ready (tftp.exe)
  4. browse into the native buffalo interface and find the "reboot" button
  5. click the button
  6. press the "start" button on the tftp client.

this method (Dicksons)

  • works the first time every time
  • can be done with only one hand (not three or four as with the "power-up/watch for blinking/try to time your clicking/repeat until lucky" technique)

an even smarter variation is to also put a second address onto your computer's interface that sits in the DD-WRT's default subnet -- that way you don't have to jiggle your dhcp settings after the flash.

if you have a fresh buff just out of shrink-wrap, you can skip the pre-flash 30-30-30 , but if for some reason you've configured the buff and have been using it with stock firmware prior to flashing, then a pre-flash 30-30-30 would be a good idea.

of course, a post-flash 30-30-30 is always good, and will keep the peacock cultists from harassing you on every post...and to make sure that your router actually WORKS properly!

[edit] WHR-G54S, WHR-HP-G54, WZR-HP-G54 specifics

  • Once you flash to DD-WRT on the Buffalo WHR-G54S/WHR-HP-G54/WZR-RS-G54, you may want to flash back to the Buffalo firmware. The Buffalo Factory Revert files can be uploaded from the dd-wrt GUI to restore the factory firmware. You can now flash the English version directly...no more need to flash the German build first. English Reversion Success -redhawk 05/27/10
  • A hidden LED behind the front panel may blink on older models. It slightly lights up the bridge icon. This LED is not used in the Buffalo firmware, but in DD-WRT it will flash on for 2 seconds, then off for 2 seconds.

Also, see WHR-HP-G54

[edit] WHR-G125 specifics

It is possible to revert this unit to factory firmware. See here for revert files.

Support for this model is in v24 and later. Do not use earlier versions (like any v23)!

[edit] WZR-RS-G54 specifics

Substitute as the router IP, and as your computer IP in this guide.

[edit] WBR-G54 WLA-G54 WBR2-G54 WBR2-G54S specifics

See Buffalo_WBR-G54_WLA-G54_WLA-G54C_WBR2-G54_WBR2-G54S

[edit] WHR-G300N specifics

See WHR-G300N

[edit] WHR-HP-G300N specifics

See WHR-HP-G300N - DD-WRT Is standard on this router from Q3 2010, older versions can be upgraded see page for details

[edit] WHR-HP-AG108 specifics

See WHR-HP-AG108

[edit] WZR-HP-G300NH specifics

See Buffalo WZR-HP-G300NH. The Japanese version requires extra installation work.

[edit] WZR-HP-G301NH specifics

See Buffalo WZR-HP-G301NH. It is said that web flashing works quickly and easily.

[edit] WLI-TX4-G54HP

See Buffalo WLI-TX4-G54HP.

[edit] More detailed flashing instructions under Windows

Vista Users: Go into Control Panel, Programs, turn Windows Features on of off, check "TFTP Client".

The computer you are using, and the router you are resetting, must be close to each other: so it is possible to have one hand on the enter key of the computer, and the other holding the power plug of the router, and able to put it in the wall or power outlet.

  1. It's good to now reset to factory defaults by holding the reset button while plugging in the router. Hold for at least 30 seconds. Unplug the router. This makes sure the router is in its 'factory fresh' state.
  2. Unplug the router. Usually, preparing by leaving the connection to the router, and unplugging the router from the wall or power cord, is the easiest way.
  3. A non-XPSP2, third-party firewall, may interfere with tftp's ability to talk to the router. It may be useful to disable any third-party firewalls now.
  4. Either:
    1. Your computer should be connected directly to one of the LAN ports on the router. (You can use a regular cable or crossover).
    2. Or if you have a larger network, the computer is connected to a switch, and then to the router LAN port. The router's power cord still needs to be within reach while you are at the computer.
      Reference Image
      Reference Image
  5. For Windows XP, the following reference image should help. After selecting "Internet Protocol (TCP/IP)," click on the Properties button to open the next screen. Enter the info as shown, an IP address of, a subnet mask of, and click 'OK'. Leave Default Gateway blank.
  6. Make a copy of the firmware file, call it 'ddwrt.bin', and put it in your user folder. For instance, "C:\Documents and Settings\yourusername".
  7. Open a command window, by using Start->Run->"cmd". Enter 'ping -t -w 10'.
    1. The router is pinged continuously from the computer, letting you know when to send the firmware.
  8. Open up a second command window, and leave the first where you can see the ping results.
  9. Without pressing Enter, type tftp -i PUT ddwrt.bin Do not press enter yet. Keep this second command window in the foreground, so all you have to press is the Enter key to send the firmware.
  10. With the power cable to the router in one hand, and the other hand on the Enter key, plug the router in while watching the first command window. When ping replies from begin, press the Enter key.
    1. Some people have found that they have better luck if you plug in the power cable for the router first, then wait a few seconds until you see the red "DIAG" light come on the front of the router. As soon as you see that, you'll want to press Enter to immediately start the TFTP transfer.
    2. http://wiki.openwrt.org/OpenWrtDocs/Hardware/Buffalo/WHR-G54S
  11. All port LEDs will illuminate.
  12. The LED on the LAN port will flash rapidly for about 6 seconds. The TFTP command will complete with a success printout, like Transfer successful: 3502080 bytes in 5 seconds, 700416 bytes/s. Leave the router ALONE at this point!
  13. The router will reboot and then boot DD-WRT.
  14. At this point, the router is ready to use. There is no need to reboot it (unplug/plug).
  15. You can reconfigure your network interface on your computer to use DHCP. The computer pulls an IP address and network information from the router. Access the router via
    1. (For the WB2-G54 and some WHR-G54S models, the router may still be accessible at
  16. The user name is 'root' and the password is 'admin'.

Unplugging router can cause media detect network cards to show no media, ie "Network cable disconnected." When you start the tftp and plug the router in, the NIC doesn't detect media until after the tftp flash window has passed, so 60 seconds later tftp times out and the router boots normally. If so, don't unplug the router. Get your tftp ready, hold down the Init (Reset) button on the router, with the Init held down and the Diag blinking, start tftp and immediately release the Init button. You'll never get the 'Cable Disconnected' errors, and it should flash right up.

[edit] If you experience timeouts with TFTP

***If you are still having trouble with timeouts, etc., you may want to try using the TFTP client from Linksys. Be sure to set it to retry at least three (3) times. Five (5) would be a safe number to start with. Connect power while holding the reset button till the red diag button begins to blink, release the reset button and hit the Upgrade button on the Linksys TFTP Utility. For WHR-HP-G54 I had to flash through a switch with Windows or suffer timeouts trying.***

Setting your NIC to 10mbps half duplex helps it connect faster so you don't miss the TFTP window. You can also try putting a hub or switch between the router and PC. ( Bolded by GeeTek)

I tried several time on Windows XP. The result is always a timeout. Disabling Media Sense feature of Windows XP, I finally succeeded. How to disable Media Sense feature of Windows. http://support.microsoft.com/kb/239924

[edit] A script-method-flash-method in Windows

  1. Save the script below to a file named "install.cmd" (without quotes), and put the firmware file in the same folder.
  2. Run it.
  3. Follow the directions.

@echo off

echo ============================================================================
echo Type or paste the firmware filename below and then press Enter.
set /p dd-wrt_fn=Firmware Filename: 
if not exist %dd-wrt_fn% goto FNF_ERROR

echo ============================================================================

echo This batch file will upload %dd-wrt_fn% in the current
echo directory to during the router's bootup.
echo * Set your ethernet card's settings to:
echo      IP:
echo      Mask:
echo      Gateway:
echo * Unplug the router's power cable.

echo Press Ctrl+C to abort or any other key to continue . . .
pause > nul

echo * Re-plug the router's power cable.

echo ============================================================================

echo Waiting for the router; Press Ctrl+C to abort . . .

ping -n 1 -w 50 > nul
if errorlevel 1 goto PING

echo tftp -i put %dd-wrt_fn%
tftp -i put %dd-wrt_fn%
if errorlevel 1 goto PING


echo ============================================================================

echo * WAIT for about 2 minutes while the firmware is being flashed.
echo * Reset your ethernet card's settings back to DHCP.
echo * The default router address will be at

goto END

echo ============================================================================

echo ERROR: Make sure this batch file and the firmware are in the same directory!


[edit] Linux, OS X or other OS: TFTP flashing

  1. Obviously, be sure to observe the aforementioned procedures:
    • Disable your wireless adapter so that the tftp connection is not through a wireless connection.
    • Connect directly to the router using a wired connection (i.e. ethernet cable). Make sure you are connected to one of the four LAN ports and not the WAN port.
    • Download a copy of these instructions so that they are available to you during the procedure.
    • Most importantly, review all of these procedures before attempting them.
  2. OS X specific instructions:
    • Open up system preferences and select the network preference pane
    • Under the TCP/IP tab select from the drop down menu next to Configure IPv4 manually
    • Type in for the IP address
    • Type in for the Subnet mask
    • Type in for the router
    • Click Apply Now
  3. Change to the directory that you downloaded the dd-wrt.v23_mini_generic.bin file into. At least in Mac OS X, tftp fails to resolve either absolute or relative paths. It is simply better to cd to the directory that contains the dd-wrt.v23_mini_generic.bin file before launching the tftp app so no path resolution has to happen.
  4. Execute the tftp command and change the mode to binary by typing binary and hitting return/enter.
  5. Execute the trace command so you get feedback.
  6. Execute the rexmt 1 command so tftp will retry to send the file if you don't get the timing perfect.
  7. type in the connect command but don't execute it yet.
  8. copy the following command (ctrl-c or cmd-c): put dd-wrt.v23_mini_generic.bin.. You don't want to hit return yet, because you're going to do this when the timing is right.
  9. Now that you are ready, here we go:
    1. Plug in the router
    2. When the router is plugged back into power, all of the LEDs on the ethernet ports will turn on.
    3. Once the LEDs turn off on all ports except the connected port, hit enter on the connect command, then immediatly paste (crtl+v or cmd-v) the PUT command into the terminal and hit enter.
    4. The terminal will return with the number of bytes sent and the time that the transfer took in seconds.

Here is a recap of all the commands:

$ cd /path/to/dd-wrt.v23_mini_generic.bin/directory
$ tftp
tftp> binary
tftp> trace
tftp> rexmt 1
tftp> connect
tftp> put dd-wrt.v23_mini_generic.bin

tftp command tip alternatively to using the tftp shell, you can connect and upload the firmware with the tftp command from the shell prompt. You must specify -m binary to specify the binary transfer mode else the flash will fail. Simple type the following command in the command prompt, and wait to hit 'enter' until you would have above (very shortly after reconnecting the routers power)

tftp -m binary -c put dd-wrt.v24_std_generic.bin

OS X timing tip: Open the network preference pane and select "Network Status" under the "show" pull-down menu. When the router is unplugged the dot next to "Built-in Ethernet" will be red. Now plug in the router and watch for the "Built-in Ethernet" dot to turn green. As soon as it does, execute the connect and put commands.

[edit] Linux: Alternatives and Troubleshooting flash procedures

  • Within tftp, you may be able to execute multiple commands using the '&&' operator.
  • You may be able to use the following one line command:
tftp -m binary -c put dd-wrt.v23_generic.bin 
  • Be sure to remember to use for the WZR-RS-G54 router.
  • Make sure you are in the directory containing the DD-WRT binary before entering tftp.
  • If tftp fails, try atftp (available in portage for Gentoo and repositories for Debian, Ubuntu, and probably others.) With atftp, the "binary" and "rexmt 1" commands are unnecessary.
  • If the above does not work, try issuing the "put" command before powering the router. The command will retry and begin as soon as the connection is established. Finding the right timing is everything.
  • Try also holding the router's INIT button, starting the "put" command, then releasing the button.

[edit] More Troubleshooting tips

  • If you experience problems a network switch connected between the Buffalo and your PC may help.
  • If you experience problems, you may need to erase NVRAM by starting a telnet session and entering one (or both?) of the following options:
  • Option 1 :
mtd erase nvram
cd /tmp
wget http://openwrt.inf.fh-brs.de/~nbd/nvram-clean.sh
chmod a+x /tmp/nvram-clean.sh
nvram commit
  • Search for posts in the forum containing "WHR-G54S" and the problem you are having.

[edit] De-bricking an unresponsive router