OpenWrt Forum Archive

Topic: USB2.0 host on TPL-WR841ND v7.2 (one of the solutions)

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

Hello, Everybody!

I provide the solution for how to make an a USB host on 7.2 hardware.


Short description:

1. materials and tools:
    1.1 USB type A connector. I use USB connector from PS2<->USB (from old mouse) adapter;
    1.2 about 120mm of copper wire with teflon insulation and 250mm of 0.35mm2 copper wire with PVC insulation;
    1.3 +5V power supply. I use MC33063 based step-down converter from old scanner;
    1.4 soldering iron, flux and solder wire;
    1.5 wire cutter;
    1.6 knife with sharp blade.

2. stages:
    2.1 cut 2 wire about 60mm length each;
    2.2 strip the insulation and tin the ends;
    2.3 twist the wire;
    2.4 glue a small piece of insulator on top of SW1 (reset) button;
    2.5 solder the USB connector on top of buttons bracket:

http://smartexec.homedns.org/tpl-wr841nd/USB_connector_on_top_of_buttons.jpg

    2.6 solder the twisted wire from PCB:

http://smartexec.homedns.org/tpl-wr841nd/USB_solder_point.jpg

to USB connector:

http://smartexec.homedns.org/tpl-wr841nd/USB_wiring.jpg

Pull down 15K resistors already provided (R601, R602);

    2.7 connect GND pin of USB connector to buttons bracket and make solder bridge on bottom side of PCB:

http://smartexec.homedns.org/tpl-wr841nd/solder_bridge_on_GND.jpg

This is not optimal in terms of EMI but it works!

    2.8 connect +5V pin of USB connector to the +5V power supply. Connect input of +5V converter to the FB1 near main power switch (SW7) and to GND pad of D5 (in my router D5 is not populated);
    2.9 make a hole for USB connector on a rear side of housing;
    2.10 enable EHCI in kernel configuration and make changes in source code as described on wiki page (http://wiki.openwrt.org/toh/tp-link/tl- … b.1.1.port).
    2.11 rebuild OpenWrt and enjoy!
   

kernel log from my router:


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 1-1: new high speed USB device number 2 using ar71xx-ehci
usb 1-1: New USB device found, idVendor=0bda, idProduct=8187
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: RTL8187_Wireless
usb 1-1: Manufacturer: Manufacturer_Realtek_RTL8187_

...

rtl8187: Customer ID is 0x00
rtl8187: wireless switch is on
usbcore: registered new interface driver rtl8187


I need an a USB host on router for secondary radio (RTL8187). I use secondary radio in client mode on WAN interface for connect to the my ISP.

I'm sorry for my English

Best regards, Andrew Kornev

P.S. Whatever you do you do at your own risk. I'm not any responsibility including for damage of equipment.
P.P.S. If you want to have worked WiFi LED in HW v7.2 make the following changes in mach-tl-wr741nd.c:

-      ap91_pci_setup_wmac_led_pin(1);
+        ap91_pci_setup_wmac_led_pin(0);

(Last edited by AndrewKo on 12 Jul 2011, 01:26)

Hi all!

First is want to say thank you for providing us this cool mod!
But i have a little issue with it, altough i followed the process to the letter.

You can see on the attached pictures my device, which is a WR841N v7.2

http://i43.tinypic.com/idwtgm.jpg http://i44.tinypic.com/aysim9.jpg http://i42.tinypic.com/34fle2g.jpg

I think i have soldered good the data+/-, and haven't cut or short anything around the resistors (made under magnifying glass).

Measured the voltage of the regulator made with L7805, 470uF condensator and a 100uF condensator, and it seems a fix 5.02V.

But when i connect any USB device to it (tried already with a 16Gb Kingston pendrive, 60GB External 2,5" HDD, 500Gb External 3,5" HDD (with external power supply, external USB 4port HUB) i get this dmesg output,
no matter which firmware using:

usb 1-1: new high speed USB device using ar71xx-ehci and address 2 
usb 1-1: device descriptor read/64, error -71 
usb 1-1: device descriptor read/64, error -71 
usb 1-1: new high speed USB device using ar71xx-ehci and address 3 
usb 1-1: device descriptor read/64, error -71 
usb 1-1: device descriptor read/64, error -71 
usb 1-1: new high speed USB device using ar71xx-ehci and address 4 
usb 1-1: device not accepting address 4, error -71 
usb 1-1: new high speed USB device using ar71xx-ehci and address 5 
usb 1-1: device not accepting address 5, error -71 
hub 1-0:1.0: unable to enumerate USB device on port 1

Full dmesg output

If you take a look at the full dmesg output you could that - i think - the usb port is properly recognised, but somehow because this error i cannot mount or use anything 

Already tried with the firmware what posted by Simon on dd-wrt forum,
and ANOTHER from the openwrt forum, which is
compiled for directly to the v7 series of wr841n.

Have you met with this problem?

There must be some solution out there, because without the usb i cannot use the features of the openwrt with a few Kbytes of free space :'(

Please, can someone pass me the ART.BIN 64K TP-LINK WR841ND v7.2, thanks, a hug Brazil!

I discovered pretty much the same problem as gregrice on my 1043 lately. When using a usb flash drive connected straight to the usb port, I get the following errors on unmounts or sometimes reads or writes:

EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
usb 1-1: reset high speed USB device using ar71xx-ehci and address 5
usb 1-1: device descriptor read/all, error -71
usb 1-1: reset high speed USB device using ar71xx-ehci and address 5
usb 1-1: USB disconnect, address 5
usb 1-1: new full speed USB device using ar71xx-ehci and address 6
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new full speed USB device using ar71xx-ehci and address 7
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new full speed USB device using ar71xx-ehci and address 8
usb 1-1: device not accepting address 8, error -71
usb 1-1: new full speed USB device using ar71xx-ehci and address 9
usb 1-1: device not accepting address 9, error -71
hub 1-0:1.0: unable to enumerate USB device on port 1
usb 1-1: new high speed USB device using ar71xx-ehci and address 10
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: USB disconnect, address 10
usb 1-1: new high speed USB device using ar71xx-ehci and address 11
usb 1-1: device descriptor read/64, error -71
usb 1-1: device descriptor read/64, error -71
usb 1-1: new full speed USB device using ar71xx-ehci and address 12
usb 1-1: new full speed USB device using ar71xx-ehci and address 13
usb 1-1: not running at top speed; connect to a high speed hub
usb 1-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices

(in 10.03/r20728)
In r29637 with kernel 3.1.6 it looks like this:

[  155.760000] usb 1-1: reset high speed USB device number 2 using ar71xx-ehci
[  155.920000] usb 1-1: device descriptor read/all, error -71
[  156.040000] usb 1-1: reset high speed USB device number 2 using ar71xx-ehci
[  156.200000] usb 1-1: device descriptor read/all, error -71
[  156.320000] usb 1-1: reset high speed USB device number 2 using ar71xx-ehci
[  156.360000] usb 1-1: device descriptor read/8, error -71
[  156.500000] usb 1-1: device descriptor read/8, error -71
[  156.730000] usb 1-1: reset high speed USB device number 2 using ar71xx-ehci
[  156.770000] usb 1-1: device descriptor read/8, error -71
[  156.910000] usb 1-1: device descriptor read/8, error -71
[  157.020000] usb 1-1: USB disconnect, device number 2
[  157.050000] sd 0:0:0:0: [sda] Unhandled error code
[  157.050000] sd 0:0:0:0: [sda]  Result: hostbyte=0x01 driverbyte=0x00
[  157.060000] sd 0:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 30 08 10 00 00 08 00
[  157.060000] end_request: I/O error, dev sda, sector 3147792
[  157.070000] Buffer I/O error on device sda2, logical block 360450
[  157.080000] lost page write due to I/O error on sda2
[  157.080000] sd 0:0:0:0: [sda] Unhandled error code
[  157.090000] sd 0:0:0:0: [sda]  Result: hostbyte=0x01 driverbyte=0x00
[  157.090000] sd 0:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 04 08 00 00 00 08 00
[  157.100000] end_request: I/O error, dev sda, sector 264192
[  157.100000] Buffer I/O error on device sda2, logical block 0
[  157.110000] lost page write due to I/O error on sda2

The weird thing about this is, that with a passive 4-port usb hub connected in between it works totally fine. Maybe there is some problem with the internal hub in the tp-links. If anyone can share some experience on that?

Since then i've solved my problem, it was a fried resistor next to the usb cable on board.
So i think your issue must be something like that, because since i've fixed it everything is okay now.
Maybe you can try it with external powered usb hub.

Well, what I was trying to point out is that the problem disappears when I put a passive (= not external powered) hub between router and flash drive. I thought about a bug in the ar71xx usb hub driver, but I didn't have the time to really look at it, yet.

Hi all,
I have some question about you method that modify TPlink in order to used USB host.
My question is USB host that you have modify can used with USB to VGA device?

hi

MBS wrote:

Well, what I was trying to point out is that the problem disappears when I put a passive (= not external powered) hub between router and flash drive. I thought about a bug in the ar71xx usb hub driver, but I didn't have the time to really look at it, yet.

It's good, that you soldered capacitors to the 7805, but with long wires this IC might need ceramic capacitors about 0.1uF on input  and output.

My Rosewill RNX-N300RT (rebadged WR841N(D) V7) points seem to be a tad different then the pics shown here. Sorry, this is the best pic I could get with my SGSII. Anyone know what two points would be for the usb mod?

http://s4.postimage.org/i3r2rejj1/IMG_20130203_163327.jpg

I was thinking of the two points here (red boxed), but I was not getting any data (or my soldering skills suck).

http://s18.postimage.org/4s28s91vt/edited.jpg

Compared to this pic, you can see some of the differences.
http://smartexec.homedns.org/tpl-wr841nd/USB_solder_point.jpg

Takenover83 did you ever get USB working on your RNX-N300RT? From the photos you posted it looks to me like the connection points would be somewhere on the four components shown one row down in your photo. Perhaps the same points as in the row of four components on the TPL-WR841ND, but I would not want to guess that without further investigation. I just got a RNX-N300RT myself. Not sure I will need USB, but if don't have this working yet I can open it up and give you my best guess.

Hi everyone!

I will appreciate if someone shares the firmware which supports usb. just.box2011@yandex.ua

Thanks in advance!

(Last edited by zloyadmin on 4 Nov 2013, 16:09)

how about version 8.2? I do not have the same pinout...

Hi, I want to connect USB, flashed firmware http://downloads.openwrt.org/snapshots/ … actory.bin This firmware is USB mod? that is, if I soldered everything in a manual, then I will work USB? or firmware to collect under USB modes ???

bookkc wrote:

Hi, I want to connect USB, flashed firmware http://downloads.openwrt.org/snapshots/ … actory.bin This firmware is USB mod? that is, if I soldered everything in a manual, then I will work USB? or firmware to collect under USB modes ???

Yes, TP-Link TL-WR841N v7 has similar hardware that TL-WR840N v1 and with USB would be similar to TP-Link TL-MR3420 v1 and TL-WR842ND v1.

The discussion might have continued from here.