User Tools

Site Tools


toh:d-link:dir-505

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
toh:d-link:dir-505 [2014/08/08 15:01]
aind
toh:d-link:dir-505 [2015/05/21 02:50] (current)
jp [Back to original firmware]
Line 1: Line 1:
 ====== D-LINK DIR-505 ====== ====== D-LINK DIR-505 ======
 +
 +---- dataentry----
 +BRAND : D-Link
 +MODEL: DIR-505
 +STATUS_: suppported
 +OpenWRT Version: 14.07
 +PLATFORM: Atheros AR1311 ​
 +CPU MHZ: 400
 +RAM MB: 64
 +FLASH MB: 8
 +WLAN HARDWARE: Atheros AR9285
 +WLAN STD: b/g/n
 +WIRED PORTS_: 1x 100
 +VLAN: No
 +USB: 1x 2.0
 +FW factory_url:​ https://​downloads.openwrt.org/​barrier_breaker/​14.07/​ar71xx/​generic/​openwrt-ar71xx-generic-dir-505-a1-squashfs-factory.bin
 +FW sysupgrade_url:​ https://​downloads.openwrt.org/​barrier_breaker/​14.07/​ar71xx/​generic/​openwrt-ar71xx-generic-dir-505-a1-squashfs-sysupgrade.bin
 +Devicepage_url:​ http://​wiki.openwrt.org/​toh/​d-link/​dir-505
 +Forumthreads_url:​ http://​forum.openwrt.org/​viewtopic.php?​id=38742
 +----
  
 The discussion on the DIR-505 is in [[http://​forum.openwrt.org/​viewtopic.php?​id=38742 | this forum post]]. OpenWRT has been flashed to version A1 + A2. The discussion on the DIR-505 is in [[http://​forum.openwrt.org/​viewtopic.php?​id=38742 | this forum post]]. OpenWRT has been flashed to version A1 + A2.
- 
  
  
Line 18: Line 37:
  
 ^ Version/​Model ^ Launch Date ^ S/N ^ OpenWrt Version Supported ^ Model Specific Notes ^ ^ Version/​Model ^ Launch Date ^ S/N ^ OpenWrt Version Supported ^ Model Specific Notes ^
-| DIR-505 A1    | ??          | ??  | AA + trunk                ​| No "​Charge Mode" ​    | +| DIR-505 A1    | ??          | ??  | 14.07                     | No "​Charge Mode" ​    | 
-| DIR-505L A1   | ??          | ??  | AA + trunk                ​| Charge mode          | +| DIR-505L A1   | ??          | ??  | 14.07                     | Charge mode          | 
-| DIR-505L A2   | ??          | ??  | AA + trunk                ​| Charge mode; exchangeable mains plug | +| DIR-505L A2   | ??          | ??  | 14.07                     | Charge mode; exchangeable mains plug |
  
 ===== Hardware Highlights ===== ===== Hardware Highlights =====
 ^ CPU ^ Ram ^ Flash ^ Network ^ USB ^ Serial ^ JTag ^ ^ CPU ^ Ram ^ Flash ^ Network ^ USB ^ Serial ^ JTag ^
-atheros ​AR1311-AL1A | 64MiB | 8MiB | 100mips x1 wifi Atheros 9380 | Yes | Yes | No | +Atheros ​AR1311-AL1A |  64MiB   8MiB  | 100mips x1 wifi Atheros 9380 |  1x 2.0  ​ Yes   No  
  
 ===== Installation ===== ===== Installation =====
 +
 +==== Web Interface ====
 +
 Starting with r37834 the device can be flashed via the web interface using a prebuilt factory image. For earlier versions (AA) you need the serial connection to flash the device or build the factory image yourself. Starting with r37834 the device can be flashed via the web interface using a prebuilt factory image. For earlier versions (AA) you need the serial connection to flash the device or build the factory image yourself.
 +
 +Since Barrier Breaker 14.07, prebuilt stable images are available at the links given above.
 +
 +**The easiest method to flash a DIR-505** with an OpenWrt factory image is via the //D-Link Router Recovery Mode// as described in http://​forums.dlink.com/​index.php?​topic=44909.msg162511#​msg162511
 +
 +The essential how to for the //D-Link Router Recovery Mode//:
 +
 +<​file>​
 +1 Store a copy of the OpenWrt firmware (.BIN) on the HDD of a local PC
 +2 Connect an Ethernet cable between the LAN port on the router and the network port on the local PC
 +3 Configure the PC with a static IP address other than 192.168.0.1 (e.g. 192.168.0.5)
 +4 Power down the router
 +5 Press and hold the reset button on the router for 3 to 5 seconds and re-plug the power without releasing the reset button
 +6 Continue to hold the reset button until the red power light keeps blinking on and off
 +7 Open a web browser and enter the following address: http://​192.168.0.1/​
 +8 Wait for the '​D-Link Router Recovery Mode' page to load
 +9 Click the [Choose File] button, select the OpenWrt router firmware stored on the local PC and then press [Upload]
 +10 After the new OpenWrt firmware has successfully loaded, a '​Success'​ page will display
 +11 If the '​Success'​ page fails to display, then repeat steps 4 through 9
 +</​file>​
 +
 +See also: [[toh:​d-link:​dir-505#​debricking|D-LINK DIR-505 debricking]]
 +
 +==== Back to original firmware ====
 +
 +The header in the bin file is 84 bytes long, (see for example that this is mentioned in this [[http://​www.securityfocus.com/​archive/​1/​528516|security advisory]]),​ so the following is supposed to work:
 +
 +First, remove 84 bytes from the firmware
 +<​code>​
 +$ dd if=original.bin of=strippedfw.bin bs=84 skip=1
 +</​code>​
 +Copy the file to the router
 +<​code>​
 +$ scp strippedfw.bin root@192.168.1.1:/​tmp
 +</​code>​
 +And flash it:
 +<​code>​
 +# mtd write /​tmp/​strippedfw.bin firmware
 +</​code>​
 +**Wait** until it finishes.
 +
 +Reboot and the router should be back to original firmware.
 +
 +If that doesn'​t work, see [[toh:​d-link:​dir-505#​debricking|D-LINK DIR-505 debricking]].
 +
 +**WARNING:​** there are mixed success and failure reports (see [[https://​forum.openwrt.org/​viewtopic.php?​pid=202806#​p202806|these]] and [[https://​forum.openwrt.org/​viewtopic.php?​pid=276785#​p276785|posts]]),​ so be careful! It is not clear yet if it's always possible to go back to the original firmware.
  
 ==== Flash Layout ==== ==== Flash Layout ====
Line 504: Line 571:
 | WPS | Secure Easy Setup | | WPS | Secure Easy Setup |
  
 +=== Use WPS button for reboot and shutdown ===
  
-There is a 4 position switch on the top of the unitThe fourth position is used by the DIR-505L model to shutdown the software and operate as a USB charger - on the DIR-505 the case keeps the switch from going into the fourth position.+see [[https://​forum.openwrt.org/​viewtopic.php?​pid=248346#​p248346|this forum posting]] for how to use the WPS button ​to reboot / shutdown the device.
  
-I mapped out the gpio values. The switch ​seems to modify GPIO 19,20,21,22 and 23. This is what I got, respectively:​+=== Mode-switch ​===
  
-|"wifi hotspot"​|01001| +There is a 4 position ​switch on the top of the unit. The fourth position is used by the DIR-505L model to shutdown the software and operate as a USB charger - on the DIR-505 the case keeps the switch from going into the fourth position.
-|"​repeater"​|11001| +
-|"​Router/​AP"​|10001|  +
-|4th position|11000|+
  
 +You can use the mode switch for pretty much anything you want -- however, keep in mind that the "​Charge"​ position turns the router off and is pretty easy to accidentally switch to.
  
 +The switch seems to modify GPIO 19,20,21,22 and 23:
  
 +^  Switch position ​ ^  GPIO  ^
 +| "WiFi Hotspot" ​ | 01001 |
 +| "​Repeater" ​     | 11001 |
 +| "​Router/​AP" ​    | 10001 | 
 +| "​Charger" ​      | 11000 |
  
 ===== Hardware ===== ===== Hardware =====
Line 524: Line 596:
 | **[[doc:​hardware:​soc|System-On-Chip]]:​** ​ | SoC: Atheros AR9330 rev 1 | | **[[doc:​hardware:​soc|System-On-Chip]]:​** ​ | SoC: Atheros AR9330 rev 1 |
 | **[[doc:​hardware:​cpu|CPU]]/​Speed** ​       | Atheros AR9330 400.000MHz | | **[[doc:​hardware:​cpu|CPU]]/​Speed** ​       | Atheros AR9330 400.000MHz |
-| **Flash-Chip:**      | NANYA NT5TU32M16DG-AC  ​|+| **Flash-chip:**      | Macronix MX25L6406EM2I-12G |
 | **Flash size:​** ​     | 8192 KiB | | **Flash size:​** ​     | 8192 KiB |
-| **RAM:​** ​            ​| 64 MiB   |+| **RAM-chip:**        | NANYA NT5TU32M16DG-AC ​ | 
 +| **RAM size:​** ​       ​| 64 MiB   |
 | **Wireless:​** ​       | 802.11b/g/n | | **Wireless:​** ​       | 802.11b/g/n |
 | **Ethernet:​** ​       | 10/100 full duplex | | **Ethernet:​** ​       | 10/100 full duplex |
Line 565: Line 638:
 See above photo for connections. 115200 bps, 8N1. You can use any 3.3V serial dongle for this, I used a 3.3v arduino serial programming cable. See above photo for connections. 115200 bps, 8N1. You can use any 3.3V serial dongle for this, I used a 3.3v arduino serial programming cable.
  
 +When the case is open it may be more convenient to power the DIR-505 directly from a 5V power supply. The power connector is the female 4-pin header (2.54mm/​0.1in spacing) and has a symmetric connection: <​code>​[-|+|+|-]</​code>​ (the inner two pins are +5V, the outer ones are 0V/GND).
 ==== JTAG ==== ==== JTAG ====
 -> [[doc:​hardware:​port.jtag]] general information about the JTAG port, JTAG cable, etc. -> [[doc:​hardware:​port.jtag]] general information about the JTAG port, JTAG cable, etc.
toh/d-link/dir-505.1407502868.txt.bz2 · Last modified: 2014/08/08 15:01 by aind