Diary of a geek

January 2009
Mon Tue Wed Thu Fri Sat Sun
     
17
 

Andrew Pollock

Categories

Other people's blogs

Subscribe

RSS feed

Contact me

JavaScript required


Saturday, 17 January 2009

USB power switch, part 2

Continuing with my mission to control the power to some dumb USB-powered lights...

Dann Frazier confirmed my theory that a USB hub would indeed do the job. I'd already found the hub-ctrl.c program he mentioned, but couldn't get it to work with my built-in USB ports of my laptop.

It seems it all depends on whether the hub will support per-port power switching or not. (lsusb -v will tell you).

So off to the mighty institution that is Fry's Electronics I went.

The first two attempts failed, as did a borrowed hub. It seems most (at least the cheap one) use a Genesys Logic chipset, which does not support per-port power control. Fortunately I chose products that weren't in blister packs, so I was able to return them to Fry's in as-new condition and try again.

Now that I knew USB hubs would do the trick, I did some more targeted searching, and found this thread where someone had been messing around with hubs to do what sounded like what I wanted. (Incidentally, this email in the thread also provided a nice looking Python program. I'm going to look at refitting it to use the "real" Python USB module.)

I emailed the poster to ask him what brand of hub he was using. The answer was the Linksys 4-port hub

So I managed to track down one of them last night. Yes, it works, but the downside is the hub itself requires external power, which is a bit unfortunate. Not only do I need to use a hub to make these lights software controllable, I have to plug the hub into a power outlet. Bleh.

[12:21] [tech] [permalink]