Xiaofan Chen wrote:
> On 9/12/07, Tim Roberts <timr@...> wrote:
>> No, this is not possible. The underlying Linux driver does not allow
>> it. Only one process at a time can claim an interface. You would have
>> to write a kernel-mode driver.
> Could you explain a bit more? Thanks. I do not know much about
> the Linux USB drivers. Do we really need to claim the interface for
> the control pipe?
Yes, you have to claim the interface to dink with the control pipe. The
source for the driver is in src/linux/drivers/usb/devio.c; it isn't too
hard to follow.
> Is this a limitation of libusb or the Linux USB driver
> (the old usbfs) libusb is based on.
Each instance of libusb is blissfully ignorant of all of the other
instances. The restriction is in the Linux USB driver. libusb on Linux
is actually a rather thin layer over the USB driver.
> And I think USBFS2 will allow access of the endpoint directly and
> thus it is possible to access the control endpont and bulk
> endpoint simultaneously. Am I wrong?
I have read exactly one web page about usbfs2, but my impression was
that it was still quite a ways away from seeing the light of day.
> I read it is possible to access the control pipe under Windows
> even the other application is using the bulk pipe.
It's possible to do that in Linux, too, but just not with the usbfs
driver. It is the driver that enforces this limitation.
Peter's suggestion is a very good one. You can write essentially a
user-mode "driver" that services multiple applications. The first one
in could claim the interface and offer a socket or a pipe to other
Tim Roberts, timr@...
Providenza & Boekelheide, Inc.