Browsed by
Tag: D-link

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 Nas-Central.org 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 192.168.1.25” 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: ftp://ftp.dlink.com/Gateway/dir615/Firmware/dir615_firmware_100.bin

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 192.168.0.1.

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?
D-Link DWL-120 Hacking/Probing

D-Link DWL-120 Hacking/Probing

I found 3 or 4 of these at a garage sale a few years ago for a few bucks, and I am (surprisingly) just cracking them open now.

On the front, it is marked as D-Link DWL-120 11Mbps Wireless USB Adapter, on the back is FCC ID# MXF-WL280, H/W: B2, F/W: 2.25

On the bottom of the PCB, we have the following chips:

  • Atmel AT76C503AWireless LAN MAC Unit with ARM7TDMI RISC Processor
  • Atmel AT25040N4K (512 x 8) SPI Serial EEPROM
  • tmTECH T14L1024N128 x 9 High-Speed CMOS Static RAM
  • Intersil HFA3861BINDirect Sequence Spread Spectrum Baseband Processor

On the top of the PCB (under the RF shield), we have the following chips:

  • Intersil HFA3683AIN2.4GHz RF/IF Converter and Synthesizer
  • Intersil HFA3783INI/Q Modulator/Demodulator and Synthesizer
  • Intersil HFA3983IV2.4GHz Power Amplifier and Detector

I plugged it into my i386-based laptop (My x64 desktop doesn’t have drivers) and got this dmesg:

[   80.592101] usb 1-2: new full speed USB device using uhci_hcd and address 2
[   80.763204] usb 1-2: configuration #1 chosen from 1 choice
[   81.504200] cfg80211: Using static regulatory domain info
[   81.504209] cfg80211: Regulatory domain: US
[   81.504215] 	(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   81.504224] 	(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
[   81.504233] 	(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[   81.504241] 	(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[   81.504248] 	(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[   81.504256] 	(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[   81.504264] 	(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
[   81.504290] cfg80211: Calling CRDA for country: US
[   81.654555] cfg80211: Regulatory domain changed to country: US
[   81.654567] 	(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   81.654577] 	(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   81.654585] 	(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   81.654593] 	(5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   81.654601] 	(5490000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   81.654609] 	(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   81.912231] Atmel at76x USB Wireless LAN Driver 0.17 loading
[   81.912307] usb 1-2: firmware: requesting atmel_at76c503-i3861.bin
[   81.965349] usb 1-2: using firmware atmel_at76c503-i3861.bin (version 0.90.0-44)
[   81.967174] at76c50x-usb 1-2:1.0: downloading internal firmware
[   84.329808] usb 1-2: reset full speed USB device using uhci_hcd and address 2
[   84.477154] usb 1-2: device firmware changed
[   84.477265] usbcore: registered new interface driver at76c50x-usb
[   84.492786] usb 1-2: USB disconnect, address 2
[   84.604098] usb 1-2: new full speed USB device using uhci_hcd and address 3
[   84.781393] usb 1-2: configuration #1 chosen from 1 choice
[   84.789161] at76c50x-usb 1-2:1.0: downloading external firmware
[   85.032206] phy0: Selected rate control algorithm 'minstrel'
[   85.034924] phy0: USB 1-2:1.0, MAC 00:05:5d:f1:9d:39, firmware 0.90.0-44
[   85.034935] phy0: regulatory domain 0x00: <unknown>
[   85.383777] udev: renamed network interface wlan0 to wlan1
[   89.584738] ADDRCONF(NETDEV_UP): wlan1: link is not ready