Hello all, I have a Dream Link WH1080 Weather Station / USB Missile
Launcher connected to my linux box. I want to control its movement, but
have been unable to do so.

I followed the brief tutorial to get started, but I run into this problem
every time:


Traceback (most recent call last):
  File "usb.py", line 23, in <module>

dev.ctrl_transfer(0x21,0x09,0,0,[0x02,0x08,0x00,0x00,0x00,0x00,0x00,0x00])
  File "/home/ht/py/pyusb-1.0.0a3/usb/core.py", line 702, in ctrl_transfer
    self.__get_timeout(timeout)
  File "/home/ht/py/pyusb-1.0.0a3/usb/backend/libusb1.py", line 596, in
ctrl_transfer
    timeout))
  File "/home/ht/py/pyusb-1.0.0a3/usb/backend/libusb1.py", line 403, in
_check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error

The associated code is here (with my crappy comments removed):

import usb.core
import usb.util

dev = usb.core.find(idVendor=0x1941, idProduct=0x8021)

if dev is None:
    raise ValueError("problem")

if dev.is_kernel_driver_active(0):
    dev.detach_kernel_driver(0)

dev.set_configuration()
usb.util.claim_interface(dev, 0)

dev.ctrl_transfer(0x21,0x09,0,0,[0x02,0x08,0x00,0x00,0x00,0x00,0x00,0x00])

The pyusb.log is empty even though I've set:

export PYUSB_DEBUG_LEVEL=debug
export PYUSB_LOG_FILENAME=pyusb.log

I'm running the program with sudo, so I don't think it's a permissions
problem. I'm using pyusb 1.0.0a3 on python 2.7.3 in Fedora 17.

There are implementations for this usb toy such as the stormLauncher.py,
and I have tested that and it produces the same error (I got the turn
command from there actually!).

I've no experience in coding usb stuff; any help is appreciated!
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to