p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

hub-ctl and raspi hub-lan chip

Sun Mar 02, 2014 9:51 pm

Hello.
I recently discovered that most USB hub chips support switching off power to a particular port. However there are only rare examples of active/powered hubs that have those switches populated on the circuit boards.
There is program called hub-ctrl that can tell the hub to switch power.
http://www.joeldare.com/wiki/usb_powere ... mas_lights

I compiled this program od raspi and this is the output

Code: Select all

$ sudo ./hub-ctrl -v
Hub #0 at 001:002
 INFO: individual power switching.
 WARN: Port indicators are NOT supported.
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
   Port 2: 0000.0103 power enable connect
   Port 3: 0000.0100 power
Hub #1 at 001:001
 INFO: ganged switching.
 WARN: Port indicators are NOT supported.
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
I know that Raspi does not have any switches to turn off power to usb but AFAIK the chip 9512 supports it.
http://ww1.microchip.com/downloads/en/D ... c/9512.pdf
It seems that PRTCTL3 and 2 are the pins could switch ports on/off.
I wonder if it feasible to solder leads to those pins and connect to a MOSFET and turn off a USB device. In Version A of the board is should be easier because you just have to replace 2 polyfuses that protect USB.

The main reason why I need to turn of an usb device is that my 3g modem sometimes hangs up. It says it's connected to the network but I can't get a connection. If I cycle the power it connects to the network.

valent
Posts: 27
Joined: Mon Jan 30, 2012 9:40 pm

Re: hub-ctl and raspi hub-lan chip

Mon Mar 30, 2015 9:24 pm

It is possible but it could also have consequences if you do it too often:
http://raspberrypi.stackexchange.com/qu ... ng-problem

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1860
Joined: Thu Jul 11, 2013 2:37 pm

Re: hub-ctl and raspi hub-lan chip

Tue Mar 31, 2015 12:58 pm

On models B+ and 2 B, USB port power switching (ganged) is implemented. Switching on and off port 2 on the 9514 will gate VBus to all four downstream ports.
Rockets are loud.
https://astro-pi.org

Return to “Advanced users”