[pyusb-users] libusb1 Callback thread

2014-07-29 Thread Slavko Kocjancic
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 a

Re: [pyusb-users] Asynchronous transfers

2014-07-29 Thread Slavko Kocjancic
>>> Unfortunately, PyUSB doesn't have async support yet :( >>> >>> >> Ouch... >> >> So what can be done? >> Direct acess to lubusb? Is it possible to make callback in python?!? >> Or another library in c is way to go?!? >> >> any hint? >> > For PyUSB there is nothing to be done on short term, but

Re: [pyusb-users] Asynchronous transfers

2014-07-29 Thread Wander Lairson Costa
2014-07-29 13:49 GMT-03:00 Slavko Kocjancic : > On 29. 07. 2014 18:20, Wander Lairson Costa wrote: >> 2014-07-29 11:28 GMT-03:00 Slavko Kocjancic : >>> Hello... >>> >>> How to make Asynchronous transfers with pyusb? >>> I look for some example but no luck... >>> >>> I stuck on the beggining.. Ie I

Re: [pyusb-users] Asynchronous transfers

2014-07-29 Thread Slavko Kocjancic
On 29. 07. 2014 18:20, Wander Lairson Costa wrote: > 2014-07-29 11:28 GMT-03:00 Slavko Kocjancic : >> Hello... >> >> How to make Asynchronous transfers with pyusb? >> I look for some example but no luck... >> >> I stuck on the beggining.. Ie I need to allocate some buffer but fail... >> I try like

Re: [pyusb-users] Asynchronous transfers

2014-07-29 Thread Wander Lairson Costa
2014-07-29 11:28 GMT-03:00 Slavko Kocjancic : > Hello... > > How to make Asynchronous transfers with pyusb? > I look for some example but no luck... > > I stuck on the beggining.. Ie I need to allocate some buffer but fail... > I try like this: > > import usb > transfer=lib.libusb_alloc_transfer(0)

[pyusb-users] Asynchronous transfers

2014-07-29 Thread Slavko Kocjancic
Hello... How to make Asynchronous transfers with pyusb? I look for some example but no luck... I stuck on the beggining.. Ie I need to allocate some buffer but fail... I try like this: import usb transfer=lib.libusb_alloc_transfer(0) lib.libusb_free_transfer(transfer) How to do that?!? Thanks,