OpenWrt Forum Archive

Topic: IMPULSE DRIVE on my wrt54gs v1 (usb mod)

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

don't worry about the TVS diode, it is just an optional component
you may need a heatsink for 7805
and the 12v/1a may NOT be enough for you

I use a 5v 2a power because I know I only need to power a 5v/100ma flash drive

but two usb port may drain up to 5v/1a

so please make sure you are not overloading the power

and don't worry about the wattage of resistors

(Last edited by zerx on 14 Apr 2010, 07:26)

It looks like in addition to the heat sink I would also need to add a couple of capacitors to the 5v power circuit if I go with the regulator. If I were to go that route could I just run a 2 or 3 amp 12v supply instead of the 1 amp supply and be okay or would it just be better all around to run a second external 5v supply like you are doing? Here's an example of the 5v supply with the capacitors:

http://www.epanorama.net/circuits/psu_5v.html

either way will work
just make sure the voltage is regulated
and nothing is overloaded

Bummer, no go so far. I did a mock up on a breadboard drawing 12v from the WRT and stepping it down with a 7805 circuit. The power seems to work fine but I don't think the USB circuit is working. At least it's not detecting my 1GB cruzer thumb drive. It's a 2.0 drive but supposed to be compatible with 1.1. I did install the USB kernel modules and libraries and they are loaded. I plug the thumb drive in and it lights up for a second then goes out. Nothing in dmesg. I tried swapping D+ and D- and made no difference. I did pick up a separate 12v to 5v module already built. Maybe I'll try running that instead of drawing power from the WRT in case there is not enough power. The WRT runs fine though with or without the thumb drive plugged in. Again, I'm an electronics n00b so maybe my breadboard configuration is wrong. Here are some pics:

http://voidmain.is-a-geek.net/i/wrt54gsv3-usb1.jpg
http://voidmain.is-a-geek.net/i/wrt54gsv3-usb2.jpg
http://voidmain.is-a-geek.net/i/wrt54gsv3-usb3.jpg
http://voidmain.is-a-geek.net/i/wrt54gsv3-usb4.jpg
http://voidmain.is-a-geek.net/i/wrt54gsv3-usb5.jpg
http://voidmain.is-a-geek.net/i/wrt54gsv3-usb6.jpg

something you should try:

1.take away these 15k resistor

2.remove the original "472" resistor and put these 15k resistor back

3.flash your router to dd-wrt 13064+ and load only the OHCI driver (unless you are sure that currently your USB kernel modules and libraries are properly loaded)

4. do not use bread board for the usb signal lines

5.you may need to connect ground closer to bcm5352

ps. each of these is a independent suggestion

(Last edited by zerx on 15 Apr 2010, 08:32)

Crap, it works! smile

I'm not sure exactly what the problem was as it's currently working under the exact same setup as in the pictures. On the way out the door to work this morning I decided to try a few things. You did tip me off to one thing that would have caused it to never work. I didn't have the ohci kernel module installed, however after installing it and it detecting the ports it still didn't detect any device plugged into the USB ports, even after rebooting the router. So, I disconnected the 15k resisters, still nothing. Swapped the data lines, still nothing. Tried the other power source with a second power supply, still nothing.

So, I put everything back the way I started and power cycled everything. I logged in to the serial console and looked around and happened to look down and saw the thumb drive light was on steady. That was different. Looked at the dmesg output and it showed my mass storage. Installed vfat module (wasn't sure what I had on the stick and didn't want to reformat yet) and mounted the device with no problem. So now it's just put everything onto a permanent board and mount it.

Thanks for all your help on this!

Oh, this is Kamikaze 8.09.2 (2.4 kernel).

Hi, glad you got the bastard to play nice Void Man. Can you replicate this error with your setup when overclocking or underclocking?
The device no longer likes either overclocking or underclocking when the usb is plugged. I am thinking the bus itself is sensitive, thinking back agp or pci clock tempermentality prior to locks. I am neither using a regulator or additional resistors, just an adapter 5v @~1750ma. I've successfully run 3 devices off the unit (bcm5352) with an unpowered hub. The supply seems to be and should be more than ample wattage for 2 usb spec devices and the router, but acts funky when I change the clock frequency, something I didn't experience before.

hub.c: new USB device 00:03.0-2, assigned address 4
usb.c: USB device not accepting new address=4 (error=-71)
hub.c: new USB device 00:03.0-2, assigned address 5
usb.c: USB device not accepting new address=5 (error=-145)
hub.c: new USB device 00:03.0-2, assigned address 6
usb.c: USB device not accepting new address=6 (error=-71)
hub.c: new USB device 00:03.0-2, assigned address 7
usb.c: USB device not accepting new address=7 (error=-145)
hub.c: new USB device 00:03.0-2, assigned address 8
usb.c: USB device not accepting new address=8 (error=-145)
hub.c: new USB device 00:03.0-2, assigned address 9
usb.c: USB device not accepting new address=9 (error=-145)
hub.c: new USB device 00:03.0-2, assigned address 10
usb.c: USB device not accepting new address=10 (error=-145)
hub.c: new USB device 00:03.0-2, assigned address 11
usb.c: USB device not accepting new address=11 (error=-145)

Would you mind posting a speed test on your flash media as well? Ultimately I am trying to uncover a discrepancy between the flash/cpu speed buffer read tests and the usb/flash/cpu buffer speed tests (much slower) in another thread, my reason for attempting the clock change.

https://forum.openwrt.org/viewtopic.php?id=24291

(Last edited by yopo on 15 Apr 2010, 16:01)

Well, my numbers are about the same as yours on my WRT54GSv3 as far as speed:

# hdparm -tT /dev/scsi/host0/bus0/target0/lun0/disc 

/dev/scsi/host0/bus0/target0/lun0/disc:
 Timing cached reads:     2 MB in  2.22 seconds = 922.52 kB/sec
 Timing buffered disk reads:    4 MB in  4.47 seconds = 916.33 kB/sec

But not as bad as my SD card (MMC) on my WRT54Gv2.2:

# hdparm -tT /dev/mmc/disc0/disc 

/dev/mmc/disc0/disc:
 Timing cached reads:     2 MB in  5.86 seconds = 349.49 kB/sec
 Timing buffered disk reads:    2 MB in  5.56 seconds = 368.35 kB/sec

I'll try overclocking this evening. Also remember this is only USB 1.1 which has a maximum of 12mbps (1,536 kB/sec), so we are getting over half of the maximum possible which isn't bad in my opinion.

thanks man, much appreciation!

Actually, both usb 1.0 and 2.0 exist on the chip...given your -t result, you must be on the 1.1 channel so your router may be unaffected by the clock alteration, maybe. The prior page has my router's solder points. I used the 2.0 channel.

root@fscd@#$g54t:~# hdparm -tT /dev/scsi/host0/bus0/target0/lun0/disc
Timing cached reads:   116 MB in  2.00 seconds =  58.00 MB/sec
Timing buffered disk reads:    4 MB in  4.70 seconds = 871.49 kB/sec

Are you using the new mmc driver? With the sdhc driver, I consistently get no less than 400kB/s.

Here: http://www.youshare.com/Guest/152276478401b151.o.html

yopo wrote:

thanks man, much appreciation!

Actually, both usb 1.0 and 2.0 exist on the chip...given your -t result, you must be on the 1.1 channel so your router may be unaffected by the clock alteration, maybe. The prior page has my router's solder points. I used the 2.0 channel.

root@fscd@#$g54t:~# hdparm -tT /dev/scsi/host0/bus0/target0/lun0/disc
Timing cached reads:   116 MB in  2.00 seconds =  58.00 MB/sec
Timing buffered disk reads:    4 MB in  4.70 seconds = 871.49 kB/sec

Are you using the new mmc driver? With the sdhc driver, I consistently get no less than 400kB/s.

Here: http://www.youshare.com/Guest/152276478401b151.o.html

I haven't done any overclocking (never saw the need), I was going to test that for you tonight. Regarding your SD driver what OS are you running. I'm running Kamikaze 8.09.2 kernel 2.4. Is that what that module is for? The WRT54GSv3 has USB 2.0? I only see 1.1:

dmesg excerpt:

# dmesg | egrep -i "usb|hub|scsi|sd|partit|cruz"
Creating 5 MTD partitions on "Physically mapped flash":
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
SCSI subsystem driver Revision: 1.00
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-ohci.c: USB OHCI at membase 0xb8003000, IRQ 6
usb-ohci.c: usb-00:03.0, PCI device 14e4:4716
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
hub.c: new USB device 00:03.0-1, assigned address 2
usbserial.c: USB Serial support registered for PL-2303
pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.10.1
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: SanDisk   Model: U3 Cruzer Micro   Rev: 2.16
  Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 2006673 512-byte hdwr sectors (1027 MB)
sda: Write Protect is off
Partition check:
 /dev/scsi/host0/bus0/target0/lun0: p1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2

lsusb:

# lsusb -v 

Bus 001 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            0.00
  iManufacturer           0 
  iProduct                2 USB OHCI Root Hub
  iSerial                 1 b8003000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x0010
    Ganged power switching
    No overcurrent protection
  bPwrOn2PwrGood        2 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0100 power
Device Status:     0x0001
  Self Powered

lsusb -t:

# lsusb -t   
Bus#  1
`-Dev#   1 Vendor 0x0000 Product 0x0000
  `-Dev#   2 Vendor 0x0781 Product 0x5406

/proc/bus/usb/devices:

# cat /proc/bus/usb/devices 
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB OHCI Root Hub
S:  SerialNumber=b8003000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0781 ProdID=5406 Rev= 0.10
S:  Manufacturer=SanDisk Corporation
S:  Product=U3 Cruzer Micro
S:  SerialNumber=0000060414128490
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

modules:

# lsmod | grep usb
usb-storage            69648   1
usbserial              24620   0 [pl2303]
usb-ohci               19252   0 (unused)
usbcore                71296   1 [pl2303 usb-storage usbserial usb-ohci]
scsi_mod               66048   2 [usb-storage sd_mod]

That mmc driver works with every bcm linux firmware I have tried, from openwrt, and dd-wrt, to tomato. It is from a dd-wrt build from last December. I was under the assumption (since the datasheets aren't directly available by any route I know to verify) that all bcm5352 had usb2 as well, as per the prior page and my ~success. I guess I have usb 1 and the soldering points are as in bus 1/2. I didn't notice ehci wasn't loaded... oops....

(Last edited by yopo on 15 Apr 2010, 23:41)

What is the source of that mmc module? Is it already included in the kernel? Is it GPL? I'm not going to run it without knowing where it comes from. Regarding your mention of your usb2 success. I see where you posted a link earlier in this thread to another thread and you mention usb2 but you don't mention what it is that makes you believe you have usb2. It would be really nice if I could get usb2 but what I have read from zerx and from what I see on my router it's only v1.1.

If you read what I posted, you would know where it came from. Alternatively, it is in the module itself

"description=MMHC/SDHC Card Block Driver - 2.0.1"
"author=madsuk/Rohde/Cyril CATTIAUX/Marc DENTY/rcichielo KRUSCH/Chris"
"license=GPL"

More than enough to go on if you really wanted find the source and compile it yourself...

(Last edited by yopo on 15 Apr 2010, 23:50)

I soldered up a board and started a HOWTO:

http://voidmain.is-a-geek.net/wrt/wrt_usb_mod.html

It's all pictures for now but I'm tired and going to bed. Everything worked pretty well until the wires soldered to usb2 on the WRT board came loose and I couldn't get them to stick again. Down to one USB port now. I used a 10 pin serial header so it can be connected/disconnected.

Hi Zerx,
I have a wrt54gs v1.0 (CGN1 serial)
So you say for usb 2, need pins rh21 and rh22... I found them.

But where do you get the 5v and GND?  Or did you mean that you had to get it externally?

Thanks,
Robert

(Last edited by robnitro on 25 Apr 2010, 01:46)

Never mind, I figured out that you meant running a 5v adapter instead of the stock 9v one.  Got it sorted out...

However speeds are slow... router to pc  660KB/sec.  PC to router 800KB/sec using SAMBA, ftp on a flash OR external HDD.

I wonder how to get USB 2.0 working, is that even possible on broadcom 4712?

re all,

anyone tried usb mod on Broadcom 4716 and/or 4704? in particular i'm interested in moding WRT 160N.

regards,

WRT54G v1.0  - maybe? (other non-linksys routers with Broadcom 4710 have usb)
WRT54G v1.1  - maybe?  (other non-linksys routers with Broadcom 4710 have usb)
WRT54G v2.0  - YES (http://woodhousellc.com/?tag=usb) (also I have managed it)
WRT54G v2.2  - probably (same BCM4712 as v2.0)
WRT54G v3.0  - probably (same BCM4712 as v2.0)
WRT54G v3.1  - probably (same BCM4712 as v2.0)
WRT54G v4.0  - probably (same BCM5352 as wrt54gs v3.0)
WRT54G v4+   - no
WRT54GL v*    - probably (same BCM5352 as wrt54gs v3.0)

WRTP54G v*   - no?
WRT54GS v3.0 - YES (http://voidmain.is-a-geek.net/wrt/wrt_usb_mod.html)
WRTSL54GS v* - no?

am I corrent? if not say, and I will maintain this preliminary list.

(Last edited by smellymoo on 29 Sep 2011, 12:48)

Feb 27th, 2011, 12:49 PM
looking for a dual wan solution, does anyone have any experience with  converting a dd-wrt / tomato router into a dual wan ..

(Last edited by podo on 22 Jun 2012, 10:11)

Does this work for connecting USB 3g modems?

I would not see a reason against it (unless it draws more power than the router can deliver - seems to be an issue for some routers, using an active powered hub helps in that case).

Hi,

I have a WRT54g V3.1 and am trying to look for these usb pins on my modem.

The 4712 chip is positionned exactly like this one http://i708.photobucket.com/albums/ww82/jbryantd/photo11.jpg (not my image, but probably same version of router).

Is there any hint to pinhunt ? I tested RH10 ot 16 with an oscilloscope and the voltage is either 0 either 3.3V but nothing like a signal.

How can I find out where I can pick up my USB signal ?

The discussion might have continued from here.