2011/1/3 Emmanuel Blot <eblot...@gmail.com>: >> Maybe you could post the whole code in pastebin, and in the email body >> the code snippet.. > > Here it is: > > http://pastebin.com/0S1Ce9zt > > I've removed everything from the original code to demonstrate the > "issue" (which may be a wrong usage of pyusb at first ;-)), so do not > expect the code to do anything but trigger the exception. > > The target USB device is a FTDI chip (USB-serial converter) > > Cheers, > Manu > I guess I found the problem.
DEV_OUT_REQTYPE = (usb.util.CTRL_TYPE_VENDOR << 5) | \ usb.util.CTRL_RECIPIENT_DEVICE | \ usb.util.CTRL_OUT >From version a0 to a1 I changed these constants to be combined only with or's, without shifting, as libusb does. So, starting from a1 version, the correct way to build the bmRequestType filed is: DEV_OUT_REQTYPE = (usb.util.CTRL_TYPE_VENDOR) | \ usb.util.CTRL_RECIPIENT_DEVICE | \ usb.util.CTRL_OUT And the *real* correct way to do it (independent of version) is: DEV_OUT_REQTYPE = usb.util.build_request_type( usb.util.CTRL_OUT, usb.util.CTRL_TYPE_VENDOR, usb.util.CTRL_RECIPIENT_DEVICE ) Hope this will work... ;) -- Best Regards, Wander Lairson Costa LCoN - Laboratório de Computação Natural - Natural Computing Laboratory (http://www.mackenzie.com.br/lcon.html) Programa de Pós-Graduação em Engenharia Elétrica (PPGEE) Faculdade de Computação e Informática (FCI) Universidade Presbiteriana Mackenzie - SP - Brazil ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users