Guest User

PyUSB IR problem macbook

a guest
Aug 6th, 2011
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.67 KB | None | 0 0
  1. Python 2.7.2 (default, Jul 26 2011, 17:12:52)
  2. [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.9)] on darwin
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import sys
  5. >>> import usb.core,usb.util
  6. >>> dev = usb.core.find(idVendor=0x05ac, idProduct=0x8242)
  7. >>> dev.set_configuration()
  8. Traceback (most recent call last):
  9.   File "<stdin>", line 1, in <module>
  10.   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py", line 530, in set_configuration
  11.     self._ctx.managed_set_configuration(self, configuration)
  12.   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py", line 92, in managed_set_configuration
  13.     self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
  14.   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/_debug.py", line 52, in do_trace
  15.     return f(*args, **named_args)
  16.   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/backend/libusb10.py", line 455, in set_configuration
  17.     _check(_lib.libusb_set_configuration(dev_handle, config_value))
  18.   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/backend/libusb10.py", line 357, in _check
  19.     raise USBError(_str_error[retval.value])
  20. usb.core.USBError: Unknown error
  21. >>> dev.iProduct
  22. 2
  23. >>> dev.idProduct
  24. 33346
  25. >>> dev.idVendor
  26. 1452
  27. >>> dev.iSerialNumber
  28. 0
  29. #touch any button on the control
  30. >>> dev.set_configuration()
  31. >>> dev.iProduct
  32. 2
  33. >>> dev.idProduct
  34. 33346
  35. >>> dev.iSerialNumber
  36. 0
  37. >>> dev.iSerialNumber
  38. 0
Advertisement
Add Comment
Please, Sign In to add comment