pmarks-net / usbnetpower8800

Tool for controlling the "USB Net Power 8800" device
Apache License 2.0
5 stars 3 forks source link

Version updated to support mutiple usbnetpower8800 #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hacked the current version to support multiple usbnetpower8800.

query lists the device id and state: 

root@raspberrypi:/usb# ./usbnetpower8800.py query
Number of Devices: 3
Device: 9 Power: off
Device: 10 Power: off
Device: 5 Power: off

--turn on device 10 
root@raspberrypi:/usb# ./usbnetpower8800.py on 10

Original issue reported on code.google.com by aussie...@gmail.com on 2 Feb 2014 at 10:19

Attachments:

GoogleCodeExporter commented 9 years ago
- I don't think "address" can uniquely identify a device.  You need at least 
(bus, address) together.
- This looks like two separate programs squished into one file.  You shouldn't 
need to track both "dev" and "alldev".

Given the start-up overhead of Python+PyUSB, I don't think that multi-device 
control will be very efficient, unless you do one of the following:
- Write the controller in C.
- Accept multiple events on one command line.
- Make a continuously-running Python daemon.

But in general, I'm not very interested in adding features to this code, beyond 
what's needed to document the protocol.  I linked to some forks on the front 
page which might be more receptive to additions.

Original comment by sparkm...@gmail.com on 2 Feb 2014 at 11:28