Win8 and Multiple interfaces

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Win8 and Multiple interfaces

Steve Soloski
Hi all,

Once again, I'm stuck trying to open two interfaces under Win8 x64. I'm
using WinUSB drivers, installed with libusbK-inf-wizard; I've tried
installing the drivers as separate drivers for each interface and also
as a single driver for the composite device and get the same error.

My code first opens Interface B to perform some control function on my
device; then opens Interface A to grab an image stream. When trying to
open the second interface, I get an "Access is denied" err. This same
code works fine under Linux so it appears to be Window specific.

Does anyone have any pointers on how to get around this issue?

Thanks in advance for any help!

Steve


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Win8 and Multiple interfaces

Xiaofan Chen
On Fri, May 30, 2014 at 11:46 PM, Steve Soloski <[hidden email]> wrote:

> Hi all,
>
> Once again, I'm stuck trying to open two interfaces under Win8 x64. I'm
> using WinUSB drivers, installed with libusbK-inf-wizard; I've tried
> installing the drivers as separate drivers for each interface and also as a
> single driver for the composite device and get the same error.
>
> My code first opens Interface B to perform some control function on my
> device; then opens Interface A to grab an image stream. When trying to open
> the second interface, I get an "Access is denied" err. This same code works
> fine under Linux so it appears to be Window specific.
>
> Does anyone have any pointers on how to get around this issue?
>
> Thanks in advance for any help!

Maybe you want to post a minimum program to demonstrate the
problem. Also please make sure you use the latest version
of libusb and libftdi1.


--
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Win8 and Multiple interfaces

Steve Soloski
On 05/30/2014 09:34 PM, Xiaofan Chen wrote:
On Fri, May 30, 2014 at 11:46 PM, Steve Soloski [hidden email] wrote:
Hi all,

Once again, I'm stuck trying to open two interfaces under Win8 x64. I'm
using WinUSB drivers, installed with libusbK-inf-wizard; I've tried
installing the drivers as separate drivers for each interface and also as a
single driver for the composite device and get the same error.

My code first opens Interface B to perform some control function on my
device; then opens Interface A to grab an image stream. When trying to open
the second interface, I get an "Access is denied" err. This same code works
fine under Linux so it appears to be Window specific.

Does anyone have any pointers on how to get around this issue?

Thanks in advance for any help!
Maybe you want to post a minimum program to demonstrate the
problem. Also please make sure you use the latest version
of libusb and libftdi1.



After some more investigation, it appears that I'm running into this issue:

http://sourceforge.net/p/libusbx/mailman/libusbx-devel/thread/52445AA6.2080908@.../

The important part of that thread is:

I think that, by issuing multiple open from within multiple threads, you
may be hitting the "WinUSB does not support multiple concurrent
applications" limitation [2] (as I doubt MS will make much distinction
between a open from a thread and open from a process).

Which pretty much describes what I'm trying to do - open Interface B to issue control commands to my device, then fire up a thread and open Interface A to capture images. It "Just Works" under Linux, but not under Windows... silly me for thinking it would!  So I'm now trying to see how painful it will be to share the same device handle, rather than just doing two ftdi opens.

Steve





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Win8 and Multiple interfaces

Xiaofan Chen
On Sun, Jun 1, 2014 at 4:02 AM, Steve Soloski <[hidden email]> wrote:

>
> After some more investigation, it appears that I'm running into this issue:
>
> http://sourceforge.net/p/libusbx/mailman/libusbx-devel/thread/52445AA6.2080908@.../
>
> The important part of that thread is:
>
> I think that, by issuing multiple open from within multiple threads, you
> may be hitting the "WinUSB does not support multiple concurrent
> applications" limitation [2] (as I doubt MS will make much distinction
> between a open from a thread and open from a process).
>
>
> Which pretty much describes what I'm trying to do - open Interface B to
> issue control commands to my device, then fire up a thread and open
> Interface A to capture images. It "Just Works" under Linux, but not under
> Windows... silly me for thinking it would!  So I'm now trying to see how
> painful it will be to share the same device handle, rather than just doing
> two ftdi opens.
>

If this is the case, try not to use WinUSB, you can use libusbk.sys
(you will need libusbK.dll) which does not have this limitation.



--
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Win8 and Multiple interfaces

Steve Soloski
On 5/31/2014 8:05 PM, Xiaofan Chen wrote:

> On Sun, Jun 1, 2014 at 4:02 AM, Steve Soloski <[hidden email]> wrote:
>> After some more investigation, it appears that I'm running into this issue:
>>
>> http://sourceforge.net/p/libusbx/mailman/libusbx-devel/thread/52445AA6.2080908@.../
>>
>> The important part of that thread is:
>>
>> I think that, by issuing multiple open from within multiple threads, you
>> may be hitting the "WinUSB does not support multiple concurrent
>> applications" limitation [2] (as I doubt MS will make much distinction
>> between a open from a thread and open from a process).
>>
>>
>> Which pretty much describes what I'm trying to do - open Interface B to
>> issue control commands to my device, then fire up a thread and open
>> Interface A to capture images. It "Just Works" under Linux, but not under
>> Windows... silly me for thinking it would!  So I'm now trying to see how
>> painful it will be to share the same device handle, rather than just doing
>> two ftdi opens.
>>
> If this is the case, try not to use WinUSB, you can use libusbk.sys
> (you will need libusbK.dll) which does not have this limitation.
>
>
>
That's great news... I would rather use a different driver than have to
muck with the code.

Now I just need to figure out why libusbK is acting strange for me...
I'll do more testing on Monday.

Steve

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...