User Tools

Site Tools


D-Link DIR-320

Supported Versions

Version/Model S/N OpenWrt Version Supported Model Specific Notes
A1 - 10.03.1 -
A2 - 10.03.1-RC4 -

NOTE: Anything not included in model specific notes, or where a short comment couldn't be included on the notes.

Hardware Highlights

CPU Ram Flash Network USB Serial JTag
Broadcom BCM5354KFBG 32Mbytes 4Mbytes 4 x 1 Yes Yes Yes

OEM installation using the TFTP method

If you want to upgrade using TFTP you follow these steps (as an alternative to the above install process.

Windows install script

@echo off
echo ===========================================================================
echo This batch file will upload firmware.bin in the current directory to
echo 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.

set FIND=%WINDIR%\command\find.exe 
if exist %FIND% goto PING
set FIND=%WINDIR%\system32\find.exe 
if exist %FIND% goto PING
set FIND=find

ping -n 1 -w 50 | %FIND% "TTL="
if errorlevel 1 goto PING

echo tftp -i put firmware.bin
tftp -i put firmware.bin
if errorlevel 1 goto PING

set FIND=

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


Upgrading OpenWrt

If you have already installed OpenWrt and like to reflash for e.g. upgrading to a new OpenWrt version you can upgrade using the sysupgrade command line tool. It is important that you put the firmware image into the ramdisk (/tmp) before you start flashing.

LuCI Web Upgrade Process
Terminal Upgrade Process
  • Login as root via SSH on
  • Use the following commands to upgrade.

cd /tmp/
sysupgrade /tmp/openwrt-brcm47xx-squashfs.trx

Kernel 2.6 and b43 driver

To use kernel 2.6 and b43 driver you need to compile your image from trunk. For working image you need to run "make menuconfig" and select:

<*> kmod-b43.................................. Broadcom 43xx wireless support
<*> Remove unnecessary firmware files
(13,14,15)Core revisions to include
(LP) PHY types to include
< > kmod-b43legacy
USB Support
<*> kmod-usb-core............................................ Support for USB
<*> kmod-usb-ohci............................... Support for OHCI controllers
<*> kmod-usb-storage..................................... USB Storage support
<*> kmod-usb2................................... Support for USB2 controllers
<*> kmod-fs-ext3..................................... EXT3 filesystem support



Architecture: MIPS
Vendor: Broadcom
Bootloader: CFE
System-On-Chip: Broadcom 5352EKPB
CPU Speed: 240 Mhz
Flash-Chip: Spansion S29AL032D
Flash size: 4 MiB
Wireless: Broadcom BCM43xx 802.11b/g (integrated)
Ethernet: Switch in CPU
USB: Yes 1x 2.0
Serial: Yes


Model Number


Photo of front


Photo of back

Opening the case

Note: This will void your warranty!

  • To remove the cover simply do a/b/c.
  • There are two screws holding the PCB to the bottom cover.


Photo of PCB


[TX][GND][VCC 3.3V][ ][RX]


How to connect to JTAG interface, and how to reflash the device with JTAG tools

See port.jtag for more JTAG details.

Specific Configuration


The default network configuration is:

Interface Name Description Default configuration
br-lan LAN & WiFi
vlan0 (eth0.0) LAN ports (1 to 4) None
vlan1 (eth0.1) WAN port DHCP
wl0 WiFi Disabled

Switch Ports (for VLANs)

Numbers 1-4 are Ports 1-4 as labeled on the unit, number 0 is the Internet (WAN) on the unit, 5 is the internal connection to the router itself.

Port Switch port
Internet (WAN) 0
LAN 1 1
LAN 2 2
LAN 3 3
LAN 4 4

Failsafe mode

If you forgot your password, broken one of the startup scripts, firewalled yourself or corrupted the JFFS2 partition, you can get back in by using OpenWrt's failsafe mode.

Boot into failsafe mode

  • Unplug the router's power cord.
  • Connect the router's LAN1 port directly to your PC.
  • Configure your PC with a static IP address between and E. g. (gateway and DNS is not required).
  • Plug the power on and wait for the DMZ LED to light up.
  • While the DMZ LED is on immediately press any button (Reset and Secure Easy Setup will work) a few times .
  • If done right the DMZ LED will quickly flash 3 times every second.
  • You should be able to telnet to the router at now (no username and password)

What to do in failsafe mode?

NOTE: The root file system in failsafe mode is the SquashFS partition mounted in readonly mode. To switch to the normal writable root file system run mount_root and make any changes. Run mount_root now.

  1. Forgot/lost your password and you like to set a new one


  1. Forgot the routers IP address

uci get network.lan.ipaddr

  1. You accidentally run 'ipkg upgrade' or filled up the flash by installing to big packages (clean the JFFS2 partition and start over)

mtd -r erase rootfs_data If you are done with failsafe mode power cycle the router and boot in normal mode.


The Dlink DIR-320 has two buttons. They are Reset and Secure Easy Setup. The buttons can be used with hotplug events. E. g. [#wifitoggle WiFi toggle].

Reset reset
Secure Easy Setup ses


There are 5 leds:

  1. /proc/diag/led/blue
  2. /proc/diag/led/red
  3. /proc/diag/led/wlan
  4. /proc/diag/led/diag
  5. /proc/diag/led/usb

You can swich them on or off by "echo 0|1 » /proc/diag/led/blue|red|wlan|diag|usb"

Basic configuration


For some Help with the Tags, please have a look here: tags

toh/d-link/dir-320.txt · Last modified: 2014/04/24 20:03 (external edit)