Topic: D-Link DIR-615 HW rev C1 USB

I've been running an SVN version of Kamikaze on a D-Link DIR-615 (hardware revision C1) for a month or two and I decided to pop the cover off to take a look at what's inside today.

It appears that the D-link DIR-615 rev C1 has a place for a USB port, various components for the power supply to be soldered, and two spots that look like they need to be bridged for the USB data pins, but they are all unpopulated. There's even a cutout in the plastic for it, so no dremeling would be required, one would only need to cut a hole in the sticker covering the back with an x-acto knife.

I have a few questions, though...

1) Has anyone else noticed this?

2) How hard would it be to get the USB port hooked up and working? This router runs off of a 5 volt power supply, unlike most that use 12 volts, so I'm thinking that the power supply circuit doesn't need to be too complicated.

3) How hard would it be software-wise to support this USB port?  Do other routers based on the ar71xx/ath9k chipset have USB ports already? If so, does OpenWrt Kamikaze support the USB port on those routers?

I think USB would be very useful on this router because it has only 4MB of flash even though it has 32MB of RAM.  (!) It would be possible to stick extra stuff on a flash drive that won't fit. (4MB is too small for a useful jffs2 partition.)

If I decide to try to hook up USB on this router, I'll post my results (including pictures) for anyone else who is interested in this.

Here are some pictures of what I'm talking about:

http://img10.imageshack.us/img10/6231/photo0edited.th.jpg
http://img14.imageshack.us/img14/3021/photo1zzz.th.jpg

Re: D-Link DIR-615 HW rev C1 USB

Hi there,

I'm also interested in this. I have the DIR-615 C2 hardware revision and will have a look on the circuit. I guess the first step will be to check out whether the lines are connected to the chip, by testing resistance to ground with a multimeter.

If the lines are connected, what is the story with the driver? I'm a familiar openwrt user but how do I go about finding what driver I need, and would the kernel need to be recompiled or something? How does the kernel know the pin outs etc?

3 (edited by superlogan 2009-07-23 23:03:22)

Re: D-Link DIR-615 HW rev C1 USB

@lincoln
This might be helpful... http://sites.google.com/a/roundsparrow.com/openwrt_ap81/

Re: D-Link DIR-615 HW rev C1 USB

Bad foto wink
but, looking from common usb hardware perspective:
pin 1 (nearest to board edge) must be +5V
pin 2 D-
pin 3 D+
pin 4 ground

Large unpopulated area near to usb socket - +5V power source, i'm think can be substituted by single 7805 stabilisator if you don't plan connect power-consuming usb devices.
Pin 2 and 3 must have 15K pull-down resistors to ground and connected to processor via 0-22 Ohm resistors.
Can you make more clear pictures?

Re: D-Link DIR-615 HW rev C1 USB

Any updates on this?  Has anyone had success adding USB to the DIR-615 (usb mod)?

Re: D-Link DIR-615 HW rev C1 USB

The connector placeholder on the PCB doesn't look like any USB connector I've seen. Judging from the width it's an upright connector but most upright USB connectors look like this.

http://parts.digikey.com/1/parts/1644561-conn-rcpt-usb-4pos-upright-pcb-67329-8001.html

Also judging from the traces on the PCB the top bottom are connected to the GND and the middle 2 are connected to something else (but seemingly both the same signal). It could be a3.5mm jack, a power connector or maybe an coax connector for an external antenna. The missing parts to the left of the first image are for an elco, a coil/transformer and I think maybe a fuse. This all combined leads me to believe the missing parts are for a different type of power supply which was discarded with newer versions.

Can you read the silkscreen (white letters) next to the missing components and let us the designation to maybe we can make more sense of what's supposed to be there.

Re: D-Link DIR-615 HW rev C1 USB

I think it's this USB connector here:
http://www.mouser.com/ProductDetail/Molex/48204-0001/?qs=sGAEpiMZZMtbbFRYSpBbWyR28kifuTHw
http://www.molex.com/pdm_docs/sd/482040001_sd.pdf

I don't have one with me right now, but I found this picture of the PCB on another website:
http://www.djcj.net/images/router/19-hq.jpg

From this, it looks like there are two signal lines (D- and D+) that go from the unpopulated USB connector to the ar71xx/ath9k chipset.  I'll try to trace it when I get my hands on one.

Re: D-Link DIR-615 HW rev C1 USB

Here's some more pictures (thanks to Chris Robb! http://www.djcj.net/routergallery.html).

It looks like R230 and R237 is where the 22 ohm series resistors should go.  I can't tell from this picture, but these two signal lines should go to the chipset... and there is probably a place for two 15k ohm resistors along the way (to be placed between signal lines and ground).  All that remains is setting up the 5v line, which should be easy because there are placeholders for the caps (C78, C79, etc)... and the DIR-615 is powered by 5V, 2.5A.

http://astrumtech.net/openwrt/dir-615/DIR-615_PCB_USB.jpg
http://astrumtech.net/openwrt/dir-615/DIR-615_PCB_USB_labeled.jpg

9 (edited by lexxai 2010-09-01 06:18:56)

Re: D-Link DIR-615 HW rev C1 USB

Dir 615 C2, OpenWrt Firmware  Kamikaze (r22048)

So... I do it,
into place of R230 and R237 install the 22 ohm , with 15K to ground at side of chipset line
+5V to pin1 of USB connector  via R 2 Ohm 2W

Flash disk was instered 4G

opkg update
opkg install kmod-usb-uhci
opkg install kmod-usb-core
opkg install kmod-usb2
opkg install kmod-usb-storage
opkg install hdparm
opkg install kmod-vfat

reboot

ls /dev - can't see scsi

dmesg

SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.

mount

rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=14796k)
tmpfs on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock4 on /overlay type jffs2 (rw,relatime)
mini_fo:/overlay on / type mini_fo (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)

img
http://picasaweb.google.com.ua/lh/photo/YlVzBlgQ-zy05NkBHGUCRw?feat=directlink
http://picasaweb.google.com.ua/lh/photo/xv2bQzjlMyqMJJG2lkZY8w?feat=directlink
http://picasaweb.google.com.ua/lh/photo/K6x-h3ZVR6uh2nq1OjoJFw?feat=directlink

Re: D-Link DIR-615 HW rev C1 USB

Looks like you got it working, lexxai.
Stumbled upon that outline too when I took it apart. Haven't given it much thought until I saw this thread.

Would you please post somewhat detailed instructions on how to do it and required items? And a picture of the end result will be great, if you please.

-Thanks,
Randy

TTU - Electrical and Computer Engineering Department; 2010 Freshman Student

Re: D-Link DIR-615 HW rev C1 USB

Any new updates on it??? Thanks for providing picture of the circuit. It shows hot to understand it effectively.

Re: D-Link DIR-615 HW rev C1 USB

root@OpenWrt:~# dmesg | grep -i usb
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.

And nothng more. Kernel can not see usb host, I think. Any ideas?

Re: D-Link DIR-615 HW rev C1 USB

Did you use 22 ohm resistors at R230 and R237?
Did you use 15K pull down resistors on both signal lines (D+ and D-)?
Did you supply 5v to USB pin 1?  If so how?

No one has ever confirmed that this mod actually works... it's all just speculation right now.  It looks like lexxai didn't get it working (correct me if I'm wrong).

Here's a few things I would try:
1. Remove the 15K pull down resistors (if you used them).  They may already be in the circuit.  Connect a multimeter to the signal lines and measure the resistance against ground.
2. I think the USB 2.0 Specification was modified to allow different values for the pull-down resistors (14.25K - 24.80K).  You may want to experiment with different values.  See here: http://www.usb.org/developers/docs/usb_20_081810.zip
3. Trace the signal lines (D+ an D-) back to the chip (past R230 and R237) and make sure they are actually connected.  They may be grounded out (because they weren't be used).

Hope this helps.  Good luck, and please post your results.

Re: D-Link DIR-615 HW rev C1 USB

http://imghost.urbantrip.net/pics2/a852121600a6abe80e9435de38f54ada.gif

I use R230 and R237 - 22ohm (chip resistors 0603 size).
As my RLC meter says that USB+ and USB- is not pulled-down at the time device switched off, I mounted two pull-down 15K resistors, at the side of U1 (Atheros AR9130).

Then I inserted USB flash drive, it pulls-up line "1" (see picture) from 0v up to +3.079v. Line "2" stays 0v always.
Do anybody know, how to force kernel to see usb device? Is device detected automatically, then connected to USB bus?

Re: D-Link DIR-615 HW rev C1 USB

I think the USB bus should be recognized simply by installing the correct kernel modules/drivers, regardless of whether or not a device is connected (or what pull-down resistors are used).  Therefore, you should see "new USB bus registered, assigned bus number 1" and "USB 2.0 started, EHCI 1.00" in dmesg after the USB 2.0 driver is loaded (without any USB device connected).  I don't know why it's not working.

The only thing I can think of is if the signal lines are pulled to ground, then maybe the USB host is not recognized?  Can you confirm that the signal lines are actually connected to the AR9130 (i.e. the pads at R230 and R237 should be connected to the respective pinouts of the AR9130)?  It's possible that the signal line traces are broken further down the line and not actually connected to the chip... and the respective pins on the chip are pulled to ground.  I don't have a DIR-615 C1/C2 board, so I can't check myself.

Also, what build are you using?  What packages do you have installed?

The AR9130 has USB 2.0 host support, so this mod should be possible.

Re: D-Link DIR-615 HW rev C1 USB

Hi i got the revision E1 and i got the same usb like headers...

any news or shematic with proof of this mod working, i will really apreciate a usb port for storage on the cheap dir-615

17 (edited by lexxai 2010-09-01 06:20:06)

Re: D-Link DIR-615 HW rev C1 USB

LinkZ wrote:

It's possible that the signal line traces are broken further down the line and not actually connected to the chip... and the respective pins on the chip are pulled to ground.  I don't have a DIR-615 C1/C2 board, so I can't check myself.

I think y a right.
Chip overlap board tracks, I can't see result of trace...

Images of my modding here https://forum.openwrt.org/viewtopic.php?pid=112758#p112758

some good news about Atheros AP81 platform, USB port, https://forum.openwrt.org/viewtopic.php?pid=115916#p115916

Re: D-Link DIR-615 HW rev C1 USB

With the TP-Link WR941ND I had to make a change to the kernel to allow it to register usb devices as per the following link.

http://forum.openwrt.org/viewtopic.php?pid=104964#p104964

If the DIR-615 does not come with USB standard, I would guess that the USB registration code is likewise not included. (you will need to check your equivalent code)

19 (edited by regressor 2010-09-30 01:30:40)

Re: D-Link DIR-615 HW rev C1 USB

I got Dir-615C2 (pcb marked as C1), compiled and installed kamikaze from svn...

To get USB support I changed file mach-dir-615-c1.c (added #include "dev-usb.h" at the beginning and "ar71xx_add_device_usb()" after "ar71xx_add_device_eth(1)").


-----------------------------------------------
DIR-615 USB up and running:

...
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ar71xx-ehci ar71xx-ehci: Atheros AR91xx built-in EHCI controller
ar71xx-ehci ar71xx-ehci: new USB bus registered, assigned bus number 1
ar71xx-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
ar71xx-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
...


Yesterday I just solder R230/R237 - 22ohm (0603), +5V and USB plug and tried small flashdrive. But no success. After that I checked voltage without flashdrive and got 3.3V on D- and 0.4V on D+... Looks like D- is not pulled-down. Also I found empty resistor pads for R2 near main chip but haven't time to check if this is USB D- pull-down resistor. I'll try to check today.

Looks like USB host is working and data lines connected....

Re: D-Link DIR-615 HW rev C1 USB

regressor wrote:

I got Dir-615C2 (pcb marked as C1), compiled and installed kamikaze from svn...

To get USB support I changed file mach-dir-615-c1.c (added #include "dev-usb.h" at the beginning and "ar71xx_add_device_usb()" after "ar71xx_add_device_eth(1)").

Will you get your compiled firmware ?
I will test too...

Re: D-Link DIR-615 HW rev C1 USB

I put images to my website:
http://iserverd.khstu.ru/download/openwrt-ar71xx-generic-dir-615-c1-squashfs-factory.bin
http://iserverd.khstu.ru/download/openwrt-ar71xx-generic-dir-615-c1-squashfs-sysupgrade.bin

Second try to get working flashdrive failed sad  Something wrong with dataline pins: When I start router without connected ethernet wires D-=0.2V, D+=0.2V; when I started it with ethernet wires connected  i got D-=3.3V, D+=0.65V
I'll want to try solder pull-down resisters under pcb tomorrow....

Re: D-Link DIR-615 HW rev C1 USB

regressor wrote:

Second try to get working flashdrive failed sad  Something wrong with dataline pins: When I start router without connected ethernet wires D-=0.2V, D+=0.2V; when I started it with ethernet wires connected  i got D-=3.3V, D+=0.65V
I'll want to try solder pull-down resisters under pcb tomorrow....

Are you using 15K pull down resistors on both signal lines (D+ and D-)?

Re: D-Link DIR-615 HW rev C1 USB

LinkZ wrote:

Are you using 15K pull down resistors on both signal lines (D+ and D-)?

Actually not. I'll try them today...

Re: D-Link DIR-615 HW rev C1 USB

I soldered 15K pull-down resistors. Still nothing.
After booting with ethernet wires connected D-=3.3V...
Pull-down doesn't work.

Looks like this is not USB pins... sad

Re: D-Link DIR-615 HW rev C1 USB

I think usb mod is possible because many devices on AR9130 and USB onboard exist such as Linksys E2100L, Linksys WRT160NL, Alfa Networks AIP-W502U. But all of those have 8 Mb of flash memory.

I have made this mod but it is not working. (