On 30. 07. 2014 11:52, Xiaofan Chen wrote: > On Wed, Jul 30, 2014 at 2:45 PM, Slavko Kocjancic <esla...@gmail.com> wrote: >> Hello... >> I try to do some async transfer. The program bellow actualy 'near' work. >> It setup 10 transfers and should print the received bytes in callback. >> The problem is that callback is not done at receive complete! >> In example below I expect callback while sleep comand is executed but >> instead got all callbacks when I close device... >> I know that USBPoller/USBPollerThread has something to do with my >> problem but don't know how to use it. >> >> Here is my test program: >> #*************************************************************** >> import usb1,time >> >> def openUsb(vid,pid,name): >> context = usb1.USBContext() >> for dev in context.getDeviceList(skip_on_error=True): >> if (dev.getVendorID()==vid) & (dev.getProductID()==pid): >> if dev.getProduct()==name: >> return dev.open() >> > It seems to me that you are not using pyusb, but rather python-libusb1. > https://github.com/vpelletier/python-libusb1/blob/master/testUSB1.py > > I am not so sure if people in this list are working with > python-libusb1 or not. > > Yes it is python-libusb1 as libusb doesn't handle async transfer at all.
------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users