Hello,
I'm playing around with pyUSB on a macbook pro, in order to be able to play
around with the IR port.

I've got the device found using this:
dev = usb.core.find(idVendor=0x05ac, idProduct=0x8242)
if dev is None:
raise ValueError('Device not found')

now, if I try the
dev.set_configuration()
(the device has only one configuration)

I get the following error:

>>> dev.set_configuration(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py",
line 530, in set_configuration
    self._ctx.managed_set_configuration(self, configuration)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py",
line 92, in managed_set_configuration
    self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/_debug.py",
line 52, in do_trace
    return f(*args, **named_args)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/backend/libusb10.py",
line 455, in set_configuration
    _check(_lib.libusb_set_configuration(dev_handle, config_value))
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/backend/libusb10.py",
line 357, in _check
    raise USBError(_str_error[retval.value])
usb.core.USBError: Unknown error

Unless I click on any of the buttons on the remote control (thus I suppose
activating the device).
then the set_configuration works perfectly.

Is there a way to get around this? ( and not just probe until the control
has been clicked).

thank you

-- 
Merci de penser à l'environnement avant d'imprimer cet e-mail
Please think about the environment before you print this e-mail
Por favor piense en el medio ambiente antes de imprimir este e-mail



Lic. Charles M. Romestant F.
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to