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
Previous revision
toh:d-link:dir-505 [2013/05/17 20:32]
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 ======
  
-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.+---- 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.
  
  
 ===== Supported Versions ===== ===== Supported Versions =====
  
-Apparently so far there are two versions of the dlink 505. One is the DIR-505 ​and the other is DIR-505L. The only descrnable difference is extra parts for voltage stability and the addition of a "​Charge"​ mode on the mode switchwhich allows for charging USB devices via the USB port on the unit+Apparently so far there are three versions of the dlink 505DIR-505 ​A1, DIR-505L ​A1DIR-505L A2.
  
-Note that both versions work fine with Openwrt, no software changes are needed.+They differ a bit on the "​outer"​ hardware (switches, power supply stability, plugs), but the main router hardware is [[https://​forum.openwrt.org/​viewtopic.php?​pid=210869#​p210869|the same for all versions]]. 
 +Since the main router hardware is the same for all versions, all of them work fine with Openwrt.
  
-^ Version/​Model ^ Launch Date ^ S/N ^ OpenWrt Version Supported ^ Model Specific Notes ^ +505L A1 = 505 + extra parts for voltage stability and the addition of a "​Charge"​ mode on the mode switch, which allows for charging USB devices via the USB port on the unit.
-| DIR-505 | ?? | ?? | AA | No "​Charge ​Mode" ​+
-| DIR-505L | ?? | ?? | AA | Charge ​mode |+
  
 +505L A2 = 505L A1 + exchangeable mains plug. For EU + UK, one plug for each is supplied.
  
 +
 +^ Version/​Model ^ Launch Date ^ S/N ^ OpenWrt Version Supported ^ Model Specific Notes ^
 +| DIR-505 A1    | ??          | ??  | 14.07                     | No "​Charge Mode" ​    |
 +| DIR-505L A1   | ??          | ??  | 14.07                     | Charge mode          |
 +| 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 | unknown ​+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.
 +
 +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 497: 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 517: 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:**      | NANYA1207 NT5TU32N1608G (? barely can read last digits) ​|+| **Flash-chip:**      | Macronix MX25L6406EM2I-12G ​|
 | **Flash size:​** ​     | 8192 KiB | | **Flash size:​** ​     | 8192 KiB |
-| **RAM:​** ​            ​32 MiB   | +| **RAM-chip:**        | NANYA NT5TU32M16DG-AC ​ | 
-| **Wireless:​** ​       | 802.11n/g |+| **RAM size:​** ​       ​64 MiB   | 
 +| **Wireless:​** ​       | 802.11b/g/n |
 | **Ethernet:​** ​       | 10/100 full duplex | | **Ethernet:​** ​       | 10/100 full duplex |
 | **USB:​** ​            | Yes 1 x 2.0 ar7240-ehci| | **USB:​** ​            | Yes 1 x 2.0 ar7240-ehci|
Line 536: Line 616:
 Note: those pads are really meant for [[https://​en.wikipedia.org/​wiki/​Pogo_pin|Pogo pins]] (which you can get at places like sparkfun). If you solder to them, use a low-wattage soldering iron (15-30 watts) and use solder flux to clean the pads first. Then only solder magnet wire or a single strand of stranded copper wire (32 awg). Note: those pads are really meant for [[https://​en.wikipedia.org/​wiki/​Pogo_pin|Pogo pins]] (which you can get at places like sparkfun). If you solder to them, use a low-wattage soldering iron (15-30 watts) and use solder flux to clean the pads first. Then only solder magnet wire or a single strand of stranded copper wire (32 awg).
  
 +More photos: [[http://​galeria.tech-blog.pl/​D-Link_DIR-505/​]]
  
 ==== Opening the case ==== ==== Opening the case ====
Line 557: 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.
Line 572: Line 654:
 However, if you hold down the reset button at boot time, the original bootloader has a web interface that comes up, where you can re-flash the unit from.  However, if you hold down the reset button at boot time, the original bootloader has a web interface that comes up, where you can re-flash the unit from. 
  
-Plug in your computer to the unit, assign it an ip address of 192.168.0.100,​ and boot the unit up while holding down the reset. Once the light comes on, release the reset, and go to 192.168.0.1 on your web browser. From there you can upload a new image. ​+Plug in your computer to the unit, assign it an ip address of 192.168.0.100,​ and boot the unit up while holding down the reset. Once the red light starts to blink slowly, release the reset, and go to 192.168.0.1 on your web browser. From there you can upload a new image. After successful flashing, you'll see a "​Success"​ page in your browser. 
 + 
 +==== LED red/​green/​on/​off ==== 
 + 
 +After getting the "​success"​ page in your browser you might notice a different behaviour of the LED, depending on which image you flashed: 
 + 
 +== Plesiu'​s AA image == 
 + 
 +Please keep in mind, that the LED might not come on after flashing / rebooting, since it usually signals WiFi, which might not be up right after flashing. So don't misinterpret the off-LED as "​it'​s not working",​ when it's just showing: "Wifi is off". Try to access the router by ''​telnet 192.168.1.1''​. 
 + 
 +== Trunk image == 
 + 
 +The LED goes from blinking red to blinking green, and then to steady green. Congratulations,​ your DIR-505 just has booted and is waiting for you to ''​telnet 192.168.1.1''​ (at least it should be).
  
 ===== Bootloader Mods ===== ===== Bootloader Mods =====
-None+  - you could read about [[doc:​techref:​bootloader]] in general and about [[doc:​techref:​bootloader:​uboot|Das U-Boot]] in particular. 
 + 
 +==== U-Boot 1.1.4 modification for routers ==== 
 +Forum member [[https://​forum.openwrt.org/​profile.php?​id=72549|pepe2k]] made a modification of **U-Boot 1.1.4** for **Qualcomm Atheros** SoCs based devices (the project is still being developed, so new devices and SoCs will be supported in the future). Up to date information,​ binary images and sources can be found on official [[https://​github.com/​pepe2k/​u-boot_mod|GitHub repository]]. 
 + 
 +This modification started from [[http://​code.google.com/​p/​wr703n-uboot-with-web-failsafe/​|wr703n-uboot-with-web-failsafe]] project, but supports more devices, all modern web browsers, has a lot of improvements and other modifications (like U-Boot NetConsole, custom commands, overclocking possibilities etc.). 
 + 
 +More information:​ 
 + 
 +  * Official repository on GitHub: [[https://​github.com/​pepe2k/​u-boot_mod|U-Boot 1.1.4 modification for routers]] 
 +  * Discussion about this project on [[https://​forum.openwrt.org/​viewtopic.php?​id=43237|OpenWrt forum]] 
 +  * An article (in Polish) about one of the first version of this project on [[http://​www.tech-blog.pl/​2013/​03/​29/​zmodyfikowany-u-boot-dla-routerow-tp-link-z-atheros-ar9331-z-trybem-aktualizacji-oprogramowania-przez-www-i-konsola-sieciowa-netconsole/​|www.tech-blog.pl]]
  
 ===== Hardware mods ===== ===== Hardware mods =====
Line 581: Line 686:
   - The internal WiFi antenna sometimes has a tendancy to short to the board. If you open the device, slip a piece of electrical tape, (or even better, shrink wrap tubing) around the vertical piece of metal that extends over the board to keep it from bouncing around. Otherwise if it shorts, the smoke comes out of the processor. ​   - The internal WiFi antenna sometimes has a tendancy to short to the board. If you open the device, slip a piece of electrical tape, (or even better, shrink wrap tubing) around the vertical piece of metal that extends over the board to keep it from bouncing around. Otherwise if it shorts, the smoke comes out of the processor. ​
  
 +===== Notes =====
 +Other than similar routers (e.g., the TP-Link TL-WR703N), the D-Link DIR-505 uses the interface **eth1** rather than eth0. This means that if you build your own firmware, you must configure **/​etc/​config/​network** accordingly (option ifname '​eth1'​),​ or you will not be able to connect later on via Ethernet.
  
 +<​code>​
 +config interface '​lan'​
 +        option ifname '​eth1'​
 +        option proto '​dhcp'​
 +</​code>​
  
 +===== Custom OpenWrt image with LuCi integrated =====
  
-===== Notes ===== +http://​www.superwrt.eu/​en/​firmware/​d-link-dir-505/​
  
 ===== Tags ===== ===== Tags =====
 For some Help with the Tags, please have a look here: [[meta/​tags]] For some Help with the Tags, please have a look here: [[meta/​tags]]
  
-{{tag> FastEthernet, 1PHY, USB, 32RAM, ​8FlashMIPS }}+{{tag>​FastEthernet ​1NIC USB 64RAM 8Flash MIPS 802.11bgn}}
toh/d-link/dir-505.1368815553.txt.bz2 · Last modified: 2013/05/17 20:32 (external edit)