Hi Toby,

Thanks for your response.

I am using libusbx-1.0.17-win on windows 7 machine. Also USB device is a
custom STM32 device, making use of STM32 library adapted to behave as
winusb device. So I have access to the USB device internals.

Configuration of the USB device.
Single configuration
      ->single interface
          |-->end points IN
          |--> end points OUT

So is it the expected behaviour when libusb_bulk_transfer calls to
different EPs from different threads, block each other? *(I use the
same "**device
handle in the libusb_bulk_transfer call"** )*
(sorry to repeat myself, because I am not sure whether i explained properly)

If it is expected behaviour, how about configuring USB device to have two
interfaces one for IN EP and the other for OUT EP? Will the blocking be
happening even with this scenario?

I tried setting the debug log, but I could see not logs in the console. Not
sure whats happening.

Kindly advice.

Thanks,

Hari



On Mon, Feb 10, 2014 at 5:08 AM, Toby Gray <toby.g...@gmail.com> wrote:

>
> On 7 February 2014 17:13, hgs16 <h...@rapsodo.com> wrote:
>
>> Hi all,
>>
>> I am having issues when trying to use synchronous calls from multiple
>> threads.
>>
>> >From thread A I do libusb_bulk_transfer(dev_hnd,IN_EP,...) (read)  and in
>> another thread B I do libusb_bulk_transfer(dev_hnd,OUT_EP,...) (write) to
>> the same usb device using the same device handle.
>>
>> What I am noticing is, send call is blocked until till read call is
>> released
>> (say by timeout).
>>
>
> Assuming I've understood what you are describing, this doesn't sound like
> correct behaviour.
>
>
>>
>> Is this expected behaviour?
>>
>
> It shouldn't be. I'm fairly certain that I've used libusb in a similar way
> without a problem, for example I believe the barry project does exactly
> this.
>
>
>>
>> Kindly provide me with some insights to solve this issue.
>>
>
> What operating system are you using and which libusb version? Is it
> possible to get the debug output from libusb for the situation you
> describe? This should be possible to get by setting the LIBUSB_DEBUG
> environment variable to 4.
>
> Is there any possibility of sharing more information about the device you
> are trying to communicate with and the code that you're using libusb in?
>
> Regards,
>
> Toby
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
>
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to