The D-Link DIR-685 is some kind of high-profile product from D-Link, it is labeled an 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.
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. You can hit 0 on the redboot menu.
Let Openwrt load, and wait at least 5 minutes for network to fully initialize upon first boot. DHCP will work on the four switch ports, and the wan port will acquire an IP also.
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.
Notes on DSA Network
This gemini switch uses a DSA (distributed switch architecture) switch which is a reasonably new feature in the mainline kernel (v5+). It allows for individual ports to be configured with more features than just VLAN IDs. Because of this, the network setup is slightly different. Upon typing ifconfig, you should see a distinct 'lan#' port for each lan port on the switch. Users interested in more details can refer to the DSA section in the kernel docs.
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
When the device comes up df should show you /dev/sda1 mounted as /mnt/sda1
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.
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/sda1, of course you can set up whatever partition etc you like.
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 v22.214.171.124 in the source drop but it doesn't contain the source code.
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
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
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.
Not yet supported in Openwrt Stable (19.07.3)
The 19.07.3 release requires a 2.5“ HDD connected via the Sata port with one ext4 partition which is loaded w/19.07.3. Regardless, the router will fail to init network properly with the following message:
[ 15.820748] Realtek RTL8366RB ethernet switch driver version 0.2.4
[ 15.858429] rtl8366rb rtl8366rb: cannot find mdio node phandle
[ 15.893840] rtl8366rb rtl8366rb: using GPIO pins 502 (SDA) and 501 (SCK)
[ 15.934347] rtl8366rb rtl8366rb: ACK timeout
[ 15.960182] rtl8366rb rtl8366rb: unable to read chip id
[ 15.991666] rtl8366rb rtl8366rb: chip detection failed, err=-110
[ 16.027876] rtl8366rb: probe of rtl8366rb failed with error -110
Users are advised to use the img on dflund.se until the official openwrt image is tested as working.
toh/d-link/dir-685.txt · Last modified: 2020/08/17 02:47 by teppo