Thanks for the answer. I am not a software engineer myself
(I am a hardware engineer who happens to be interested in
USB quite a bit). I will tend to trust experts like you
(and Tim) in terms of USB driver under Windows.
I will relay your message to Travis.
On the other hand, libusb-win32 has been around for years
(since 2004). The filter driver seemed to work fine under
Windows 98SE/ME and Win2k, there were issues with
Windows XP, then lots of issues with Vista and Windows 7.
Once upon a time, even a Microsoft guy filed a negative review
on the website. I myself shifted the focus to support libusb-1.0
Windows backend which starts with WinUSB support and
later added HID support.
When Travis Robinson and I took over the libusb-win32 project
this year, we were thinking that the bug raised by Tim Roberts
is the main issue with the filter (Filter driver should not be
power policy owner).
http://sourceforge.net/tracker/?func=detail&aid=2658937&group_id=78138&atid=552262
Once we fixed this one, so far we have not heard major problems
any more. Yes there are still issues with some device using
WinUSB/UMDF or wudfrd.sys because of power management issues.
What we are trying now is to limit the filter driver to certain device
and warn the users about the potential problems.
So in practice, it does work for many USB device in the field.
We have not given up on the filter driver as yet right now. But
we certainly would like to listen to the experts and see our
future options.
Regards,
Xiaofan
On Tue, Sep 28, 2010 at 2:39 PM, Doron Holan wrote:
> There is no such thing as a generic filter driver IMHO. The filter has
> to know the rules of the stack it is filtering. Using win32 nd libusb to
> access the same device instance is a recipe for disaster. You are
> getting lucky that it even works in your limited scenarios. Definitely
> not by design.
>
> ?d
>
> dent from a phpne with no keynoard
>
> -----Original Message-----
> From: Xiaofan Chen
> Sent: September 27, 2010 7:05 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Generic USB filter driver, is it possible?
>
>
> (changing the subject).
>
> I am not able to answer your question but I have forwarded this to
> Travis, the current developer.
>
> On the other hand, what is your suggestion for a generic filter driver?
> Is it even possible to achieve the goal? Thanks a lot for the help
> in advance.
>
> On one hand, we prefer the users to use the device driver mode.
> As per the wiki, we do not promote the filter driver to be
> deployed to the end users, but rather it is more for
> developer use.
> http://sourceforge.net/apps/trac/libusb-win32/wiki
>
> At one time, we even intended to deprecate the filter driver mode.
> However, sometimes the device already have a function driver
> and the user wants to stick to the original function driver for
> its existing function yet he also wants to use libusb-win32
> for certain function not available from the original function driver.
> Therefore we can not give up the filter driver completely right
> now. So we came out with the idea of limit the filter driver
> to certain device only for the next release. Based on our
> testing, it seems to work with the USB device we intended
> to support (eg: FTDI device, device using other generic USB
> driver like Microchip USB driver or WinUSB, etc).
>
>
> Regards,
> Xiaofan
>
>
>
> On Tue, Sep 28, 2010 at 7:39 AM, Doron Holan wrote:
>> Sending URBs directly to the PDO (or through the FDO in the
>> event that the FDO mistakenly passes them through) is a really
>> really bad design. You are communicating with the device or modifying
>> the state of the device without coordination of the FDO (not to mention
>> how I don’t know how you are even getting USBPIPE handles as an
>> upper filter since you don’t see the config request the fdo sends), thus
>> putting the FDO driver in an untested (and untestable/unsupported) state
>>
>> d
>