Hello all,
I have been digging through the web and slowly coming up to speed on WinUsb, libusb-win32, driver development, the WinDDK, etc. I have seen some of the examples available, and tried a few driver installations of my own. I need to come up with something within a week or two, however, so I thought I would ask if anyone could help me know if I am going in the right direction.
I have a composite USB device with 7 endpoints that has an existing, closed-source driver. That driver appears to create a virtual HID device as a “child” in the device manager chain, with a final HID-compliant item below that. The overall device is not a HID device, however, as far as I know.
I am trying to create my own driver or utility to add some functionality to this existing driver, since the device is complex enough that creating my own driver (or extending the work of others) seems nearly impossible if I want to maintain compatibility. Specifically, I need to be able to send control requests to some specific interfaces, write a few bytes to a pipe or two, and most importantly, read interrupt-endpoint messages from an endpoint that the existing driver shouldn’t (as far as I know) even be messing with.
So, what I need is a way to not affect the existing driver’s USB commands, but send control packet/read/write USB requests so that a user-mode program can say, “Hey, turn on those lights that the closed-source driver does not support.” With WinUsb as the driver for the device, everything now works great, and I can operate the extra functionality that I want. The problem is that I also need the existing functionality to be unchanged, and as far as I can tell, a (kernel) filter driver seems to be my only remaining hope.
Does this assessment seem accurate? Is this likely to be an extremely difficult task since I am only familiar with WinUsb-level USB commands, not low-level URB stuff? Most importantly, is there any good starting point in the WinDDK if this is feasible? I have heard the toaster generic filter driver is decent, but I do not know of any general kernel-level USB filter example, especially one that needs to pass through lots of complex operations for a composite device with the virtual HID subdevice etc.
Thanks very much for your time in reading this!