Flashing guide for DIR-320

This entry will guide you through the flashing of DIR-320 to DD-WRT firmware. The DIR-320 uses a Broadcom chipset and they have relatively easy way of flashing. No more messy RedBoot, just use your system and TFTP the firmware in two seconds after powering up the DIR-320.

It is important to be patient with the flashing as the system doesn’t give any output unless you have a console cable hooked up to the DIR-320. I would say that giving the DIR-320 ten minutes is more than enough for it to do the self flashing. Lets proceed with the flashing guide.

Required files

  1. DD-WRT v24 standard generic bin file

Renaming the file
Rename the downloaded bin file to “firmware.bin” and save it on your C: drive.

Preparing the system
Set your computer to use the IP Address 192.168.0.10, subnet mask 255.255.255.0. Connect an ethernet cable between your computer’s ethernet port and DIR-320’s LAN Port 1. The status of the ethernet port (on your PC) should show the link as disconnected.

Preparing to flash
Launch your command prompt and go to your C: and prepare the command to flash but do not press <Enter> key at this point of time.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\shadowandy> cd c:\
C:\> tftp -i 192.168.0.1 put firmware.bin

If you are using a Linux system you can use rexmt to simplify the process! (thanks Hung and Leon)

$ cd /path/to/firmware.bin/directory
$ tftp
tftp> binary
tftp> trace
tftp> rexmt 1
tftp> connect 192.168.0.1
tftp> put firmware.bin

Powering up the DIR-320

Remember that you need to hit <Enter> on the previous command “tftp -i 192.168.0.1 put firmware.bin” at around two seconds after powering up the DIR-320 (or when the ethernet link is up). If the system accepts your firmware, the LAN1 LED will be blinking rapidly and the command will go away in less than 30 seconds. If you miss that timeframe, the command will simply hang there for quite some time. Simply repeat this process by power cycling the DIR-320 and then tftp-ing the firmware.bin in.

Do remember to give the DIR-320 around 10 minutes for the flashing. While waiting, make a cup of coffee and enjoy it before going on to the next section. You will know the flashing is successful when a new SSID “dd-wrt” appears on your wireless list.

Accessing the DD-WRT web interface
After the successful flash, set your system to be on DHCP and surf on to http://192.168.1.1. Username and password for the web interface is “root” and “admin” respectively (without the quotes).

If you still see the D-Link’s web interface, repeat the flashing procedure from the section “Preparing to Flash”. Have fun!

 

Treat shadowandy!

If these step-by-step guides have been very helpful to you and saved you a lot of time, please consider treating shadowandy to a cup of Starbucks.  

  • drbios

    I can’t get tftp work
    i do it after 2 secod after power up the router .. but in abou 15 to 20 sec later i only get Time Out message and waiting 10 minutes nathing has been changed

    are you sure about the port ? and the ip?

  • shadowandy

    drbios,

    Yes, I am pretty sure about the procedure as I can see the output on my console. 🙂

  • drbios

    ok … i did liki you said in the pm
    and let me tel you that is one of the most weirdest things ever done til now
    in 3 days i own 1 wrt54g v8, one dir-300 and now a very promising dir-320

    but the flash procedure if the dir-320 it’s the most weir
    but work’s now i have my dir.320 flshed to v24 generic nokaid perfectly working and very fast, the trick of unplug 0.5 sec the power plug works quite well

    edit your gide to flash this unit adding the out of the tftp complete trasnfer text (becouse before the trick, i only get time out message) , and add the trick that you telme in the PM

    now like you said before .. lets try an external usb hd 🙂

  • Janis Repsons

    adds and comments to flashing procedure:

    0. power on your dir320;
    1. plug into LAN1 (PC is 192.168.0.xx );
    2. tftp -i 192.168.0.1 PUT firmware.bin
    3. shortly disconnect power (~0,5sec) and plud DC jack back.
    4. when link comes up, pres ENTER
    quick, frequent flashing light shows, that softw is uploading;
    5. WAIT!!! for some minutes, until SSID dd-wrt comes visible.Reconfigure PC’s IP and 🙂

  • Lucas

    does the usb port on the dir-320 works with this firmware?

  • Janis Repsons

    It works, now (26-07-2008) without struggling to get it usb-2, it works as usb-1.1 with distro dd-wrt.v24-9973_NEWD_mini_usb.bin.

    USB 1.1 Support (UHCI) Disable
    USB 1.1 Support (OHCI) Enable
    USB 2.0 Support Disable

    janis
    ps. in driver-level I do not want to struggle @the moment.

  • shadowandy

    Janis Repsons,

    Thanks for the update. Seems like it would be easier to convert the DIR-320 to a 3G router (by plugging in a USB 3G modem)!

  • mrdlnf

    Hi,

    Have you got mac address assignment problem?
    Using default firmware DIR-320 behavior is

    LAN = et0macaddr – 2
    WAN = et0macaddr

    Using dd-wrt :

    LAN = et0macaddr
    WAN = et0macaddr + 1

    The problem is when we inject dir-320 at first time, dd-wrt will read et0macaddr and do “+1” for WAN and “+2” for WLAN, the result is WAN can’t work properly (can’t received the IP if we set DHCP client or the NAT can’t work if we set Static IP).

    The solution is do factory reset (dd-wrt will erase all nvram value) and dir-320 will assign incomplete mac address : for example : 00-90-4C-C0-
    The dd-wrt will auto-complete the rest, for example : 00-90-4C-C0-00

    After that everything works okay, even if we assign mac address manually.

    Have you got the similar issue? any workaround to make dd-wrt work at first time injected?

    Thanks

    BR,
    mrdlnf

  • shadowandy

    mrdlnf,

    DD-WRT V24-SP1 was recently release. Do check if the issue has been rectified.

  • mrdlnf

    Hi,

    Yes i have downloaded it, but i need new(fresh) device to try it (to duplicate the procedure exactly). Will try later (if i found the fresh device :-D) and update the result

    BR,
    mrdlnf

  • Spiteman

    Hi,
    i put DD-WRT V24-SP1 mini on Dir-320. How i can get USB support? And it be USB 1.1 or USB 2.0? Thanks. May be flash std_generic?

  • Spiteman

    in 9973 i have incorrect mac problem

  • Gelson

    I still can’t get my brand new DIR-320 flashed. I’m using a XP conected direcly to the router on LAN 1, using the cable that comes with the unit. Fixed IP’s as informed on the article.

    I turn the router on and it almost imediately (2 secods?) turns lan port 1 led up. I press enter on the CMD prompt where I already typed the tftp command, and I _allways_ get a timeout response.
    Also tried waiting a bit more until windows says connection is up, but no chance.
    Also put a switch between router and my computer. This way NIC card on computer does not goes down, but even this way tftp never connects.

    Please, when exactly should I start tftp? Is this when LAN1 LED goes on, or when windows says connection is up, or what?

    I also pinged router while it is booting and I see I can only get a response after cpu led starts flashing, but it seems too late to flash the unit at that time, because firware is already running then, right?

    Also I noticed two things: telneting into 192.168.0.1 gives me a login prompt, but “admin” does not work. Do you known the login and password for telnet?
    Router has a square button on it’s right side, but manual tells nothing about it and there are no label either. When I press it, a blue light starts flashing. What’s that for?

  • kL

    For Windows, try:
    ping -t -w 10 192.168.0.1

  • Gelson

    I managed to flash my DIR-320! I found I have to start tftp just after router flashes all lights. I also powered the router using a power extension cord with a power switch. This way it was easier to turn off/on the router fast enough.

  • Hung

    Just brought a new DR-320 from the retail. Spent 4 hours on windows to try and flash it. Tried all the method above, but could not get the timing right at all. A bit disappointed.

    Load up Ubuntu linux, followed the above instruction and set static IP. Download tftp and the required binary file. Run the command below to force it to retry every second. Press “Enter” to force tftp to retry. Turn off the router and turn it back on. Work straight away.

    $ cd /path/to/firmware.bin/directory
    $ tftp
    tftp> binary
    tftp> trace
    tftp> rexmt 1
    tftp> connect 192.168.0.1
    tftp> put firmware.bin

  • shadowandy

    Hung,

    Without a serial cable, the flashing is abit tricky as the window for flashing is very small.

  • Daniel

    Hi, just wanted to thank you for the great flashing guides. I used both the DIR-300 and the DIR-320 guides and they are great.
    One thing with the DIR-320: I had to do a factory reset (hold the reset button for 30 secs) in order for the DHCP to start working and get a WAN IP.

  • shadowandy

    Daniel,

    I see. I think it is also a great idea to do a factory reset before doing all these firmware flashing stuffs.

  • Newgel

    I’m disappointed with dd-wrt on DIR-320. Internet (WAN port) hangs several times a day. I would like to try Tomato, but I see you had problems flashing it? Can you tell me what version did you try and what problem prevented you from using it?

  • vbm

    I’ve tried to flash my router all weekend to no avail.

    I am trying to upload dd-wrt.v24_std_generic.bin renamed to firmware.bin from a xp box. The router’s HW version is A1, firmware 1.00, I presume the same as everyone else’s.

    I tried to TFTP just after powering the router up, after all light go on, after all light go off, after LAN 1 goes solid. I to launch multiple batch files with the TFTP command line just after powering up the router, hoping one would strike, even got LAN 1 flashing very rapidly but ended up getting timeouts in all windows and no luck flashing the router.

    I also downloaded the Trivial FTP Suite (http://www.sysimage.com/windows/tftp/default.aspx), so I could use the retries as suggested by Hung with no luck.

    I have tried all these combinations both connecting the DI-320 directly to my laptop or through a DI-624 acting as a switch so the laptop connection wouldn’t go down.

    I am running out of ideas…

  • Thiago Delatorre

    Hi, folks. A few minutes ago I got the dd-wrt.v24_mini_generic.bin upload in my DIR-320 using Ubuntu.

    One thing that misled me a few tries was the network manager of Ubuntu. When I configured the eth0 interface using ifconfig to set the ip to 192.168.0.10 and then reboot the router I could not upload the firmware within the first 2 seconds because my PC eth0 interface lost its ip (192.168.0.10) to ask for another via DHCP.

    To solve this problem I configured the eth0 ip using the Ubuntu applet so that the interface had the valid ip (192.168.0.10) as soon as the interface got up and then I could upload the firmware.

    I also used the tip of shortly disconnecting power (~0,5sec) though I’m not sure it’s necessary.

    Thank you all for the tips.

  • vbm

    I ended up managing to flash the DIR-320 today: used a linux box and got it at the second try.

    In hindsight, I may have managed to TFTP it with windows before, but I think I did not give it enough time for the flashing to work and turned it off straight after uploading the firmware…

  • shadowandy

    vbm,

    Good to hear that you managed to flash the DIR-320 too. 🙂

  • ped

    What wirelles NIC is inside? What is USB ftp transfer speed? Is it stable?

  • shadowandy

    ped,

    It is using a broadcom chipset if I remember correctly. I am not sure what you meant by USB FTP transfer speed.

  • ped

    DID-320 use BCM5354, but on the dd-wrt page it is written that it uses BCM4318 wirelles NIC. I thouth that BCM5354 already has an integrated wirelles NIC. If DIR-320 is connected to USB HDD/flash and has VSFTPD running on it, what would be transfer speed between DIR-320 USB flash and PC upload/download? How good this router can handle multiple connections used be torrent?

  • kL
  • John D

    Remember, DO NOT PLUG YOUR WAN INTERFACE OR IT WILL NOT WORK!!! Using linux Ubuntu I did on y first attempt. After I found out to unplug my wan cable.

    Brgds, leon.

  • shadowandy

    John D,

    Thanks for sharing!

  • John D

    Hello shadowandy, thank you for your great guide!

    Can you please update it with my information and with the procedure of mr Hung. Now a days more and more people use linux, in the linux we have this feature “rexmt” that retries to upload the firmware every second. It is really helpful in this case.

    Many thanks, Leon.

Close