Installation

From DD-WRT Wiki

Jump to: navigation, search

Installing DD-WRT on a router in most cases is almost as simple as installing a program onto your computer. Installing programs on a router, known as firmware, are achieved by a method called flashing. This article helps you determine which installation process is for you on your supported router, as well as giving router suggestions and information about flashing each one.


Contents

[edit] Is your router supported?

For a list of devices working with DD-WRT, please see Supported Devices. If your router is not listed there, you are on your own and risk breaking it. Better refer to Index:Support about how to request your router to get tested.

[edit] Downloading DD-WRT

  • Download the latest stable release from the DD-WRT site.
  • Ensure you are using the correct version of the firmware.
    • For more information about which version to use, see File Versions.
    • Updating through the Web GUI means you need to use the _generic version, as mentioned briefly in the hwsupport.txt file.
    • Use the _mini version when upgrading from original Linksys firmware. You only need the _micro version if your AP has 2 MB of flash (WRT54G v5/v6 for instance). Use the regular firmware if your AP has 4 MB or more of flash (WRT54GL for instance).
  • Read the changelog and all other information files on the download pages. They contain important information!
  • If you downloaded a .zip file, then extract the archive.
  • Confirm a good download by comparing the MD5 hash fingerprint of the firmware you downloaded with published hashes.

[edit] Flashing

[edit] Before beginning

Don't forget to make note of your current settings. Especially if you have static IP address. Specially important can be the current WAN MAC address! Some ISPs does not allow an immediate change of the routing hardware and changing the firmware changes the MAC address.

[edit] Precautions for Flashing

Follow all instruction precisely, or you may run into trouble! Incorrect flashing procedure can brick your router!

  • As this documentation says elsewhere, upon flashing the first time, before dd-wrt is running while the Linksys software is still installed, do not use Firefox! Use IE to flash the router (even OS X IE works). Once dd-wrt is running, you can use any browser you like to administer or even flash the router.
  • Do NOT use a wireless connection to upload firmware. Use a wired connection. It is recommended that you disable any wireless adapters on your system to ensure that none are used for the transfer.
  • Do NOT flash/backup your firmware over an SSL (https) connection. Make sure you are using http.
  • Disable your anti-virus-software, as a false-positive virus detection could interrupt the upload.
  • If you need to use TFTP to upload firmware, disable your software firewall first.
  • You will not have Internet access through the router during the process of replacing the firmware. We recommend you save this webpage and the webpages on how to Recover from a Bad Flash to your hard drive (use File->Save As, *NOT* a bookmark). This will allow you to review the information offline in the event that something goes wrong.
  • Have a secondary router or internet connection available while experimenting with your router's firmware, to expedite any trouble shooting and remove the risk of becoming stranded.
    • If you have a cable modem which connects to your router with Ethernet, you can plug your PC straight into the modem should you have any problems. Your PC will be assigned your external IP with DHCP, and you will be on the net. Remember to use a software firewall.

[edit] Flashing with Web GUI (Not for Buffalo devices)

[edit] Reset to Factory Defaults

If you know the IP address, username, and password of your router:

  1. Follow the instructions in the next section to log in to the Web GUI.
  2. Click the "Administration" tab.
  3. Click the "Factory Defaults" sub-tab.
  4. Select "Yes".
  5. Click the "Save Settings" button.
  6. A new page will open, click "continue".

If you do not know the IP address, username, or password of your router, you will need to use the reset button. Be careful when using this method! Apparently if you have OpenWRT already on your router the reset button may not function as it is assumed here and may actually brick your router! Research the functionality of your current firmware to be safe.

  1. Press and hold the reset button on the back of the router for 30 seconds.

[edit] Logging In to the Web GUI

To use the Web interface, you will need to have Javascript enabled with any security restrictions disabled. If the Linksys firmware is currently installed, do not use Firefox as certain versions of the Linksys firmware are known to have problems with Firefox.

  1. Type in the IP address of the router (default 192.168.1.1) into the address bar of your browser.
  2. You will be prompted for username and password.
    • For DD-WRT versions starting with 2006-Feb-28, the default username is root. Prior versions have a blank username by default.
    • For Linksys firmware, the username is admin.
    • For DD-WRT and Linksys firmware, the default password is admin.

[Comment added 05/07/06 by Kizane] DD-WRT v23 IE7 Beta 2 Error! I noticed some weird error while managing a WRT54GSv4 with DD-WRT V23 via IE7b2. For some reason, it cuts off the top of the area where all the settings are. I opened the control panel with Firefox 1.5.0.4, and it has no errors. IE7b2 Screenshot

[Comment added 05/07/06 by Kizane] Solution to above comment. Note that I upgraded to DD-WRT v23 SP1 Final (via Firefox 1.5.0.4 with zero problems!) and the problem has vanished!

[edit] Upload The Firmware

It is VERY important that you not interrupt the setup while the router is being flashed and rebooted. Do not turn off the computer, close the web browser, or turn off the router during this process! I usually just take a step back, and turn my head away so I don't breathe on it for these crucial 2 minutes.

[Comment added 10/03/06 by JoE] At the time of this writing, the current version of Mozilla Firefox will cause your installation to fail when trying to upgrade firmware (dd-wrt.v23_mini_wrt54g.bin, dd-wrt.v23_generic.bin, dd-wrt.v23_wrt54g.bin) using the web interface. I used the current version of Internet Explorer with no problems. Additionally, if your power button keeps flashing and/or you cannot reach/ping 192.168.1.1 after a reset, unplug and plug in the power cord real quick. Wait a few seconds and then everything is hunky dory.

  1. You should be in the Web GUI of the router. Go there now.
  2. Click the "Administration" tab
  3. Click the "Firmware Upgrade" sub-tab.
  4. (Only applicable when DD-WRT is already installed.) Click the "No reset" radio button (works for me, but please double check if "Firmware Defaults" would be better!).
  5. Click the "Browse" button and select the DD-WRT .bin file you downloaded and confirmed.
  6. Click the "Upgrade" button.
  7. The router will take a few minutes to upload the file and flash the firmware. During this time, the power light will flash.
  8. A new page will open confirming that the upload was sucessful (if not). Now wait about 5 minutes before clicking "Continue".
  9. If flashed successfully you will now be at the DD-WRT web interface.

[Comment added 2007/03/27 by staylor] Or, you won't be at the dd-wrt web interface I have a wrt54g v1.1 (also with wrt54gl v1.1), flashing with dd-wrt v23 sp2. I waited the requisite number of minutes, and my "Wireless-G" badge lit up (a good sign), but when I clicked "Continue" after the upload was successful, I did not get to the dd-wrt web interface. Nor was the device ping-able.

Holding down the reset button for 30 seconds (leaving the power cable connected) re-booted the router, and all was fine thereafter.

If the above doesn't result in a successful load of the dd-wrt web interface, try a "ipconfig -renew" in a command prompt window.

[edit] Possible errors

During the firmware upload process, if your router says something similar to, "Upload Failed," you may be using the wrong version of DD-WRT. This may occur through the web GUI if you use a *wrt54g.bin version when you should have selected the generic version instead. It may also be that your router requires the mini version to be flashed before the full version. Be sure to double check to make sure you have the right version. If you are certain that your router is supported and that you have the correct firmware, you may simply need to use a different web browser (e.g. from Firefox to Internet Explorer).

[edit] Reset to Factory Defaults AGAIN

Do this only after you have confirmed that the firmware upgrade is working. At this point you may have temporary problems using Web Interface, so just ping your router.

For V23 SP2: Please do a hard reset: While holding down the reset button, plug in the power cord. Hold the reset button for 30 seconds. See also Reset And Reboot.

This is because SP2 uses encrypted password storage inside nvram. You are unable to login using root/admin before you reset. Please take this step serious!!!

[Comment added 2007/03/27 by staylor] Or, totally ignore this step Again, with my wrt54g v1.1 and dd-wrt v23 sp2, all I did was hold the reset button down for 30 seconds. I'm nearly certain I would have failed the installation had I followed the instruction to pull the power. Logging in using root/admin was no problem at all.

[Comment added 2007/04/30 by rmariboe] Or, totally ignore this step alltogether I didn't even press the reset button; with my WRT54G v1.1 and DD-WRT v23 SP2, the password I used for the Linksys stock firmware worked with the root user.

Previous versions: Press and hold the reset button on the back of the router for 30 seconds. See also Reset And Reboot.

[edit] Flashing with TFTP

Flashing with TFTP must not be seen as the standard procedure for flashing: only use it when you are specifically told to do so (for example in the specific instructions for flashing your brand or type of device). Normally, the GUI flashing method should be used: it should be perfectly adequate for any standard situation. See that section for more information. If you still wish to flash with TFTP, see Recovering with TFTP.

Note for users not using the original Linksys firmware: you cannot use tftp! Change your firmware to the official Linksys firmware, and then continue below.

Owners of the Siemens Gigaset SE505 have to flash their device with tftp. Look at Flash Your Siemens SE505.

[edit] Flashing with Command Line

This is available on routers that have DD-WRT installed and SSH enabled.

It's the *ONLY* recommended mode to flash the router wirelessly.

1) telnet or ssh into WRT

2) download dd-wrt.v2*_generic.bin with wget or scp to /tmp

2a) Alternatively, you could use the mounted share if you have one, and simply download the file there.

3) (optional, but advised) compare MD5 checksum of the original and the downloaded file

4)
 cd /tmp
write /{wherever you put the file}/dd-wrt.v2*_generic.bin linux

5) wait...

6) reboot

7) (optional, but advised) via web interface, restore factory defaults

8) For V23 SP2: If certain features don't work please do a hard reset. Hard Reset: By plugging in the router and holding down the reset button for 30 seconds all at the same time. Do not use config files from older firmware versions. You must start from the beginning.

[edit] Configuration Notes

  • You must start to configure router from scratch. Do not try to use config files from older firmware versions.
  • It is strongly advised that you enable the "Boot Wait" option under the "Administration" tab. This will help you recover in the future should you flash your router improperly. If you use v23 or higher the "Boot Wait" option is enabled by default.

[edit] Something go wrong?

  • If your router fails to reboot (power light doesn't stop flashing, no web interface, etc) you will need to Recover from a Bad Flash. Additional help can be found by doing a forum search.

[edit] Hardware-Specific Information

[edit] Linksys WAP54G

MAC ADDRESS CHANGES - redhawk

If you really want your WAP to have the correct MAC address when it boots up there are 2 methods....one simple but not permanent, and one not so simple but permanent.

Method 1 -

For V1.x only On the Administration>>Commands tab enter

nvram set et1macaddr=<your MAC address minus 1 here> (due to the port swap) (ie. 00:11:22:33:44:54)

nvram commit

Run and Save Startup

For all other WAP versions - substitute the et1macaddr with et0macaddr and don't use the minus 1, use your actual MAC address. (ie. 00:11:22:33:44:55)

This will need to be reentered if you do a hard reset (like when doing firmware upgrades)


Method 2 - Works for all WAP's (For V2.X+ use actual MAC and MAC+1) Extract YOUR CFE, edit in your MAC address. (For V1.x...Use your MAC-1 for the lan_hwaddr and your MAC for the wan_hwaddr), then put the CFE back on using the HairyDairyMaid utility. This method is risky. You could potentially turn your router into a brick. Once this is reinstalled on the unit and the firmware has been loaded, your unit will have it's own MAC addresses permanently embedded and will show everytime you boot.

[note] - search for the embedded text string "hwaddr" using your Hex Editor. This will find the 2 MAC addresses that are embedded. Again due to the port swap the lan mac address needs to be entered as MAC-1 and wan_hwaddr needs to be entered as the MAC for the V1.X only

[note] - my WAP 1.0 required 192.168.1.1 using tftp.exe for the firmware load the first time.....my V3.1 required 192.168.1.245 using tftp.exe for the firmware load the first time.



For loading firmware on the WAP54G V1.0 - Has fixed LED displays starting with V24 RC5. - redhawk

  • Connect PC to LAN port on WAP
  • Configure PC for STATIC IP as 192.168.1.2 Mask 255.255.255.0, Gateway 192.168.1.245
  • Press and hold Reset Button on WAP unit for 30 seconds, unplug unit, Plug back in still holding reset button an additional 30 seconds.
  • Open Browser, URL = http://192.168.1.245
  • Login as: Username/Password <blank>/admin
  • Navigate to Administration Tab. Change the dd-wrt V24_standard_generic.bin file to V24_Standard_generic.trx
  • Upload the new standard_generic.trx file to the router.
  • Wait 5 minutes after it says it completes successfully.
  • Unplug WAP unit, plug it back in.
  • Now use URL = http://192.168.1.1
  • Go to the Administration>>Commands tab.
  • Enter the following

nvram show | grep boardnum (then click on "Run Commands")

If it returns blank then issue the following commands....if it returns a boardnum=2 then you won't have to.


nvram set boardnum=2

nvram commit


  • Click "Run" button and then :"Save Startup" button. - (only if you had to enter boardnum=2 manually)
  • Power cycle the WAP unit.
  • After it boots up, press and hold reset button for 30 seconds. - should reboot again.
  • Check the Status page...it should now display the unit as a "Linksys WAP54G v1.x"
  • Configure as you would any other router.

Power = Power, Diag = Diag or Commit

WLAN - Link LED is now a Radio On/Off indicator, Act = Wireless Activity

LAN - Link = Link, Full/Col = Full, 100 = 100

Thanks goes to Eko for making this unit display correctly.


For loading the firmware on the WAP v2 - follow the steps for the WAP v3.x below...except don't include the nvram variable for WAPver=3. The v2 units have a unique board and should be already recognized by the RC5 and later firmware. Eko informed me that there are no special variables needed for the v2 units. [redhawk - 11/16/07]


For loading the firmware on the WAP54G v3.1 - this is what worked for me YMMV:

  • Connect PC to LAN port on WAP
  • Configure PC Ethernet port to IP: 192.168.1.2, SM: 255.255.255.0, GW: 192.168.1.245
  • Unplug power. Wait 15 sec
  • Hold reset button in, reapply power. Continue holding reset button in for at least 10 seconds
  • Open your favorite browser (I used Firefox) and go to: http://192.168.1.245
  • Login as:

User: <blank>

Password: admin

Hit the Administration tab, and upload the MICRO version of the firmware. When it's done...

  • Unplug power. Wait 15 sec.
  • Plug power back in.
  • Go to: http://192.168.1.1 in your browser and login with the default un/pw for DD-WRT...

[Added by redhawk - 11/16/07]

  • Next go to the Adminstration>>Command tab
  • Type in: [note] - this is only needed for v3.x WAP units with V24-RC5 and later firmware.


nvram set WAPver=3

nvram commit


  • Click on the "RUN" button and then the "Save Startup" button....you want this to run each time it reboots.
  • Reboot the router again then configure.

[edit] Linksys WRT54G or WRT54GL or WRT54GS or WRT54GGX

See Linksys WRT54G/GL/GS/GX page.

[edit] Linksys WRTSL54GS

See Linksys WRTSL54GS page.

[edit] Linksys WRT300N v1

See Linksys WRT300N v1 page.

[edit] Allnet ALL0277

The Allnet ALL0277 (not DSL !!!) essentially is a relabeled Linksys WRT54G v1.0. It was even reported in the forum, that you can install the Linksys firmware on these devices.

[edit] First time install

With some minor exceptions, the procedure to install DD-WRT the first time is pretty much the same as for other WRT54G devices. For flashing this device the first time you need to change the first 4 bytes of the mini_wrt54g image to read W54A (usually this is W54G). You can use a hex editor like XVI32. After the patch, you can upload using the new firmware using the standard ALLNET WEB interface. If the ethernet interface does not work (it did not for me on v23SP2), try the wireless lan interface to check whether the upgrade did succeed.

After the hard reset of the router, you should be able to proceed as descibed above.

[edit] Buffalo WHR-G54S, WHR-HP-G54, WZR-HP-G54, WZR-RS-G54 and WHR-G125

WARNING: I had problems using the mini version of DD-WRT on my WHR-G54S. When using the full generic version, everything worked fine. So you might want to confirm that the mini v23 SP2 works well on WHR-G54S before using that version.

NOTE: Use only v23 SP1 final or later. Older releases may cause trouble!

NOTE: For some models you can use the ddadder program: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=12166

NOTE: There is now a separate RC5 firmware section for the WHR-G125. For available v24 RC5 downloads check here: http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Frelease+candidates%2FDD-WRT+v24+RC5%2FBUFFALO+WHR-G125/. You MUST use v24 on this router or you might brick it!!


Normally, most companies let you upload firmware directly from the user interface. Buffalo, unfortunately, encrypts their firmware, and their routers will accept only encrypted firmware in the web interface. So the easiest way to replace the firmware turns out to be the same way you would "de-brick" a router with corrupt firmware.

All the Broadcom routers enter a special mode in the first few seconds after power is applied that allows a TFTP transfer to directly program the flash ROM with new firmware. So what you need to do is get everything ready to go, power up the router, and then send it the new firmware quickly.

This turns out to be easier than it sounds.

Gotchas: The special mode uses the default IP address of the router. So if you've changed the IP address of the router since you got it, you need to set everything up on the old (default) IP address. You also need to do this with a wired connection, not a wireless connection. This means that you need to give yourself a static IP address on the wired network (i.e. set your computer to use 192.168.11.2 instead of using DHCP).

[edit] TFTP Flashing Buffalo Routers under Windows

  1. For thoroughness, reset to factory defaults by holding the reset button while plugging in the router. Hold for at least 30 seconds. Unplug the router.
  2. Make sure to shut down your firewall and virus checker on the PC you use to update the router. These may prevent a firmware update.
  3. Connect your computer directly to one of the LAN ports on the router. (You can use a regular cable or crossover).
  4. Because the Buffalo starts up with 192.168.11.1(or 192.168.12.1 for WZR-RS-G54), your computer's IP needs to be in the 192.168.11.0/24 subnet (e.g. 192.168.11.2, mask 255.255.255.0 or 192.168.12.2, mask 255.255.255.0 for WZR-RS-G54). It CANNOT be set to 192.168.11.1 as it will conflict with the router. You will have to set a static IP. A static IP is critical for the tftp procedure to work; a dynamic IP won't work even if the dynamic IP is currently set in the proper subnet. For Windows XP, the following screen shots should help. After selecting "Internet Protocol (TCP/IP)," click on the Properties button to open the next screen. Enter the info as shown and click 'OK'. Leave Default Gateway blank.

Image:Set_static_IP_XP_Fixed.png

  1. Open a command window. Go to Start->Run->"cmd".
  2. Change your directory to the folder containing the firmware image. (Ex. cd "C:\Documents and Settings\All Users\Desktop" (if you saved the .bin file to the Desktop)
  3. Type tftp -i 192.168.11.1 PUT (file name of firmware image) like: tftp -i 192.168.11.1 PUT dd-wrt.v23_generic.bin. (For WZR-RS-G54 use 192.168.12.1 as the router IP.) Do not press enter yet.
  4. There are a few methods for this step that might work:
    • Grab the power cable to the router (should be unplugged). Now, hit Enter to start the TFTP transfer and immediately connect the power to the Buffalo.
    • On some systems the order above appears to be incorrect. It worked in Windows XP if, while monitoring the properties tab of Network Places, you hit Enter right after Windows shows connected on the net adapter you are using. You may continue to get TFTP transfer "timed out"s unless you wait for port to connect first.
    • 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.
    • Another quik way is to press and hold the reset button, then power up while still pressing, after 30secs release button, then immediately press enter and start the TFTP transfer.
    • WHR-G54S: connect ethernet to a LAN port > pull the power plug > press and hold the reset ("INIT") button > start the TFTP > plug the power back in > let go of the reset button (more detail)
  5. All port LEDs will illuminate.
  6. The LED on the LAN port will flash rapidly for about 6 seconds. The command will complete with a success printout, like Transfer successful: 3502080 bytes in 5 seconds, 700416 bytes/s
  7. The router will reboot and then boot DD-WRT, wait until the bridge/diagnostic light turns off.
  8. At this point, the router is ready to use. There is no need to reboot it (unplug/plug), although this is a safe precaution.
  9. The router will be now be accessible on 192.168.1.1 netmask 255.255.255.0. You will need to change your IP to this range to access it for configuration. In other words, change your static IP from 192.168.11.2 to 192.168.1.2. (For the WB2-G54 and some WHR-G54S models, the router is still accessible at 192.168.11.1).
  10. The username 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 the 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.

***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 buttin 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.***


[edit] An easier way just use a bat file under windows

  1. Save the script below to a file named "install.bat" (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.
echo.
set /p dd-wrt_fn=Firmware Filename: 
echo.
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 192.168.11.1 during the router's bootup.
echo.
echo * Set your ethernet card's settings to:
echo      IP:      192.168.11.2
echo      Mask:    255.255.255.0
echo      Gateway: 192.168.11.1.
echo * Unplug the router's power cable.
echo.

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

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

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

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

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

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

echo.

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 192.168.1.1.
echo.

pause
goto END

:FNF_ERROR
echo ============================================================================

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

:END




[edit] TFTP Flashing Buffalo Routers under Linux, OS X, or other Unix-like OS

  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.
    • If working with the WZR-RS-G54 router, then be sure to replace all instances of 192.168.11.1 with 192.168.12.1
    • 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 192.168.11.2 for the IP address
    • Type in 255.255.255.0 for the Subnet mask
    • Type in 192.168.11.1 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 192.168.11.1 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 192.168.11.1
tftp> put dd-wrt.v23_mini_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.

Alternatives and Troubleshooting under Linux

  • 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 192.168.11.1 -m binary -c put dd-wrt.v23_generic.bin 
  • Be sure to remember to use 192.168.12.1 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] Limitations/Notes

  • Once you flash to DD-WRT on the Buffalo WHR-G54S/WHR-HP-G54/WZR-RS-G54 and you, for whatever reason, want to flash back to the Buffalo firmware, look in the downloads section of dd-wrt.com in the "buffalo factory revert" folder for unencrypted firmware that will load from the DD-WRT gui. The WHR-HP-G54 image is the German version. Download the English version from Buffalo's site. Flash the German version and use that to flash the English version.
  • A hidden LED behind the front panel will blink. 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.
  • In firmware v23 SP1, the router will restart with IP 192.168.1.1/255.255.255.0
  • It is not necessary to use the two-step flash process as with some WRT54Gs. The Buffalo will accept the entire generic image in one shot.
  • For subsequent upgrades/downgrades of DD-WRT, use the web interface of DD-WRT. See Steps to Flash Through Web GUI.

Additional to WHR-HP-G54 - Changing boardflags

Since v23 SP2, this is no longer necessary. See WHR-HP-G54#Built-in_amplifier for details.

  • Telnet to router. Telnet is a network command environment. Open a telnet session in windows by typing telnet 192.168.1.1 in a command window.
  • The username is 'root', password 'admin'
  • Enter the following commands
nvram show | grep boardflags 
boardflags=0x1758

~ #
  • if you have 0x1758, change it to 0x2758
  • Use this code:
nvram set boardflags=0x2758 
nvram commit 
reboot 
  • This setting appears to turn on a feature on the HP receive side, dramatically increasing receive capability.
  • This feature is not saved with the GUI Backup, so must be redone after every instance of going to default.

Troubleshooting

  • If you experience problems a switch 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
/tmp/nvram-clean.sh
nvram commit
  • Search for posts in the forum containing "WHR-G54S" and the problem you are having.
    • If you have bricked the router, go to the forums. search for "WHR-G54S bricked". There are enough debricking threads, you don't need to start your own.

[edit] Flashing Other Buffalo Devices

Flash Your Buffalo WBR-G54, WLA-G54, ... also includes WBR2-G54, WBR2-G54S

WHR-HP-AG108

[edit] Belkin F5D7230-4 v2xxx and Lower

As this Belkin router comes in several versions, this firmware build will only work for Belkin router models up to v2000. v2000 has a different switching chip than earlier versions though, so you may lose the functionality of the switch and may only be able to connect wirelessly after flashing a v2000 Belkin (see instructions below for adding limited wired capability). v3000 should work, but attempts to flash it have been unsuccessful with current versions of DD-WRT. Attempting to flash a v3000 could brick your router. Version 4000 and higher appear to be based on the TI chipset found in the WRT54GC. v1000, and v1111, have 4mb flash roms while v1444 has only a 2mb flash. You must tftp flash the router with the 2mb micro firmware. If you have a 4mb model, you can reflash the router with the full version generic firmware from within the routers web interface once you've followed this procedure. Unless you need the extra features, it is best to stick with the micro firmware since it is known to work better with this router.

  1. Download the latest micro firmware (dd-wrt.v23_micro_generic as of this writing)
  2. Reset router to factory defaults. Unplug the router.
  3. Connect your computer directly to one of the LAN ports on the router.
  4. The router starts up with IP address 192.168.2.1. Set your computers IP address manually to the following setting: IP Address: 192.168.2.2, Subnet Mask: 255.255.255.0, Default Gateway: leave blank. For more help with this step, study the instructions for the Buffalo router located above.
  5. Go to Start->Run->"cmd" and press Enter.
  6. Change your directory to the folder containing the firmware image. Ex. cd "C:\Documents and Settings\All Users\Desktop"
  7. Type tftp -i 192.168.2.1 PUT (file name of firmware image) For example: tftp -i 192.168.2.1 PUT dd-wrt.v23_micro_generic.bin. Do not press enter yet.
  8. Connect the power to the Belkin.
  9. All port LEDs will illuminate.
  10. After a few seconds, all LEDs except the one you are connected to will turn off. Wait exactly one second and hit enter to execute the command. If you get a timeout error just try again. (Also try running tftp right before powering up.) If you continue to have trouble with this step check out the alternative method below.
  11. The LED on the LAN port will flash rapidly for a while after which the power button will flash rapidly for a while. Be patient and wait for the power light to stop flashing. Wait a couple more seconds.
  12. Power cycle the router. (unplug the power, wait a few seconds, plug it back in).
  13. Set your IP address back to automatic (DHCP), or set it to something begining with 192.168.1.
  14. The router is now accessible at http://192.168.1.1/
  15. The username is 'root' and the password is 'admin'
  16. Enjoy your dd-wrt router

Alternative for Flashing F5D7230-4

If you don't enjoy spending hours, powering your Belkin router up and down. You can can try this procedure that worked for my v1444:

  1. Follow steps listed in the method above until you finish the part where you set your computer's IP to 192.168.2.2
  2. Goto www.linksys.com and goto their download page. (You may want to do this first before you reset to the factory defaults in case resetting screws up your internet connection.)
  3. Download the firmware for BEFW11S4 - EtherFast Wireless AP + Cable/DSL Router w/4-Port Switch.
  4. Extract the tftp.exe program from the zip file.
  5. Start tftp program and set server to: 192.168.2.1 and for the file part, put the location of your "dd-wrt.v23_micro_generic.bin" file.
  6. Set retries to 20.
  7. Powerup router.
  8. Click upgrade and then hit the reset button on your router. If program doesn't catch the Belkin's tftp window, just hit reset again. The Tftp program will let you know when it is upgrading and succeeds.

This method caught the Belkin narrow tftp window on retry #11 vs. my 0 catches after 40 some tries using the power up and down method. Not sure if this will work on other version of the F5D7230-4. From what I have seen with my router, a successful installation will change the LEDs on the Belkin. WLAN LED does not work. Power LED will work and connected WAN LED will blink green. Good luck.

After more than 50 unsuccessful attempts to flash my v1444 router I finally flashed my router using the alternative method described above, but only after using a hub or switch to connect the computer and the Belkin unit. All of my attempts with a direct connection between the router and the computer resulted in a timeout, but by using a hub or switch I had success on the first try. When trying to flash with a direct connection from the computer to the Belkin, it will never work. The connection fails when the router is unpluged or reset. By the time the connection is re-established, the Belkin is too far along in the boot process to accept the upgrade. So if you are having difficulty, like I did for so long, try the above method with a hub or switch connecting one of the lan ports of the router to the computer.

Linux Instructions for Flashing F5D7230-4

  • Set the IP address of your ethernet interface to be 192.168.2.2, netmask of 255.255.255.0
sudo ifconfig eth0 inet 192.168.2.2 netmask 255.255.255.0
  • Make sure you have "tftp" installed.
  • Start up tftp with the router switched off:
# tftp 192.168.2.1
tftp> verbose
Verbose mode on.
tftp> trace
Packet tracing on.
tftp> rexmt 1
tftp> binary
mode set to octet
tftp> status
Connected to 192.168.2.1.
Mode: octet Verbose: on Tracing: on
Rexmt-interval: 1 seconds, Max-timeout: 25 seconds
tftp> timeout 60
  • Turn on the router after typing the following command:
tftp> put dd-wrt.v23_micro_generic.bin
putting dd-wrt.v23_micro_generic.bin to 192.168.2.1:dd-wrt.v23_micro_generic.bin [octet]
Sent 1746029 bytes in 14.8 seconds [943799 bits/sec]
tftp> 
  • When the lights stop rapidly blinking, reset the router.

OSX Instructions for Flashing F5D7230-4

  • Make sure the router is on and plugged into your mac's ethernet port
  • Goto System Preferences and click on the Network icon
  • In the selection box next to the word "Show:" select the Built-in Ethernet option
  • Change the IPv4 Configuration to manually and set the IP address to 192.168.2.2 the subnet mask to 255.255.255.0 and the router to 192.168.2.1
  • Click "Apply Now" and change the selection box next to "Show:" back to "Network Status"
  • Unplug the power from the router and watch the green dot next to "Built-in Ethernet" turn red
  • Open the Terminal application and type the following commands
tftp
tftp> connect 192.168.2.1
tftp> verbose
Verbose mode on.
tftp> ascii
mode set to octet
tftp> status
Connected to 192.168.2.1.
Mode: octet Verbose: on Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> timeout 60
  • Type the following but don't hit enter yet. Make sure you can still see the System Preferences window
tftp> put dd-wrt.v23_micro_generic.bin
  • Now plug the router back in. As soon as you see the red dot next to "Built-in Ethernet" turn green, hit enter and the firmware should be flashed once the lights on the router stop blinking.
  • In order to connect to the router you must first go back to the Network Preferences and change the IPv4 configuration back to DHCP and click "Renew DHCP Lease"

Using v2000 Or FD57231-4 As A Wireless Client Or Access Point With DD-WRT
(borrowed from http://forum.bsr-clan.de/ftopic8732.html)

The Belkin F5D7230-4 v2000/FD57231-4 (with screws not under label) are still not completely functional with DD-WRT, but it can be used as either a wireless access-point or a wireless client. The reason for this limitation is due to the fact that the current robo-switch is unable to properly configure the vlan with this router's implementation of the BCM5325EKQM switch chip. By bypassing the vlan stuff we can get limited functionality from this router. In order to load DD-WRT micro you must tftp it on to the router. These instructions are for the v23 SP1 build of DD-WRT micro not the multi-language version which seems to have stripped out the reboot, ls and other shell commands.

A) Belkin F5D7230-4 v2000 as a wireless client.
1) Connect to the router wirelessly
2) Telnet to the router and sign in or use a serial console cable
3) Enter the commands below:
nvram set lan_ifnames="eth0 vlan0"
nvram set port0vlans=0
nvram set lan_ifname=eth0
nvram set wan_ifname=vlan1
nvram set wan_ifnames=vlan1
nvram commit
reboot
4) After the reboot, unplug the router and plug it back in. When it starts back up your lan ports should be active. The router's default ipaddress is 192.168.1.1. Just use the web interface via the lan port to configure the router as a wireless client.

B) Belkin F5D7230-4 v2000 as a wireless access point
1) Connect to the router wirelessly
2) Telnet to the router and sign in or use a serial console cable
3) Enter the commands below:
nvram set lan_ifnames="vlan0 eth1"
nvram set port0vlans=1
nvram set remote_management=1
nvram set lan_ifname="br0"
nvram set wan_ifname=eth0
nvram set wan_ifnames=eth0
nvram commit
reboot
4) After the reboot, unplug the router and plug it back in. When it starts back up your wan port should be active. The router's default ipaddress is 192.168.1.1. Just use the web interface via the wlan port to configure the router as an access-point.

If you enter in the wrong setting or can not access your router you can always hold down the reset button to restore it to the factory defaults. Remember that we are bypassing all the vlan stuff so some of the web configurations will not work.

[edit] Mitsubishi R100 Gateway

The Mitsubishi R100 is a rebadged ASUS WL500G that is only available in Australia. As such, you can use the ASUS tools on the Mitsubishi product. The R100s are usually found at lower prices compared to the ASUS product. They also come with a 3 yr warranty. Obviously, flashing with a third-party firmware voids this warranty.

[edit] Asus WL500G (Original)

You will need:

  • A PC directly connect to one of the LAN ports of the router, via Ethernet Cable. (Unfortunately, it has to be a Windows based PC. I was unable to upload the firmware via tftp command. Maybe you'll have better luck with Linux).
  • These two files: wl500g-clear-nvram.trx (filesize: 1,585,152 bytes) and wl500g-recover.trx (filesize: 3,690,496 bytes)
  • ASUS Firmware Restoration Tool. This is found on the CD that comes with the router OR ASUS Support website here. Its hidden in Utilities section and named ASUS WL-500b/g wireless router utility program in English. Version 1.3.8.0 (for the English version). The file is called Eng_1380.zip (Use unzip app to decompress).
  • DD-WRT v23 SP2

This procedure was developed using the Mitsubishi R100 router with the standard variant of DD-WRT. It should be identical with the ASUS WL500G (Original)

This process requires a bit of patience and persistance. The WL500G and the rebadged R100 are stubborn routers that need a bit of encouragement. Eventually, you will be successful with installing DD-WRT onto them.

  1. Set the PC to have a static IP of 192.168.1.10, while the gateway entry is 192.168.1.1
  2. Before you plug the power connector in, press and hold the Restore or Reset button on the back.
  3. While holding the reset button, plug the power connector in.
  4. This causes it to go into Restore mode. This is indicated by the PWR LED flashing at regular intervals.
  5. Now use the ASUS Firmware Restoration Tool and upload wl500g-clear-nvram.trx. Wait until upload is complete and it reboots. This is usually takes about 2 to 3 minutes.
  6. Once done, unplug the power connector. Wait for 30 seconds or so.
  7. Repeat steps 2 to 6, but upload wl500g-recover.trx instead.
  8. Now plug the power connector back into the router.
    • Try to ping the router from your PC. If it responds, then you are ready to upload DD-WRT firmware. Proceed to step 9.
    • If not, then repeat steps 2 to 7 until it does.
    • If that fails, set the router in Restore mode (as mentioned in step 2 to 4), but install DD-WRT firmware. Then wipe it off by repeating steps 2 to 8. You must have it such that the router MUST respond to ping in Restore mode!
  9. Install DD-WRT v23 SP2 ASUS firmware using the ASUS Firmware Restoration Tool. (The firmware file is called dd-wrt.v23_asus.trx).
  10. Once done, wait for a few minutes until it reboots. This can be seen by the AIR LED flashing at regular periods.
  11. Now try pinging the router with DD-WRT firmware installed.
    • If it responds, continue to step 12.
    • If it does NOT respond to pings, repeat steps 2 to 11. Repeat until it responds with DD-WRT installed.
  12. Login in via web browser by entering http://192.168.1.1 and the default login is root, with the password admin
  13. Enjoy your R100 or WL500G with DD-WRT v23 SP2! :D


[edit] ASUS WL500G Deluxe

  • Remove the power connector of the WL500G.
  • While holding the reset button, plug the power connector back in. (WL500gP - button labeled "restore")
  • When the power led flashes, release the reset button. The router now is in recovery mode.
  • Wait for your pc to get an ip address (if dhcp is configured)
  • Use the ASUS recovery utility to upload the DD-WRT trx file.

You can get the utilities here, or you can browse the Asus site to download the latest version.

In case you have multiple network interfaces and are unable to find you router, disable all but the one that is connected to your router.

After the upgrade the router reboots and you should be able to access the web interface

SSD: For my new WL-500g Deluxe, the recovery utility would appear to successfully upload the firmware (v23), but then I could not get it to boot... even after waiting several minutes and power cycling. The unit would also be unresponsive to ping requests. I could always successfully reload the original Asus firmware. TFTP methods were unsuccessful altogether, as TFTP never seemed to establish contact with the router. Finally, I was able to boot DD-WRT by first flashing with OpenWRT (White Russian rc4), then using OpenWRT's firmware upload page to flash with DD-WRT.

MopIC: I had very similar problem like SSD. Unfortunately, flashing in OpenWRT RC4 or any other software through Asus Restoration tool didn't help at all.
My router is Asus WL-500G PCB R2.40.
It acted as if it was constantly rebooting.
The solution came from wl500.info website.
http://wl700g.info/showthread.php?t=1606

I had to do the following:
1. Set my ip address on PC's interface to 192.168.1.10 (dhcp on asus didn't work)
2. Unplug power cord from wl-500g.
3. Press and hold restore button and then insert power cord back into router.

  When the PWR light starts flashing, release Restore button.
Now your wl-500g is in restore mode.

4. Run Asus Firmware Restoration (can be found on asus website or included cd)
5. Choose the wl500g-clear-nvram.trx file and upload it to the router. Wait 2-3 minutes after.
6. Unplug power and again enter Restore mode (steps 2 and 3)
7. Choose the wl500g-recover.trx file and also upload it to your router. Wait 2-3 minutes
8. Unplug power and again enter Restore mode (steps 2 and 3)
9. Choose the firmware you wish to flash and upload. Wait 2-3 minutes. Reboot

  I used DD-WRT v23 SP2 2006-1307 for Asus

10. Now it should be ok - enter http://192.168.1.1 and check if it is ok :-)
Hope it helps... for me it was couple hours to fix it...


LFR : Upgrade was done out of the box with .trx file & worked straight, no need for recovery mode
MrO : Does this also work on the WL-500g Premium? TTSherpa : Yes it does. No problen going back an forth the original FW & dd-wrt
DJ : While upgrading from SP1 to SP2, web GUI didn't work with .trx file. Renaming it to .bin worked. QBA:WL-500g premium - used the asus recovery tool (from Eng_1380.zip) to upload v23-sp2 (dd-wrt.v23_vpn_asus.trx) in recovery mode on original asus out of the box firmware - works like a charm :-)


    • posted by Evan Carrol sept 28, done with with WL-500gP **

I just wanted to drop in my advice, I did this whole thing WITHOUT the asus proprietary utils. I used linux TFTP. I had to use the aformentioned utils at http://wl700g.info/showthread.php?t=1606, the only different thing I did was use TFTP. I went in the same order as the above but only gave my router 10 seconds between reboots:

1) flash - tftp wl500g-clear-nvram.trx
2) 10 seconds unplug,
3) flash - tftp wl500g-recover.trx
4) 10 seconds unplug,
5) flash- tftp dd-wrt.v23_asus.trx
6) 10 seconds unplug
done.

[edit] ASUS WL500G Premium

  • Same as Deluxe.
  • Recover from bad flash via Asus Firmware Restoration.
    • Brick recovery can involve shorting pins. Easy enough if one's hands don't shake, but you void the warranty.

dd-wrtv23 SP2 ok so far ...

Chickenboy: For brick recovery, you need to ground Pin 9 shown in this picture http://wl500g.info/attachment.php?attachmentid=905&stc=1&d=1153600992 ... Warning *You'll void your warranty & if you don't know what you're doing, you can permanently kill your router. DO AT YOUR OWN RISK!

So far, I've uploaded faulty firmware 5 times and this technique has saved my router from being a paperweight.

[edit] ASUS WL500W

  • Same as Deluxe.
  • Recover from bad flash via Asus Firmware Restoration.
  • Requires v24 RC3 or later

[edit] ASUS WL550gE

  • Same as Deluxe.
  • Recover from bad flash via Asus Firmware Restoration.
    • Brick recovery can involve shorting pins. Easy enough if one's hands don't shake, but you void the warranty.

dd-wrtv23 SP2 ok so far ...

[edit] Microsoft MN700

  • See MN-700 Page -- summary of steps include:
    • Similar to Asus Deluxe.
    • First perform MN-700 hack to enable Linux based firmware to be installed.
    • Install dd-wrt firmware using Asus Recovery Utility in recovery mode
    • Clear filter_services variables if necessary (SP2 and earlier)

v23 SP2 and earlier work but require filter_service nvram variables to be cleared and reset button does not work.
Full support in SVN 3949+ (you can get SVN 3953 here)

[edit] Siemens SE505

DD-WRT v23 (starting from 27/10/05 version) does now officially support the Siemens Gigaset SE505 router. That means you can use the very latest features like WPA2 on this unit too. Due the limited ram of this unit, you cannot use all features at the same time, but from the base it is much better than the original firmware for this Router.

Flash Your Siemens SE505


Related Links

[edit] Motorola WR850G

See Flash Your Motorola WR850G


[edit] Mikrotik Routerboard RB/532

Mikrotik Routerboard RB/532 is supported starting with DD-WRT v23 SP1. See Mikrotik Routerboard RB/532.

[edit] LaFonera_(en)

See LaFonera_Software_Flashing Page.

[edit] Ubiquiti Litestation 2 (LS2)

See LaFonera_Software_Flashing Page. (use only the LS2 binaries provided, instead of the Fonera ones)

[edit] Accton MR3202A

See LaFonera_Software_Flashing Page. (use only the MR3202A binaries provided, instead of the Fonera ones)

[edit] Gateworks Avila Network Processor GW2348

Please note: The details in these instructions apply specifically to the GW2348-4 board.

If you are using a GW2348-2 or GW2347 there are subtle but important differences in the flashing commands you must use. See the

file FLASHING.TXT for details.

The Gateworks GW234x series Network Processor boards provide an excellent platform for building high performance wireless networks using DD-WRT firmware. They are well built, flexible, and relatively much lower in cost than most commercial alternatives.

Installing DD-WRT on the GW2348 board is relatively simple. To install the firmware you will need the following tools:

  • Computer (I use a laptop with wireless internet connectivity as well as an ethernet port)
  • DC power supply (12 to 24 V 1 amp)
  • Coaxial power plug (2.5mm x 5.5mm available from Radio Shack)
  • 9 pin serial cable
  • Ethernet cable

Before you begin you will need to download and install some tools unless you already have them. If you don't already have one, download a tftp server for your computer. I use TFTPD32 which is free and works quite well. You will also need a terminal program to communicate with the GW2348 over it's serial port. I use Hyperterminal which comes with Windows XP but you can use another if you wish. What is important is that you configure it with the following settings:

  • Speed: 115200 Baud
  • Parity: None
  • Data Bits: 8
  • Stop Bits: 1
  • Flow Control: None

Image:gw2348-4_firstboot_tools4b.pngImage:gw2348-4_firstboot_tools2.png

You will also need to download a copy of the firmware from the DD-WRT Downloads section of the website. The firmware is (as of this writing) located under the beta subsection in a directory called AVILA GATEWORKS. The first file you should get is flashing.txt which describes, albeit in very abbreviated terms, the essential information required to complete the process of flashing DD-WRT firmware onto the GW2348 board. Next, choose the build that you are comfortable with (generally the most recent) and download root.fs and zimage. These two files should be saved in the TFTP Root directory you created when you installed TFTPD32. For the purposes of these instructions you will not need to download the file gateworx-firmware-squashfs.bin as we won't be using it. While you are on the DD-WRT website, visit the online store and purchase an activation key for the GATEWORKS firmware.

When all the files have been downloaded and installed as needed in the computer it is time to set up the computer to connect to the GW2348 board. Plug the serial cable between the serial port on the computer and the serial port on the GW2348. Connect the ethernet cable between the ethernet port on the computer and the eth0 port on the GW2348. The eth0 port is the one closest to the power connector on the GW2348. Next, open the Windows control panel and go into the network connections page. Select the local area connection item that corresponds to the ethernet adapter you connected to the GW2348. Manually configure the TCP/IP settings of this ethernet adapter as follows:

  • Manually Specified Address (no DHCP)
  • IP ADDRESS: 192.168.3.1
  • SUBNET MASK: 255.255.255.0

Remove any reference to a GATEWAY address as well as references to DNS servers on this adapter's configuration.

You are now ready to power up the GW2348 for the first time. To do this you will need to connect your 24 volt DC power supply to the coaxial power connector so that the negative (-) terminal of the supply is connected to the outer sleeve of the connector and the Positive (+) terminal is connected to the center conductor. Remember to start up HyperTerminal (or your terminal package of choice) with the settings shown in the image above. Plug in the power to the GW2348 and turn on the power supply. If no smoke comes from the board the ethernet port lights should flicker and then come on. At about the same time Windows should report that the Ethernet port is connected at 100Mbits/sec and text should start to appear on the Hyperterminal screen looking something like this:

+No devices on IDE controller 0

Trying NPE-B...success. Using NPE-B with PHY 0.
Ethernet eth0: MAC address 00:d0:12:xx:xx:xx
IP: 192.168.3.2/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.3.1

RedBoot(tm) bootstrap and debug environment [ROM]
Gateworks certified release, version 2.02 - built 05:22:19, Mar  3 2006

Platform: Gateworks Avila GW234X (IXP42X 533MHz) BE
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2004, 2005 Gateworks Corporation

RAM: 0x00000000-0x04000000, [0x000298b0-0x03fc1000] available
FLASH: 0x50000000 - 0x51000000, 128 blocks of 0x00020000 bytes each.
== Executing boot script in 2.500 seconds - enter ^C to abort

After a couple of seconds (2 and 1/2 to be exact) the text will continue scrolling by. When it is finished open a web browser and type in the URL http://192.168.3.2/. This should give you a basic web page from the embedded copy of linux that is running on the GW2348. If you have gotten this far you have a working GW2348 and are ready to flash in a copy of DD-WRT. be sure to start up the TFTPd32 program with both the root.fs and zimage files in the TFTPd root directory. Remember to set the TFTPd server address to 192.168.3.1. This is easiest to do while the GW2348 is still turned on and the ethernet port is active. Image:Gw2348-4 firstboot tools3.pngUnplug the power (or switch off the supply) to the GW2348 and then Make sure that the Hyperterminal program is running. Also bring up a text editor such as Notepad and open the flashing.txt file you downloaded from the DD-WRT website when you were downloading the DD-WRT image files. You will be referring to this file during the next phase of the process and will probably be copying and pasting lines from it into the Hyperterminal window since this will save a lot of tedious typing and will likely reduce the chances of making an unfortunate error.

It's time to begin the flashing process in earnest now. Here goes nothing.... Plug in the GW2348 power supply while watching the Hyperterminal Window. When you see the line:

== Executing boot script in 2.500 seconds - enter ^C to abort

you have 2 and one half seconds to hit CTRL-C. When you do you should see a prompt that looks like this:

^C
RedBoot>

At this prompt enter the line:

fis init -f

The GW2348 will respond with:

About to initialize [format] FLASH image system - continue (y/n)?

As long as you are ready to continue enter a Y to get the following response:

*** Initialize FLASH Image System
... Erase from 0x50080000-0x50fe0000: ...............................
.....................................................................
.......................
... Unlock from 0x50fe0000-0x51000000: .
... Erase from 0x50fe0000-0x51000000: .
... Program from 0x03fe0000-0x04000000 at 0x50fe0000: .
... Lock from 0x50fe0000-0x51000000: .
RedBoot>

Enter the following line: (you may want to refer to the flashing.txt file for this and subsequent lines to enter since they could change in future builds)

load -r -v -b 0x00800000 zImage

At this point you will find out for sure if your TFTP server is working correctly. If it isn't you will get something like this:

Using default protocol (TFTP)
__udp_sendto: Can't find address of server
Can't load 'zImage': some sort of network error
RedBoot>

When I got this message it was because I had forgotten to set my TFTP server to use 192.168.3.1 as it's address so it was not seeing the TFTP request coming from the GW2348. I changed the setting and then the reply coming from the GW2348 looked like this:

Using default protocol (TFTP)
/
Raw file loaded 0x00800000-0x00967c93, assumed entry at 0x00800000
RedBoot>

This took several seconds as the zimage file was downloaded to the Gateworks board from my computer. After this completes execute the following command:

fis create -b 0x00800000 -f 0x050080000 -l 0x00200000 -r 0x00800000 linux

The response should look like this:

... Erase from 0x50080000-0x50280000: ................
... Program from 0x00800000-0x00a00000 at 0x50080000: ................
... Unlock from 0x50fe0000-0x51000000: .
... Erase from 0x50fe0000-0x51000000: .
... Program from 0x03fe0000-0x04000000 at 0x50fe0000: .
... Lock from 0x50fe0000-0x51000000: .
RedBoot>

Then enter this command:

fis create -n linux

You will get a caution message:

An image named 'linux' exists - continue (y/n)? y
* CAUTION * about to program 'linux'
at 0x50080000..0x501e7c93 from 0x00800000 - continue (y/n)? y

The message repeats twice since this is when you are actually overwriting the original version of linux installed on the board. They really want you to be sure and it is wise to reread your command line to be sure that you aren't doing something stupid... but forge ahead... The GW2348 will respond:

... Unlock from 0x50fe0000-0x51000000: .
... Erase from 0x50fe0000-0x51000000: .
... Program from 0x03fe0000-0x04000000 at 0x50fe0000: .
... Lock from 0x50fe0000-0x51000000: .
RedBoot> 

Now it is time to TFTP in the second file (root.fs):

load -r -v -b 0x00800000 root.fs

If all is working well the response should look something like this:

Using default protocol (TFTP)
/
Raw file loaded 0x00800000-0x00d13fff, assumed entry at 0x00800000
RedBoot>

When the loading of the root filesystem is complete (it will take a few seconds because it is a large file) you will create several files The first looks like this:

fis create -b 0x00800000 -f 0x050280000 -l 0x00D20000 ramdisk

The response from the GW2348 will look like:

... Erase from 0x50280000-0x50fa0000: ...............................
.....................................................................
.....
... Program from 0x00800000-0x01520000 at 0x50280000: ...............
.....................................................................
.....................
... Unlock from 0x50fe0000-0x51000000: .
... Erase from 0x50fe0000-0x51000000: .
... Program from 0x03fe0000-0x04000000 at 0x50fe0000: .
... Lock from 0x50fe0000-0x51000000: .

Programming this block of the flash memory takes quite a while because it is a very large file. You will now do two more similar commands that will execute in exactly the same way but will finish much faster. They are:

 fis create -b 0x00800000 -f 0x050FA0000 -l 0x00020000 mampf

and...

fis create -b 0x00800000 -f 0x050FC0000 -l 0x00020000 nvram

When these are done we will run the fconfig utility at the RedBoot> prompt. The GW2348's output is shown in regular type. Your entries are shown in italic:

RedBoot> fconfig
Run script at boot: true
Boot script: 
.. fis load ramdisk
.. fis load zimage
.. exec
Enter script, terminate with empty line
>> fis load linux
>> exec
>> 
Boot script timeout (100ms resolution): 25
Use BOOTP for network configuration: false
Gateway IP address: 
Local IP address: 192.168.1.1
Local IP address mask: 255.255.255.0
Default server IP address: 192.168.1.2
Console baud rate: 115200
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Default network device: npe_eth0
Update RedBoot non-volatile configuration - continue (y/n)? y
... Unlock from 0x50fe0000-0x51000000: .
... Erase from 0x50fe0000-0x51000000: .
... Program from 0x03fe0000-0x04000000 at 0x50fe0000: .
... Lock from 0x50fe0000-0x51000000: .
RedBoot>

Many of these values will be automatically filled in. You only need to backspace and edit to change them. Otherwise you can simply hit enter for the next line. when the computer pauses on a blank line that needs to remain blank such as the gateway address just hit enter to proceed to the next line. When you have finished and are at the RedBoot> prompt you are ready to reboot the GW2348. Before you do this you will need to make a few changes in your computer configuration. First, shut down the TFTP server. You won't be needing it. Then open the control panel and go back to the network connections page and change your IP address on the Ethernet adapter from 192.168.3.1 to 192.168.1.2. Now, start up a web browser and type in the URL http://192.168.1.1 but don't hit enter just yet... Unplug the power to the GW2348 and repower it. Wait about 30-45 seconds then hit enter on the web browser. You should get a page that looks a lot like the one shown below:

Image:Gw2348-4 firstboot registration 1.png

If you have gotten this far successfully you have done the hard part. All that remains is to register the board using the web based registration server at DD-WRT. It might be a good time now to copy that big system key that is on the web page to the clipboard. After doing that, start up a second browser (here is where having that wireless internet connectivity comes in handy) and browse back to the DD-WRT website and go to the DD-WRT shop where you will need to log in with the email address and password you used when you bought your activation key. When you go to My Account you will see a link to the Activation Center at the bottom of the page. click on it and you will be taken to a page where you can paste in that hairy long system key from the clipboard and generate an activation key that you can take back to the first browser and paste into the available space as shown below:

Image:Gw2348-4 firstboot registration 3.png

When you press the activate button the board will reboot and you may have to restart your browser to get it to display properly but you should get the familiar DD-WRT main screen. The username and password are root and admin just like other DD-WRT versions. You can now power down the board and install up to 4 mini-pci radio cards and start to have fun. Remember though that if you are using high power cards you will need a power supply with adequate voltage and current.