Topic: "turning off" the USB port

I decided to put the USB port of my chumby to good use for the summer by plugging in one of these cheap bendable USB fans ... and its a nice bedside breeze.

The thing is that most of these USB fans don't have a on/off switch, which means you have to unplug it to turn it off.

What I want to do is turn if off by software, for example when using the music timer I also want the fan to be turned off.
However the fan is not detected by the system, it's only using the USB port for power.

So I was wondering if there are any ways to "turn off" the USB port by software?


Re: "turning off" the USB port

No - the power is pretty much wired directly to the USB port.

Re: "turning off" the USB port

Are you using a chumby One?  Try running something like this:

hub-ctrl -P 3 -p

To turn the port back on, run:

hub-ctrl -P 3 -p 1

I may have the port number wrong, so try -P 4 or -P 1 as well.

Re: "turning off" the USB port

thanks - but unfortunately that command didn't have any effect on my chumby one.
What I noticed is that during booting (while at the screen with the colorful circles) the fan stops twice. I don't really know what happens at that stage but it seems that there is a way to make the fan stop. I'll continue investigating.

Re: "turning off" the USB port

It was a long shot.  bunnie informs me that the power state isn't actually hooked up.  Unfortunate.

The reason why it's stopping is because the power to the onboard USB hub is getting turned off briefly to reset the chip.  The script in question is called something along the lines of, and it works by toggling a GPIO.  You can try doing something similar, but beware that it toggles the entirety of USB, including the onboard wifi.  There's no way to decouple the external USB port and the onboard wifi.

Re: "turning off" the USB port

I have a Magnetic Card Reader ( recognized as a HID device ) connected to the USB 3 port ( the one nearest the GPIO pins ) .
From time to time it freezes ( I think it's a reader issue ) ; I have to take off the reader from the USB port and put it back on and everything it's OK again ( for a while ) . Until I'll figure out what causes this problem I decided to simulate this pull out of the USB cable by software - so I need a command that would cut off the power for 2 seconds from the USB 3 port .
"hub-ctrl -P 3 -p 0" cut only the DATA from the USB port ( I know this because I cut a USB extension cord and , on the red/black wired i hooked an digital multimeter - all the 4 wires remained "intact" , though , in order to let the Reader properly connected )
/usr/chumby/scripts/ does what I need , but only for the USB port 1 ( the one near the power jack ); it does not affect at all the other 2 USB port ( as one should expect given it's name ) ...

7 (edited by carldc 2011-12-29 17:38:31)

Re: "turning off" the USB port

Duane wrote:

No - the power is pretty much wired directly to the USB port.

I have a "noob" question that is sort of related (though not directly) to this thread... This thread suggests to me that the Chumby One USB port can power an external device. Is that correct?

I ask because I'm thinking about plugging a bluetooth headphone jack adapter into the Chumby to pair it with an external speaker. The adapters I've seen often need to be charged through a mini-usb port. Can I just run the adapter's usb power port to the Chumby USB to charge it? Does that make sense?

Edit: Sorry, I meant a second-gen. blue & white Chumby, not the Chumby One (though I'm curious about that, too).

Edit: Nevermind. I answered my own question. I was able to charge my cell phone using the USB port from an original Chumby.