OpenWrt Forum Archive

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

The content of this topic has been archived between 9 Apr 2018 and 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

How to mod 615 c2's flash from 4mb to 8mb or 16mb,any ideas?

Hi,

To regressor & tuckata: thanks guys, you've done great work.
I used tuckata's binarys to set up.
Now I have extroot, usb2 drive (fat32), samba3 server and transmission for torrents.
It all work's together over WiFi and I quite happy.

But performance of read/write data to/from usb drive just 400/800 KB/s.
Is this max usb speed or I do something wrong?
In the same time my lan-wlan speed is fine.

Everyone who has similar configuration what is your max external usb drive speed access?

bamb00r,

My estimated bandwidth is ~12MB/s read and ~2MB/s write to a microSD card on USB Card reader mounted on /overlay:

root@ferdo:/overlay# mount
...
/dev/sda1 on /overlay type ext3 (rw,sync,relatime,errors=continue,data=writeback)
...

root@ferdo:/overlay# time dd if=/dev/zero of=zero.bin bs=1M count=32
32+0 records in
32+0 records out
real    0m 16.18s
user    0m 0.00s
sys     0m 1.51s

root@ferdo:/overlay# time dd if=zero.bin of=/dev/null bs=1M
32+0 records in
32+0 records out
real    0m 2.70s
user    0m 0.00s
sys     0m 0.60s

Please tell more about your configuration (software and hardware). How exactly did you install USB support in OpenWRT?

Hi tuckata,

/dev/sda1 on /overlay type ext3 (rw,sync,relatime,errors=continue,data=writeback)

/dev/sdb1 on /mnt/data type vfat (rw,relatime,fmask=0022,dmask=0000,allow_utime=0022,codepage=cp866,iocharset=cp1251,shortname=mixed,errors=remount-ro)

root@OpenWrt:/overlay# time dd if=/dev/zero of=zero.bin bs=1M count=32
32+0 records in
32+0 records out
real    0m 10.57s
user    0m 0.00s
sys     0m 1.59s
root@OpenWrt:/overlay# time dd if=zero.bin of=/dev/null bs=1M
32+0 records in
32+0 records out
real    0m 5.33s
user    0m 0.01s
sys     0m 0.11s

sdb1 is the second flash drive that I use as data storage.

There is all OK with my root flash drive, also all OK when I copy data inside sdb1 (3.5MB/ps).

But when I copy data from my notebook to sdb1 speed drops down to 100-60Kb/ps.
It seems that problem is not in usb but may be in samba.

I plan to move on 10.03.1-rc5 and see what will change.

(Last edited by bamb00r on 11 Oct 2011, 11:09)

Hello everybody. I have made up firmware rc6. Also I tried to use the firmware made by Tuckata (http://sites.google.com/site/tuckata/downloads). nfs server doesn't work. dmesg: http://pastebin.com/iNAGs3G5 . In the official firmware (openwrt RC6) nfs server works, but usb doesn't work. Help to solve my problem please. By the way, when I copy files to my hdd, samba's speed is 9 mB/s writing, 11.5 reading. Has anybody succeeded in mounting ext4? As for me, I have not. There is nothing in dmesg.

(Last edited by fly on 2 Dec 2011, 06:46)

Hi fly,

Uploaded here https://sites.google.com/site/tuckata/downloads/ is a freshly compiled image of Backfire 10.03.1-rc6 with USB support. NFS should also work, but I haven't tested it - I have no time right now. If you wish you could test it and post results.

It seems the problem with nfs starts with:

sunrpc: Unknown symbol __ipv6_addr_type

This symbol is exported by /net/ipv6/addrconf_core.c and this file is included if IPv6 support is enabled in the kernel. The uploaded image is compiled with USB support patch and with IPv6 enabled.

Good luck,
tuckata

tuckata;

HI there again, I wanter to tell you and (thanks for help) , I got it working the (sort of) the USB is* partially functional, the drive will still become corrupted though however with IO errors eventually>>  and this is dew massive amount of resets from reading and incorrect device descriptor errors.

Is there anything that may prevent (causes that you can think of?)  this?

Thanks for the previous help.

PS Im in the Bleeding Edge

(Last edited by jasonsmr on 12 Dec 2011, 12:54)

Hey, Jason, nice to hear from you again,

First, as you are using Bleeding Edge it is possible that you are experiencing a software problem. If you were using a stable (Backfire) branch I would say it is a hardware problem, but it cannot be ruled out in this situation. I did also begin initially with trunk branch and after a lot of fight I finally got it working. And after a short while I noticed that when I tried to run a program from the external flash drive filesystem (ext2 or vfat) it crashed with 'segmentation fault'. After a lot of additional effort I finally figured that it is in the kernel filesystem code for mips arch - it was missing a data cache flush when necessary. I patched it and it worked like a charm. I never posted the patch because when I've downloaded a newer trunk revision it worked fine without the patch! Your problem seems to be different from that I've experienced, but just to make sure that you do not have a software problem you may try using a stable branch, which is proven to work without problem (like Backfire 10.03.1-rc5).

And about hardware, I have two suggestions. First, from time to time I have a similar problem with an external drive and it seems like there is a loose contact within the USB hub connector (I am using an external 4 port USB hub) - when I unplug and then plug back the USB connector the problem disappears. Second, the impedance matching resistors should be no more than 22 ohms. I've tried initially 33 ohms resistors and there were a lot of communication errors. 22 ohms should be best, but even without resistors (0 ohms) is also fine.

The problem you are experiencing seems more similar to my hardware problems so may be you could first rule out any obvious hardware problems and if everything seems fine you could flash a stable firmware just to rule out a software problem.

OK, good luck!

tuckata

Hi, Tuckata! After installing your image Backfire 10.03.1-rc6, nfs server still doesn't work. I am doing everything according to manual http://wiki.openwrt.org/doc/howto/nfs.server . My friends has got wndr3700 openwrt Backfire 10.03.1-rc6, he does everything the same way and everything works without any problems. When I type the command exportfs -ar, I see the following:

root@OpenWrt:~# exportfs -ar
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.109:/mnt/media".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

exportfs: Warning: /mnt/media does not support NFS export.
exportfs: can't open /var/lib/nfs/rmtab for reading
exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 2 (No such file or directory)
exportfs: can't lock /var/lib/nfs/etab for writing
exportfs: could not open /var/lib/nfs/.xtab.lock for locking: errno 2 (No such file or directory)
exportfs: can't lock /var/lib/nfs/xtab for writing
root@OpenWrt:~#

When I type /etc/init.d/nfsd start everything stops and logread:

1 00:48:28 OpenWrt daemon.notice rpc.statd[2721]: Version 1.1.6 Starting
Jan  1 00:48:28 OpenWrt daemon.warn sm-notify[2722]: Failed to open /var/lib/nfs/sm.bak: No such file or directory
Jan  1 00:48:28 OpenWrt daemon.notice rpc.statd[2721]: statd running as root. chown /var/lib/nfs/sm to choose different user
Jan  1 00:48:28 OpenWrt daemon.warn exportfs[2723]: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.109:/mnt/media".   Assuming default behaviour ('no_subtree_check').   NOTE: this default has changed since nfs-utils versio
Jan  1 00:49:03 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:49:38 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:50:13 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:50:48 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:51:23 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:51:58 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:51:58 OpenWrt user.warn kernel: svc: failed to register lockdv1 RPC service (errno 5).
Jan  1 00:51:58 OpenWrt user.warn kernel: lockd_up: makesock failed, error=-5
Jan  1 00:52:33 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:53:08 OpenWrt user.notice kernel: rpcbind: server localhost not responding, timed out
Jan  1 00:53:43 OpenWrt daemon.err nfsd[2724]: nfssvc: writing fds to kernel failed: errno 5 (Input/output error)

Check owner and permission of the mentioned files/directories (chown, chmod) and as which user nfsd is running normally.

I type chmod -R 777 /var and chown -R root /var, still doesn't work

tuckata, Would you be interested in assisting me with a full usb mod for the c1 series or later?, The wiki has the full usb spec on it, and I furthermore would like to add some other capabilities to the router like more memory and a serial camera. If your good with SPI maybe I was thinking about adding a different sata interface for a proper hard drive?

Its a lot to do I know . however please tell me
Tell me what you think..

jason.

you know tukata, Im not using a flash drive its a micro IDE pluged into the usb via a converter, micro IDE is like a ZIF disk or micro disk-different pins ZIF disks are closely related because well the converter has it too ^^

Jason, you are welcome,

I have thought about using the SPI but there is a drawback - the bus runs at 33 MHz so the highest theoretical throughput is 33 Mbit/s and the
USB 2.0's theoretical throughput is 480 Mbit/s. Also, on USB you could connect (almost) anything you want - an USB camera also.

About the harddrive - I would suggest that you start it simple until you are sure that everything runs fine and then upgrade. The more complex is the system the more things could go wrong. I started with a simple flash drive and when I was sure that everything runs fine I added an external hub and attached an external haddrive (with USB to IDE converter), USB audio, USB printer, etc.

Bit by bit everything will be fine smile Please tell me more in detail about the hardware mod you've made and more about how you install the firmware on the router.

tuckata

Fly,

I can tell the kernel modules load properly now. To tackle the nfs problem in more detail I will have to reinstall the whole firmware and will need more time.

tuckata

Tuckata, thanks for the help, I'll wait, I do not know what to do..

tuckata; I snooped around a little bit (I dont have a probe for it )

the errors that I am getting in the serial output read as follows::> on a heavy load like a program executing.

usb 1-1: reset high speed USB device number 2 using ar71xx-ehci                                                             
usb 1-1: device descriptor read/64, error -71

the above are common^^ they can (I think be safely ignored)

then the following happens if the load is really big::>>

sd 0:0:0:0: [sda] Unhandled error code                                                                                       
sd 0:0:0:0: [sda]  Result: hostbyte=0x07 driverbyte=0x00                                                                     
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 02 24 03 28 00 00 08 00                                                           
end_request: I/O error, dev sda, sector 35914536

the above will usually lead to a corrupt file or inode and ill repair it by umounting the drive at router restart and then pluging it into a pc with a known good usb and run the journal recovery e2fsck

Im not sure what it is maybe its the "usb reference resister" missing off the bottom of the router? IDK

Recall;; that we have the full blueprint schematic of this router for referencing the usb 's component.

and as always any help is greatly appreciated

HERES a MASSIVE ERROR (looks like a kernel heart failure) Although after this happened the kernel still was running!!

PasteBin ::>> http://sprunge.us/GgXZ

(Last edited by jasonsmr on 16 Dec 2011, 20:09)

Jason, I have an idea for what might be going on. This error seems like a hardware one. I have a USB card reader which is working perfectly on one computer and is giving such massive IO errors when connected to another computer. It seems that it has an unusually high resistance on the IO lines and this seems to be causing the problem. If I am correct it is possible that the device might work properly if you use 0 ohms instead of 22 ohms for impedance matching resistors R230 and R237, i.e. just short them out. There is a very simple way to check if this is the problem - just try using some USB flash drive - if it is working correctly (without IO errors) then this problem is highly probable. The other possibility is that the device is malfunctioning.

Good luck,
tuckata

Fly,

I have recompiled the firmware (Backfire 10.03.1-rc6) with the original config (http://downloads.openwrt.org/backfire/1 … 1xx/config) and the nfs server is working but the wireless is not working properly so it is useless. I don't know when I will have time to play with it.

tuckata

Hi All,

Happy New Year!

Uploaded here https://sites.google.com/site/tuckata/downloads/, in subfolder openwrt-backfire-10.03.1-rc6, are compiled images of openwrt-backfire-10.03.1-rc6 with USB enabled. NFS is working now, I've tested it. The original config is used and everything which is working in the original firmware should work in this one as well.

Cheers,

tuckata

(Last edited by tuckata on 2 Jan 2012, 00:35)

Hi tuckata! Happy New Year! I have checked, everything works!!!))) how did you solve the problem? Thanks a lot. You are a superman)))

(Last edited by fly on 11 Jan 2012, 11:43)

Sorry for the BIG bump, but..

tuckata wrote:

And about hardware [...] the impedance matching resistors should be no more than 22 ohms. I've tried initially 33 ohms resistors and there were a lot of communication errors. 22 ohms should be best, but even without resistors (0 ohms) is also fine.

I notice on page 15 of the schematic linked on the Wiki page (PDF) that, since the footprints of R230/R237 (0R) and L26 (DLW21SN900SQ2 (digikey.ca link) / common mode choke coil, 300mA) are overlapped, it seems to imply an either/or situation. Would the choke help ease some of the (possibly RF-related) USB speed/connection problems that people have been having?

I pondered populating the USB Overcurrent IC (U4), but then realized that all of its useful I/O is actually either grounded or pulled up. It'd probably just be cheaper to add a MOSFET on a GPIO line.

And some off-topic...
I am also pondering the addition of an extra 8MB flash.. Solder a second one on top with all pins matching except for the !CS pin, and tie that to a GPIO. I wonder if the kernel has support for something like that, or whether it would need some coding hacks... Either way, there seem to be plenty of threads about "flash mods", I'm sure one of them has done it wink

I got one DIR-615 revC1 from the thrift store for $5, and another 3 used off ebay. A cluster of 615s, you say?

Hi All,
can somebody compile 16M or 8M u-boot for DIR-615 C1?
thanks

(Last edited by astralstorm on 17 Jun 2012, 10:40)