Browsed by
Tag: dir-615

OpenWRT on the DIR-615 Rev. A1 (Marvell 88F5181L) [Work In Progress]

OpenWRT on the DIR-615 Rev. A1 (Marvell 88F5181L) [Work In Progress]

This article will document the process of making OpenWRT work on the DIR-615 rev. A1.

In its dmesg, the stock firmware reports this board as “Marvell Development Board (LSP Version 0.0.102)– RD-88F5181L-VOIP-FE”.

In the GPL’d source code available from D-Link [FTP], in DIR-615A1-GPL.tgz (inside the downloaded file), in Noahsark/platform/MVL5181/linux/arch/arm/mach-mv88fxx81/Board/boardEnv/DB_88FXX81/mvBoardEnvSpec.h, a search for “RD-88F5181L-VOIP-FE” reveals a list of constants that pertain to the board. (See attached .XLS file)

I created Board ID# 4262 at the ARM Linux website to describe this board.(This document from explains why this needs to be done, and goes into detail about how to get support for your particular Orion board type in the mainline Linux kernel. This only ever needs to be done once for each type of board defined on the ARM Linux site, so consider it “already done” for the D-Link DIR-615 and/or the Marvell RD-88F5181L-VOIP-FE reference board.)

Update (25-Jul-2012): I just received my Dangerous Prototypes Bus Blaster to allow me to use JTAG with either OpenOCD or urjtag, among others. It seems that the resistor and capacitor footprints beside the JTAG header need to be populated to allow JTAG access. Proper SMD resistors and caps are part of my next DigiKey order.

Unbricking a D-Link DIR-615 Rev A1

Unbricking a D-Link DIR-615 Rev A1

I have managed to unbrick a D-Link DIR-615 Rev A1 back to D-Link firmware (1.00) from firmware 1.10. Allow me to describe the situation:

  • Given a direct connection to my laptop, the router does not respond to HTTP requests on either WAN or LAN, does not assign DHCP IP addresses, cannot ping or respond to pings, but does show up on the laptop in the ARP tables (arp -an). (This same setup has worked for numerous non-bricked routers, so it seems that some busybox functionality is corrupt.)
  • Over serial, the uBoot bootloader cannot connect to a TFTP server (and does not have the ability to flash over serial).

Attached to this article is a log of one of these so-called “failboots”. It can be easily identified as it only one block of text following the BusyBox ash shell:

BusyBox v1.1.0 (2007.07.26-06:29+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ # pc : [<40146968>] lr : [<400ca0b8>] Not tainted
sp : befaf8a0 ip : 00000002 fp : 40079bf8
r10: 00000003 r9 : 40079bb8 r8 : 00050500
r7 : befb5c75 r6 : 00026740 r5 : befb5c74 r4 : 0002674a
r3 : 00000065 r2 : 0000000a r1 : 00026741 r0 : 400ca0b7
Flags: nzCv IRQs on FIQs on Mode USER_32 Segment user
Control: A005317F Table: 01DF0000 DAC: 00000015

A successful bootup (log also attached) is followed by much more serial chatter, such as bringing up interfaces, mounting flash, etc.

BusyBox v1.1.0 (2007.01.24-07:26+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ # cp -f /etc/nvram.default /var/etc
mount -t jffs2 /dev/mtdblock2 /flash
cp -f /flash/nvram.conf /var/etc
brctl addbr br0
brctl stp br0 off
brctl setfd br0 0
brctl addif br0 eth1
device eth1 entered promiscuous mode
[... etc ...]

To recover your device:
(Warning: This might damage your device; however, if you are in need of these instructions, I don’t think it’s possible to damage it any more.)

1) Solder on serial headers to CON5 (on the side opposite of the mini-PCI slot)

2) With an Ethernet cable, connect the DIR-615’s WAN port to one of the LAN ports of another router, as it doesn’t play well otherwise. (It seems to need an intermediary to handle ARP tables for it while bricked like this)

3) Power it on, let it boot up, and over the serial connection to the router, run “ipconfig eth0” or some other memorable IP address that’s in the same subnet as your computer

4) Again, over serial connection to the router, run “tftpd”

5) On your computer, download the firmware from DLink:

6) And with a tftp client (See Installing OpenWRT via TFTP (Bootloader contains TFTP Server)), upload the .bin file to the router.

The router will flash itself, then reboot, and erase the (dirty) NVRAM. It will set itself to the default

The key, I believe, lies in installing a version of firmware that is not currently installed, so as to erase all NVRAM settings. If you try to reinstall the same firmware, it will not clear the device’s (faulty) settings. In other words, there may be a much easier way to debrick the device, however with the limited (and possibly corrupt) BusyBox commands, I took the first viable option I could get.

I hope this works for you as it did for me, but as usual, ‘no promises’.

WIP: DIR-615 rev C1 Hacking

WIP: DIR-615 rev C1 Hacking

In my most recent thrift store trips, I found (among other things) a large quantity of D-Link DIR-615 Rev C1.

Some relevant linkage:

Things on my TODO List:

  • Add a USB port and/or hub, and supporting components
  • Add a third antenna (requires a lot of supporting components)
  • Install Kismet and gpsd for a mobile wardriving box?
  • Add I2C Bus over GPIO
  • Add SD Card Support over GPIO?