The D-Link DIR-685 is some kind of high-profile product from D-Link, it is labelled a Xtreme N Storage Router whatever that means. It is based solely around the Gemini platform, and ARMv4 Faraday silicon design. It has the following features:
Currently using this device with OpenWrt requires UART access.
Model | Version | SoC | CPU MHz | Flash MB | RAM MB | WLAN Hardware | WLAN2.4 | WLAN5.0 | 100M ports | Gbit ports | Modem | USB |
---|---|---|---|---|---|---|---|---|---|---|---|---|
DIR-685 | Storm SL3516 | 300 | 8, 32 | 128 | Ralink RT2880, Ralink RT2820, 1x mini-PCIe | b/g/n | - | - | 5 | - | 2x 2.0 |
This is preliminary flashing instructions since network is not working out of the box and you need UART access to set up networking on the device. Do not install OpenWrt unless you are planning to experiment.
openwrt-gemini-dlink_dir-685-squashfs-factory.bin
file from the OpenWrt build or from another trusted sourcejffs2_build_filesystem(): erasing all blocks after the end marker... jffs2: notice: (1645) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan).
This means the flash is set up and ready to be used.
Now OpenWrt is installed on your router, and you can proceed to basic configuration.
Using this method, new installs are downloaded using TFTP, see the generic OpenWrt TFTP instructions.
The firmware can be reflashed from the RedBoot derivative “Boot Menu” that comes up if you have a serial console and hammer Ctrl+C
during startup like this:
openwrt-gemini-dlink_dir-685-squashfs-factory.bin
file using TFTP, you need to rename it because the boot loader cannot handle this long filename. I just name it openwrt
Erase flash (0x30040000): Size=32768000 ........ Program flash (0x30040000): Size=6750212 ........
jffs2_build_filesystem(): erasing all blocks after the end marker... jffs2: notice: (1645) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan).
This means the flash is set up and ready to be used.
Now OpenWrt is installed on your router, and you can proceed to basic configuration.
Upload the openwrt-gemini-dlink_dir-685-squashfs-sysupgrade.bin image to the routers /tmp directory. If your networking is set up properly it should be just something like:
scp openwrt-gemini-dlink_dir-685-squashfs-sysupgrade.bin root@192.168.1.2:/tmp
Then issue sysupgrade:
sysupgrade /tmp/openwrt-gemini-dlink_dir-685-squashfs-sysupgrade.bin
The DIR-685 will flash the firmware upgrade and reboot.
There is no need to wait for the JFFS2 to initialize when upgrading the firmware: this is just needed on factory installs.
We haven't yet figured out how to bring the network online properly with the DSA network switches. The following interactive commands will bring it online as 169.254.1.2 on the local link (assuming the host is statically configured on the local link as 169.254.1.1):
ifconfig eth0 169.254.1.2 netmask 255.255.255.0 up ifconfig br-lan 169.254.1.2 netmask 255.255.255.0 up ping 169.254.1.1
If you slot in a hard disk in the device this can be pretty easily partitioned, formatted and used for storage, e.g. for using the router as a NAS device. With a completely blank disk the procedure is something like this:
fdisk /dev/sda
press n, ENTER, ENTER, ENTER, ENTER, w to create /dev/sda1mkfs.ext4 /dev/sda1
mkdir /mnt/samba
/etc/fstab
e.g. with vi /etc/fstab
/dev/sda1 /mnt/samba ext4 defaults 0 0
/etc/rc.local
and add a line line this:mount /mnt/samba
/dev/sda1
mounted as /mnt/samba
The same procedure can be used for a USB disk, just augment the above. If you have both an internal harddrive and a USB disk attached, the internal harddrive will be /dev/sda
and the USB disk will be /dev/sdb
.
A basic configuration as OpenWrt NAS is very simple and straight forward. The following assumes that you have some kind of hard drive or other large storage mounted on /mnt/samba
.
chown -R nobody /mnt/samba chgrp -R nogroup /mnt/samba
Edit /etc/config/samba
to contain something like this:
config samba option 'name' 'DIR-685' option 'workgroup' 'WORKGROUP' option 'description' 'DIR-685' option 'homes' '0' option 'interface' 'lan'
config sambashare option 'name' 'files' option 'path' '/mnt/samba' option 'guest_ok' 'yes' option 'create_mask' '0700' option 'dir_mask' '0700' option 'read_only' 'no'
Reboot and you can browse to the IP number (etc) of your NAS, use the files
share and upload and download files that will appear in /mnt/samba
, of course you can set up whatever partition etc you like.
For background and generic information see the generic serial console documentation.
The J3 header on the top in the front picture is the serial port connector. This is the pin assignment:
o o o _ o | | | | | | | RX | | VCC | GND TX
Once the UART is properly connected open (in this case) /dev/ttyUSB0
in your serial console (terminal) program and set it to 19200 baud, no hardware flow control (obviously, do you see any CTS or DTS leads) 8 bits, 1 stop bit.