Re: Python USB control on Windows 7?

2012-12-23 Thread inq1ltd
On Sunday, December 23, 2012 06:34:41 PM Chris Angelico wrote:
 On Sun, Dec 23, 2012 at 6:28 PM, Tim Roberts t...@probo.com wrote:
  Duncan Booth duncan.booth@invalid.invalid wrote:
 In this year's Christmas Raffle at work I won a 'party-in-a-box'
 including USB fairy lights.
 
 They sit boringly on all the time, so does anyone know if I can toggle
 the power easily from a script? My work PC is running Win7.
 
  Not easily, no.  It's not really a USB device -- I'm betting it doesn't
  even enumerate.  It's just sucking power from the USB wires.  There's
  nothing to control.
 
 Hmm. Can you control whether a particular port is on or off? (I have
 no idea what's possible with the underlying API, much less whether
 it's exposed.) It should in theory be possible - disable the
 appropriate USB port and the device loses power.
 
 ChrisA

If you have the time;

Using communication software, you can control a modem to call, hang up, and 
call again every few seconds. Since you can make a phone do the same thing, 
there is most likely a way to get those lights to respond the same way, at 
least by next Christmas.  

jd






-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python USB control on Windows 7?

2012-12-23 Thread Duncan Booth
Chris Angelico ros...@gmail.com wrote:

 On Sun, Dec 23, 2012 at 6:28 PM, Tim Roberts t...@probo.com wrote:
 Duncan Booth duncan.booth@invalid.invalid wrote:

In this year's Christmas Raffle at work I won a 'party-in-a-box'
including USB fairy lights.

They sit boringly on all the time, so does anyone know if I can
toggle the power easily from a script? My work PC is running Win7.

 Not easily, no.  It's not really a USB device -- I'm betting it
 doesn't even enumerate.  It's just sucking power from the USB wires. 
 There's nothing to control.
Yes, I understand that, I was wondering whether the power could be toggled.
 
 Hmm. Can you control whether a particular port is on or off? (I have
 no idea what's possible with the underlying API, much less whether
 it's exposed.) It should in theory be possible - disable the
 appropriate USB port and the device loses power.
 
So far as I can tell Windows doesn't let you turn the ports on and off. I 
found some suggestion that by connecting it to a powered hub it may be 
possible to toggle the hub power on and off but that many hubs don't bother 
implementing the functionality.

Thanks anyway.
-- 
Duncan Booth http://kupuguy.blogspot.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python USB control on Windows 7?

2012-12-23 Thread Michael Torrie
On 12/23/2012 11:11 AM, Duncan Booth wrote:
 So far as I can tell Windows doesn't let you turn the ports on and off. I 
 found some suggestion that by connecting it to a powered hub it may be 
 possible to toggle the hub power on and off but that many hubs don't bother 
 implementing the functionality.
 
 Thanks anyway.

Or you might have more fun if you cut off the USB plug, and drive the
thing directly using an Arduino board.  You can use the USB serial port
on it to prgrammatically turn the thing on and off from your computer,
or a billion other possible things.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python USB control on Windows 7?

2012-12-22 Thread Tim Roberts
Duncan Booth duncan.booth@invalid.invalid wrote:

In this year's Christmas Raffle at work I won a 'party-in-a-box' including 
USB fairy lights.

They sit boringly on all the time, so does anyone know if I can toggle the 
power easily from a script? My work PC is running Win7.

Not easily, no.  It's not really a USB device -- I'm betting it doesn't
even enumerate.  It's just sucking power from the USB wires.  There's
nothing to control.
-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python USB control on Windows 7?

2012-12-22 Thread Chris Angelico
On Sun, Dec 23, 2012 at 6:28 PM, Tim Roberts t...@probo.com wrote:
 Duncan Booth duncan.booth@invalid.invalid wrote:

In this year's Christmas Raffle at work I won a 'party-in-a-box' including
USB fairy lights.

They sit boringly on all the time, so does anyone know if I can toggle the
power easily from a script? My work PC is running Win7.

 Not easily, no.  It's not really a USB device -- I'm betting it doesn't
 even enumerate.  It's just sucking power from the USB wires.  There's
 nothing to control.

Hmm. Can you control whether a particular port is on or off? (I have
no idea what's possible with the underlying API, much less whether
it's exposed.) It should in theory be possible - disable the
appropriate USB port and the device loses power.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Python USB control on Windows 7?

2012-12-21 Thread Duncan Booth
In this year's Christmas Raffle at work I won a 'party-in-a-box' including 
USB fairy lights.

They sit boringly on all the time, so does anyone know if I can toggle the 
power easily from a script? My work PC is running Win7.

-- 
http://mail.python.org/mailman/listinfo/python-list