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 192.168.0.1 during the router's bootup. echo. echo * Set your ethernet card's settings to: echo IP: 192.168.0.10 echo Mask: 255.255.255.0 echo Gateway: 192.168.0.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. 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 ping -n 1 -w 50 192.168.0.1 | %FIND% "TTL=" if errorlevel 1 goto PING echo tftp -i 192.168.0.1 put firmware.bin tftp -i 192.168.0.1 put firmware.bin if errorlevel 1 goto PING set FIND= 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 |
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
- Browse to http://192.168.1.1/cgi-bin/luci/mini/system/upgrade/ LuCI Upgrade URL
- Upload TRX file to LuCI
- Wait for reboot
Terminal Upgrade Process
- Login as root via SSH on 192.168.1.1
- Use the following commands to upgrade.
cd /tmp/ wget http://downloads.openwrt.org/latest/brcm-2.4/openwrt-brcm-2.4-squashfs.trx sysupgrade /tmp/openwrt-brcm-2.4-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 Filesystems <*> kmod-fs-ext3..................................... EXT3 filesystem support |
Hardware
Info
| Architecture: MIPS |
| Vendor: Broadcom |
| Bootloader: CFE |
| System-On-Chip: Broadcom 5352EKPB |
| CPU Speed: 240 Mhz |
| Flash-Chip: Spansion S29AL032D |
| Flash size: 4 MiB |
| RAM: 32Mbytes SAMSUNG |
| Wireless: Broadcom BCM43xx 802.11b/g (integrated) |
| Ethernet: Switch in CPU |
| USB: Yes 1x 2.0 |
| Serial: Yes |
| JTAG: Yes |
Photos
Model Number
Front:
Photo of front
Back:
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
Serial
[TX][GND][VCC 3.3V][ ][RX]
JTAG
How to connect to JTAG interface, and how to reflash the device with JTAG tools
See port.jtag for more JTAG details.
Specific Configuration
Interfaces
The default network configuration is:
| Interface Name | Description | Default configuration |
|---|---|---|
| br-lan | LAN & WiFi | 192.168.1.1/24 |
| 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 192.168.1.2 and 192.168.1.254. E. g. 192.168.1.2 (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 192.168.1.1 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.
- Forgot/lost your password and you like to set a new one
passwd
- Forgot the routers IP address
uci get network.lan.ipaddr
- 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.
Buttons
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].
| BUTTON | Event |
|---|---|
| Reset | reset |
| Secure Easy Setup | ses |
LEDs
There are 5 leds:
- /proc/diag/led/blue
- /proc/diag/led/red
- /proc/diag/led/wlan
- /proc/diag/led/diag
- /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
toh/d-link/dir-320.txt · Last modified: 2013/01/17 20:36 by veoxwmt
This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

