• skip to content

OpenWrt Project

User Tools

  • Register
  • Log In

Site Tools

  • Recent Changes
  • Media Manager
  • Sitemap
You are here: Welcome to the OpenWrt Project » Table of Hardware » D-Link » D-Link DIR-685
en
 ?

Sidebar

  • Welcome to OpenWrt
  • Supported Devices
  • Packages
  • Downloads
  • Documentation
  • Submitting patches
  • Reporting bugs
  • Wiki contribution guide
  • OpenWrt Forum
  • FAQ

  • About OpenWrt/LEDE
    • Rules
    • Infrastructure
    • Trademark Policy
  • About this site
  • Contact Us
toh:d-link:dir-685

Table of Contents

  • D-Link DIR-685
    • Supported Versions
    • Hardware Highlights
    • Installation
      • Fresh install from the web user interface
      • Fresh install from the UART console
    • Upgrade procedure
    • Setting up network
    • Partition and mount the hard disk
    • Set up as NAS
    • Hardware
      • PCB photos
      • Identified electronics
      • Mounting UART serial port
    • Tags

D-Link DIR-685

D-Link DIR-685

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:

  • Router: WAN+4 LAN
  • 2x USB ports
  • Wireless card (this is by default a Ralink RT2880F mini PCI iNIC card currently NOT supported by Linux in any way)
  • Mini SATA drive bay
  • Small video screen (!)

Currently using this device with OpenWrt requires UART access.

Supported Versions

BrandModelVersionCurrent ReleaseOEM InfoForum TopicTechnical Data
D-LinkDIR-68518.06.5https://eu.dlink.com/uk/en/products/dir-685-wireless-n-storage-router-with-colour-screenand-4-port-gigabit-switchView/Edit data

Hardware Highlights

ModelVersionSoCCPU MHzFlash MBRAM MBWLAN HardwareWLAN2.4WLAN5.0100M portsGbit portsModemUSB
DIR-685Storm SL35163008, 32128Ralink RT2880, Ralink RT2820, 1x mini-PCIeb/g/n--5-2x 2.0

Installation

ModelVersionCurrent ReleaseFirmware OpenWrt Snapshot InstallFirmware OpenWrt Snapshot UpgradeFirmware OEM Stock
DIR-68518.06.5http://downloads.openwrt.org/snapshots/targets/gemini/generic/openwrt-gemini-dlink_dir-685-squashfs-factory.binhttp://downloads.openwrt.org/snapshots/targets/gemini/generic/openwrt-gemini-dlink_dir-685-squashfs-sysupgrade.binhttps://eu.dlink.com/uk/en/products/dir-685-wireless-n-storage-router-with-colour-screenand-4-port-gigabit-switch

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.

Fresh install from the web user interface

  • Plug the DIR-685 into your computer ethernet using one of the LAN ports on the back. Set your computer to obtain network from DHCP.
  • Turn on the router. The router should boot and assign an IP number to your computer. Check what IP you get: I got 192.168.0.100.
  • Check that you can contact the router: ping 192.168.0.1
  • Start a browser and browse to 192.168.0.1
  • Log in as “Admin”, blank password by default.
  • Select “Tools” from the top row pane
  • Select “Firmware on the left pane
  • Select “Browse” in the “FIRWMARE UPGRADE” box
  • Select the openwrt-gemini-dlink_dir-685-squashfs-factory.bin file from the OpenWrt build or from another trusted source
  • Hit “Upload”
  • The router says “The F/W is updating…” also in the little display.
  • Next thing that happens is that OpenWrt boots the kernel from flash.
  • Note that INSTALLATION IS NOT FINISHED YET if you just reboot the router here, it will be bricked.
  • Wait for the following text on the console (this can take a few minutes):
      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.

Fresh install from the UART console

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:

  • Select “Y: Upgrade Kernel” by pressing “Y” (this “kernel image” contains all of OpenWrt including root filesystem)
  • Select TFTP or serial download (see elsewhere for how that works) Download the 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
  • The boot loader will erase and flash the image looking something like this:
  Erase flash (0x30040000): Size=32768000 ........
  Program flash (0x30040000): Size=6750212 ........
  • This takes a while. When this ends, reboot to start the new firmware and it should come up.
  • Note that INSTALLATION IS NOT FINISHED YET if you just reboot the router here, it will be bricked.
  • Wait for the following text on the console (this can take a few minutes):
      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.

Upgrade procedure

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.

Setting up network

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

Partition and mount the hard disk

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:

  • Log in to NAS or use the console if you have one.
  • fdisk /dev/sda press n, ENTER, ENTER, ENTER, ENTER, w to create /dev/sda1
  • mkfs.ext4 /dev/sda1
  • Create a mount point, e.g.:
  • mkdir /mnt/samba
  • Edit /etc/fstab e.g. with vi /etc/fstab
  • Add a single line like this:
  • /dev/sda1 /mnt/samba ext4 defaults 0 0
  • Edit /etc/rc.local and add a line line this:
  • mount /mnt/samba
  • Reboot
  • When the device comes up df should show you /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.

Set up as NAS

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.

Hardware

PCB photos

Open case PCB front PCB back

Identified electronics

  • A Ilitek ILI9322 display controller for 320RGBx240 connected to a panel with the label LM918A01-1A SY-B4-091116-E0199 connected to the main PCB with a flat cable (we know this is driven by a ILI9322 from the boot messages)
  • A touch input module PCB with a Cypress Semiconductor CY8C214 MCU, with a LED connected to it (the WPS flashing LED), connected to the main PCB with a flat cable
  • A Sunon Maglev GM0502PFV2-8GN 0.4W fan connected to the main PCB, software controlled
  • A soldered (!) Alpha Networks WMP-N08 Mini-PCI RaLink RT2880F-based wireless network card, inside the shield box is a RT2850L antenna driver. The Linux driver is named “ralink_RT2880_iNIC” and is version v1.1.8.3 in the source drop but it doesn't contain the source code.
  • Main PCB:
    • A blue LED indicating power on
    • A Spansion S29GL256 256 Mbit (32MB) CFI NOR-flash memory
    • A Hynix HY5DU121622DTP-D43 512 Mbit (64MB) SDRAM classed at 200MHz
    • A Bothhand GST5009 LF 1000 Base-T magnetic module (galvanic isolator) facing the WAN port
    • A RealTek RTL8366RB switch using GPIO for control
    • Two LFE9407 Delta LFE9407 LAN Filters (also galvanic isolators) facing the four LAN ports
    • A TI SN54LVC14A schmitt-trigger array
    • Inside the shield box:
      • The Storlink SL3516 SoC ASIC
      • RealTek RTL8366SR ethernet PHY/switch
      • Another Hynix HY5DU121622DTP-D43 of 64MB SDRAM so in total we have 128MB SDRAM
      • An LXC16373 latch array

Mounting UART serial port

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.

Tags

How to add tags

redboot, gemini, GigabitEthernet, JumboFrames, 128RAM, 32Flash, 4port, ARM, Serial, 12v powered, 2USB, MiniPCI, wlan
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
toh/d-link/dir-685.txt · Last modified: 2019/10/06 20:28 by linus

Page Tools

  • Show pagesource
  • Old revisions
  • Backlinks
  • Back to top
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki