From: Thomas Hansen on 1 Jun 2010 15:57 I would like to create a generic virtual game controller to simulate/prototype a game controller via a serial interface or some other (user mode, non HW) source. The WDK and USB HID documentation is rather confusing when it comes to virtual devices. I'm not interested in legacy OS compatibility, si Windows 7 only is fine. What would be the correct/easiest way to implement this? I.e. what kind of driver/filter etc. should I set out to make to acheive this? Is this possible in user-mode driver only? Are there any samples available that resemble this? The hisusbfx2 sample in the WDK has some resemblence, but if possible I would like to avoid the USB HID part, since there are no plans for a USB HW implementation.
From: Doron Holan [MSFT] on 1 Jun 2010 16:04 it is not yet possible to write a HID Miniport in UMDF. hidusbfx2 is the driver you want to start with. You definitely need to be HID. to convert this driver to your needs, you just replace the bottom "Edge" of the driver, ie the USB part, with whatever you want. you could expose another raw PDO on your own and have a user mode application inject the data or you could open up a serial port and read data from it. d "Thomas Hansen" wrote in message news:8B8FA545-7D69-420D-A235-F108944EBA17(a)microsoft.com... I would like to create a generic virtual game controller to simulate/prototype a game controller via a serial interface or some other (user mode, non HW) source. The WDK and USB HID documentation is rather confusing when it comes to virtual devices. I'm not interested in legacy OS compatibility, si Windows 7 only is fine. What would be the correct/easiest way to implement this? I.e. what kind of driver/filter etc. should I set out to make to acheive this? Is this possible in user-mode driver only? Are there any samples available that resemble this? The hisusbfx2 sample in the WDK has some resemblence, but if possible I would like to avoid the USB HID part, since there are no plans for a USB HW implementation.
From: Paul Kerchen on 15 Jun 2010 14:58 I want to do the same thing as the OP, so I followed your suggestion to start with the hidusbfx2 example. What I've done is taken the hidusbfx2 example and merged it with the nonpnp example (so that I can explicitly load/unload the driver via an application and inject data into the KMDF driver from user mode). I've gotten the nonpnp part of my driver working (I'm able to load/unload the KMDF driver and inject data into it via WriteFile()), but Windows doesn't seem to recognize a new HID when I load my driver. First of all, does this approach even make sense? If so, what do I need to do to get the OS to think that there is a new HID device present? I've implemented callbacks for getting the HID descriptor, report descriptor and device attributes, but those don't appear to ever get called, so obviously there's something else I'm missing. Do I need to implement the PNP power callbacks even though my device is not PNP? Any help would be appreciated! Paul "Doron Holan [MSFT]" wrote: > it is not yet possible to write a HID Miniport in UMDF. hidusbfx2 is the > driver you want to start with. You definitely need to be HID. to convert > this driver to your needs, you just replace the bottom "Edge" of the driver, > ie the USB part, with whatever you want. you could expose another raw PDO on > your own and have a user mode application inject the data or you could open > up a serial port and read data from it. > > d > > "Thomas Hansen" wrote in message > news:8B8FA545-7D69-420D-A235-F108944EBA17(a)microsoft.com... > > I would like to create a generic virtual game controller to > simulate/prototype a game controller via a serial interface or some other > (user mode, non HW) source. The WDK and USB HID documentation is rather > confusing when it comes to virtual devices. I'm not interested in legacy OS > compatibility, si Windows 7 only is fine. > > What would be the correct/easiest way to implement this? I.e. what kind of > driver/filter etc. should I set out to make to acheive this? > > Is this possible in user-mode driver only? Are there any samples available > that resemble this? The hisusbfx2 sample in the WDK has some resemblence, > but > if possible I would like to avoid the USB HID part, since there are no plans > for a USB HW implementation. > > . >
From: Doron Holan [MSFT] on 15 Jun 2010 16:04 you can't make a non pnp HID miniport driver, so merging it with the non pnp sample was a non starter. if you want to load/unload it on the fly, look at the code in the devcon sample on how to enable/disable a pnp device stack. d "Paul Kerchen" wrote in message news:8C331AB0-B772-4CDC-9C9C-1441FBFFAC58(a)microsoft.com... I want to do the same thing as the OP, so I followed your suggestion to start with the hidusbfx2 example. What I've done is taken the hidusbfx2 example and merged it with the nonpnp example (so that I can explicitly load/unload the driver via an application and inject data into the KMDF driver from user mode). I've gotten the nonpnp part of my driver working (I'm able to load/unload the KMDF driver and inject data into it via WriteFile()), but Windows doesn't seem to recognize a new HID when I load my driver. First of all, does this approach even make sense? If so, what do I need to do to get the OS to think that there is a new HID device present? I've implemented callbacks for getting the HID descriptor, report descriptor and device attributes, but those don't appear to ever get called, so obviously there's something else I'm missing. Do I need to implement the PNP power callbacks even though my device is not PNP? Any help would be appreciated! Paul "Doron Holan [MSFT]" wrote: > it is not yet possible to write a HID Miniport in UMDF. hidusbfx2 is the > driver you want to start with. You definitely need to be HID. to convert > this driver to your needs, you just replace the bottom "Edge" of the > driver, > ie the USB part, with whatever you want. you could expose another raw PDO > on > your own and have a user mode application inject the data or you could > open > up a serial port and read data from it. > > d > > "Thomas Hansen" wrote in message > news:8B8FA545-7D69-420D-A235-F108944EBA17(a)microsoft.com... > > I would like to create a generic virtual game controller to > simulate/prototype a game controller via a serial interface or some other > (user mode, non HW) source. The WDK and USB HID documentation is rather > confusing when it comes to virtual devices. I'm not interested in legacy > OS > compatibility, si Windows 7 only is fine. > > What would be the correct/easiest way to implement this? I.e. what kind of > driver/filter etc. should I set out to make to acheive this? > > Is this possible in user-mode driver only? Are there any samples available > that resemble this? The hisusbfx2 sample in the WDK has some resemblence, > but > if possible I would like to avoid the USB HID part, since there are no > plans > for a USB HW implementation. > > . >
From: Paul Kerchen on 16 Jun 2010 16:44 Ah, I suspected that was the case. I will check out the devcon sample. Thank you! "Doron Holan [MSFT]" wrote: > you can't make a non pnp HID miniport driver, so merging it with the non pnp > sample was a non starter. if you want to load/unload it on the fly, look at > the code in the devcon sample on how to enable/disable a pnp device stack. >
|
Pages: 1 Prev: Print Driver / Error - Printing Next: USB continous reader (KMDF) strange behaviour |