Topic: USB on wrt54g v2.0?

Hi all--

Feeling a little bored today, I decided to poke around with my 54g.  Pulling /proc/pci over to another linux box, and running lspci against it shows me 2 usb devices that caught my eye...

00:03.0 USB Controller: Broadcom Corporation BCM47xx Sentry5 USB Device Controller (rev 01)
00:04.0 USB Controller: Broadcom Corporation BCM47xx Sentry5 USB Host Controller (rev 01)

Intrigued, I installed the usbcore and usb-ohci modiules...  Both of which loaded cleanly, and spit some output via dmesg:

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
uhci.c: USB Universal Host Controller Interface driver v1.1
PCI: Setting latency timer of device 00:04.0 to 64
usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2
usb-ohci.c: usb-00:04.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

Mounting usbdevfs where expected shows the usual files under /proc/bus/usb; in particular:

root@hestia:/proc/bus/usb# cat 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=b8004000
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

Soo....  All this leads me to conclude fairly concretely that a my wrt54g would support USB, if I had some way of connecting devices to it, but all my searches fail to yield any information on how to do this.  The board itself looks as if there is a place where such a connector could be soldered, but...  Does anyone know?  I'd love to attach, say, a USB flashdrive to get some additional storage.

                                                                  -Chris

2 (edited by sphearion 2005-11-01 04:50:13)

Re: USB on wrt54g v2.0?

I have a Motorola Wr850G, I saw what you wrote while looking at the board itself, and i see on my board a 12 pin connector that looks like a usb connector on a motherboard with no pins in it, so i figure what the hay, ill install usb-core and usb-ohci and voila

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
PCI: Setting latency timer of device 00:04.0 to 64
usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2
usb-ohci.c: usb-00:04.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

im thinking ill try and install a usb header into that spot later today, and see if I can get it to see my usb pen drive 1gig that should add a healthy amount of space to the lacking wr850g

after rebooting the device i get

root@OpenWrt:~# dmesg

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
PCI: Setting latency timer of device 00:04.0 to 64
usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2
usb-ohci.c: usb-00:04.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
uhci.c: USB Universal Host Controller Interface driver v1.1

hub.c: new USB device 00:04.0-1, assigned address 2
usb.c: USB device not accepting new address=2 (error=-145)

hub.c: new USB device 00:04.0-1, assigned address 3
usb.c: USB device not accepting new address=3 (error=-145)
hub.c: new USB device 00:04.0-2, assigned address 4
usb.c: USB device not accepting new address=4 (error=-145)
hub.c: new USB device 00:04.0-2, assigned address 5
usb.c: USB device not accepting new address=5 (error=-145)

im not sure why the errors but hey maybe something in there helps wink

Re: USB on wrt54g v2.0?

sphearion wrote:

I have a Motorola Wr850G, I saw what you wrote while looking at the board itself, and i see on my board a 12 pin connector that looks like a usb connector on a motherboard with no pins in it, so i figure what the hay, ill install usb-core and usb-ohci and voila

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
PCI: Setting latency timer of device 00:04.0 to 64
usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2
usb-ohci.c: usb-00:04.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

im thinking ill try and install a usb header into that spot later today, and see if I can get it to see my usb pen drive 1gig that should add a healthy amount of space to the lacking wr850g

Excellent...  Output looks exactly the same.

sphearion wrote:

after rebooting the device i get

...snip...

im not sure why the errors but hey maybe something in there helps wink

Hmmmmmm.....  Interesting.  I'll have to pull apart my 54g later on (v2.0) -- or maybe give in and take advantage of the current Circuit City rebates for one to play with O:-)

In any case, maybe it's due to other missing components?  Or missing s/w components?  Hmm.  Did you have the other storage/vfat modules installed too?  (Just taking educated guesses here... heh)

Re: USB on wrt54g v2.0?

yes I have the storage modules loaded and I get the same errors after reboot..... and my connector on the board is 12 pin, however i just grabbed a usb dongle from an old motherboard and its only got a 10pin connector?! maybe 2 or are unused on the board? or maybe im missing something

Re: USB on wrt54g v2.0?

I have a WRT54GS v3 and have similar results:

# 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
  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
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      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    0x80
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power

lspci:

$ lspci -P pci -vv
00:00.0 FLASH memory: Broadcom Corporation Sentry5 Chipcommon I/O Controller
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin ? routed to IRQ 3
        Region 0: Memory at 18000000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Region 1: Memory at 1fc00000 (32-bit, non-prefetchable) [disabled] [size=4M]
        Region 2: Memory at 1c000000 (32-bit, non-prefetchable) [disabled] [size=32M]
        Region 3: Memory at 1a000000 (32-bit, non-prefetchable) [disabled] [size=32M]
        Expansion ROM at <unassigned> [disabled] [size=2K]

00:01.0 Ethernet controller: Broadcom Corporation Sentry5 Ethernet Controller
        Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 64
        Interrupt: pin A routed to IRQ 4
        Region 0: Memory at 18001000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Expansion ROM at <unassigned> [disabled] [size=2K]

00:02.0 MIPS: Broadcom Corporation BCM3302 Sentry5 MIPS32 CPU
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin B routed to IRQ 5
        Region 0: Memory at 18002000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Expansion ROM at <unassigned> [disabled] [size=2K]

00:03.0 USB Controller: Broadcom Corporation BCM47xx Sentry5 USB Host Controller (prog-if 10 [OHCI])
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin C routed to IRQ 6
        Region 0: Memory at 18003000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Expansion ROM at <unassigned> [disabled] [size=2K]

00:04.0 RAM memory: Broadcom Corporation Sentry5 DDR/SDR RAM Controller
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin ? routed to IRQ 3
        Region 0: Memory at 18004000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Region 1: Memory at <unassigned> (32-bit, non-prefetchable) [disabled] [size=128M]
        Region 2: Memory at 10000000 (32-bit, non-prefetchable) [disabled] [size=128M]
        Region 3: Memory at 80000000 (32-bit, non-prefetchable) [disabled] [size=512M]
        Expansion ROM at <unassigned> [disabled] [size=2K]

00:05.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller
        Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 64
        Interrupt: pin E routed to IRQ 2
        Region 0: Memory at 18005000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Expansion ROM at <unassigned> [disabled] [size=2K]

00:06.0 Network controller: Broadcom Corporation: Unknown device 4719
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin ? routed to IRQ 3
        Region 0: Memory at 18006000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Expansion ROM at <unassigned> [disabled] [size=2K]

I also would really like to be able to install a USB port. I notice mine only shows the USB Host controller and not the Device Controller but it loaded the USB modules and sees the hub and 2 ports:

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
PCI: Setting latency timer of device 00:03.0 to 64
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

6 (edited by sphearion 2005-11-01 05:47:47)

Re: USB on wrt54g v2.0?

what packages did you get lsusb and lspci from? would make it much easier to figure things out smile

also, I just pulled out my multimeter and measured some voltages on the 12 pin connector, and its definately not usb, considering the top row are all 3.3v and the bottom row is all grounds.... hmmm very odd this one!

btw : mine is a wr850g v2

7 (edited by Void Main 2005-11-01 05:59:07)

Re: USB on wrt54g v2.0?

I just "ipkg install lsusb" for the lsusb command which won't work until you load the modules and mount the usbdevfs:

# mount usbdevfs /proc/bus/usb -t usbdevfs

I copied the directory structure from /proc/bus/pci to my Linux laptop and ran lspci on it with the "-P" option to view the pci data.

Re: USB on wrt54g v2.0?

well I have decided that on the wr850g v2 at least the 12 pin port on the board is the jtag port. from everything I have read on the internet... dern, guess im going to have to poke and prod to find places to hook up the usb wink

Re: USB on wrt54g v2.0?

Any one find a way to hookup a USB port on the wrt54G V4 or any OpenWRT compatible WRT54G?

Jim

10 (edited by db90h 2006-10-20 09:01:20)

Re: USB on wrt54g v2.0?

The Broadcom BCM47xx/5325 chips the WRT54G(S) units are based on do indeed contain an internal USB port, but its not implemented on the board. For an example of Broadcom BCM47xx/5325 based devices that do have the internal USB ports implemented, see the Linksys WRTSL54GS and ASUS WL-500Gp. Yep, same hardware, different boards.

The Belkin 7230-4 is again the same platform, but does have a better spot on the board where a USB port should go. People *HAVE* added USB ports to these devices (which are even cheaper than the WRT54G, btw..).

Here's an except from http://www.efn.org/~rick/work/f5d7230/ . I'm sure you'll find better sites with a little searching.

Now set up USB (you will need to set up the serial cable above). The 1444 has a USB on board the CPU but there are some missing capacitors, resistors, jumpers and a fuse. The first jumper is near the power supply and connects the +5 volts to the stuff near the USB connector (which isn't populated). The 2nd jumper is near the USB connector and is labed as a fuse. There are 2 inline resistors that should be around 26 ohms that go in series with the 2 data lines that make up USB. I just shorted these. There are also 2 15K ohm pull-downs that MUST be inserted. I choose to put these off board on the USB connector that I wired to the 4 holes that make up the USB footprint on the board.

Re: USB on wrt54g v2.0?

I read your writing, but I don't understand.

I want to know the process of using USB interface on wrt54g precisely, command by command.

I will thank you for your answer.

Re: USB on wrt54g v2.0?

http://woodhousellc.com/?tag=usb

seems to have done it! what do you think?

-Rory

"why not?"

Re: USB on wrt54g v2.0?

db90h wrote:

The Broadcom BCM47xx/5325 chips the WRT54G(S) units are based on do indeed contain an internal USB port, but its not implemented on the board. For an example of Broadcom BCM47xx/r11 irons based devices that do have the internal USB ports implemented, see the Linksys WRTSL54GS and ASUS WL-500Gp. Yep, same hardware, different boards.

The Belkin 7230-4 is again the same platform, but does have a better spot on the board where a USB port should go. People *HAVE* added USB ports to these devices (which are even cheaper than the WRT54G, btw..).

Here's an except from http://www.efn.org/~rick/work/f5d7230/ . I'm sure you'll find better sites with a little searching.

Now set up USB (you will need to set up the serial cable above). The 1444 has a USB on board the CPU but there are some missing capacitors, resistors, jumpers and a fuse. The first jumper is near the power supply and connects the +5 volts to the stuff near the USB connector (which isn't populated). The 2nd jumper is near the USB connector and is labed as a fuse. There are 2 inline resistors that should be around 26 ohms that go in series with the 2 data lines that make up USB. I just shorted these. There are also 2 15K ohm pull-downs that MUST be inserted. I choose to put these off board on the USB connector that I wired to the 4 holes that make up the USB footprint on the board.

http://www.efn.org/~rick/work/f5d7230/   
thx for this website

Re: USB on wrt54g v2.0?

smellymoo wrote:

http://woodhousellc.com/?tag=usb

seems to have done it! what do you think?

yep. you did it. congrats on that))

Mobile phone booster read here.
Amplificateur GSM broceliande-terredidees.fr