Automated install of a device upper filter (mouse hid) on all USB ports

Hello,

I developed an absolute mouse device (usb/hid). On a computer with two
displays and extended desktop the mouse only works on the primary
display. To fix this problem I modified the moufiltr driver sample of
the DDK to set the MOUSE_VIRTUAL_DESKTOP flag. Everything works fine so
far, but the installation process drives me crazy. I can install the
filter driver going to the device manager, have driver… dialogue and
it works. But if I plug in my device in any other usb port the filter
driver is not used, only the standard mouhid and mouclass driver is
installed/loaded. All I can do is to repeat the installation process for
each port to get “plug and play”. What can I do to get this installation
process automated for the other usb ports after the first installation?
I’m an absolute newbie in driver development. I’m more focused on
software development for embedded devices and that’s quite far from this
stuff. I hope you guys can help me. For the moment I don’t know if this
can be solved by the inf-file or if I need a device co-installer to
solve it.

Thanks,
Carsten

> each port to get “plug and play”. What can I do to get this installation

process automated for the other usb ports after the first installation?

Add a unique serial number to the USB descriptor of your device.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

You want to create a driver package and add it to the driver store. Then when you plug it in to a new port, your filter will install correctly.

d

sent from my phpne

-----Original Message-----
From: Carsten Koepp
Sent: April 16, 2010 7:22 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Automated install of a device upper filter (mouse hid) on all USB ports

Hello,

I developed an absolute mouse device (usb/hid). On a computer with two
displays and extended desktop the mouse only works on the primary
display. To fix this problem I modified the moufiltr driver sample of
the DDK to set the MOUSE_VIRTUAL_DESKTOP flag. Everything works fine so
far, but the installation process drives me crazy. I can install the
filter driver going to the device manager, have driver… dialogue and
it works. But if I plug in my device in any other usb port the filter
driver is not used, only the standard mouhid and mouclass driver is
installed/loaded. All I can do is to repeat the installation process for
each port to get “plug and play”. What can I do to get this installation
process automated for the other usb ports after the first installation?
I’m an absolute newbie in driver development. I’m more focused on
software development for embedded devices and that’s quite far from this
stuff. I hope you guys can help me. For the moment I don’t know if this
can be solved by the inf-file or if I need a device co-installer to
solve it.

Thanks,
Carsten


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hello Maxim thanks for your reply, but I’m not sure how a unique serial number could help. All mouse devices I have seen from other manufacturers has got serial-nr. set to “0” in the HID-Descriptor. Furthermore the HID-Descriptor sits in the firmware and that means I have to create a “unique” firmware for each device what is impossible to do.

Regards,
Carsten

Hello Doron thanks for your reply. What do you exactly mean with “create a driver package”. Actually I have a directory with four files: myfiltr.inf, myfiltr.sys, myfiltr.cat, WdfCoInstaller01009.dll. The cat-file is created by the inf2cat tool. Just to make it clear, today I go to Device Manager, HID-compliant mouse, Update driver, Install from a specific location, I will choose the driver, Have Disk and then choose my inf-file. Unfortunately this works only for the usb port where my device is connected to. In my first posting I forgott to say that I try to get this work on Windows XP 32/64-bit, later maybe on Windows 7. If I search for “driver package creation” on bing I found informations about “Microsoft System Center Configuration Manager”, but I don’t think that it is really necessary to use this tool or is it?

Regards,
Carsten

> Hello Doron thanks for your reply. What do you exactly mean with “create a driver package”. Actually I

have a directory with four files: myfiltr.inf, myfiltr.sys, myfiltr.cat, WdfCoInstaller01009.dll.

So, you have a filter driver and not a functional one?

Then install it using a quick registry patch as UpperFilter for Mouse class, with the subsequent reboot if there is a PS/2 mouse, or with restart of all USB mice otherwise.

No need in INFs and driver packages.

– Maxim S. Shatskih
Windows DDK MVP

xxxxx@storagecraft.com

http://www.storagecraft.com

Hello Maxim, to install the upper filter as a class upper filter is possible, I did this already for testing purpose and it works. But this solution cause the problem that the data of each mouse device even from other manufacturer will be affected, too. No matter which mouse is connected (usb or ps/2) the MOUSE_VIRTUAL_DESKTOP flag would be set always and that’s bad. Furthermore our mouse is not identified or displayed in the device manager as “MyAbsoluteMouse”. That’s the reason why I want to install it as a device upper filter and NOT a class upper filter. At least our device has got a unique USB Vendor and Product ID, so it’s possible to identify it. I use this VID/PID in my inf-file, but what I have written previously - it only works if I walk throuhg the manual installation for each port.

Thanks for your reply, hope you have any other idea, because I still don’t know where to go next.

Regards,
Carsten

Use dpinst.executive to preinstall your ing and driver. You not get automatically chosen until you get your package signed.

d

sent from my phpne

-----Original Message-----
From: xxxxx@lxco.com
Sent: April 19, 2010 11:32 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Automated install of a device upper filter (mouse hid) on all USB ports

Hello Maxim, to install the upper filter as a class upper filter is possible, I did this already for testing purpose and it works. But this solution cause the problem that the data of each mouse device even from other manufacturer will be affected, too. No matter which mouse is connected (usb or ps/2) the MOUSE_VIRTUAL_DESKTOP flag would be set always and that’s bad. Furthermore our mouse is not identified or displayed in the device manager as “MyAbsoluteMouse”. That’s the reason why I want to install it as a device upper filter and NOT a class upper filter. At least our device has got a unique USB Vendor and Product ID, so it’s possible to identify it. I use this VID/PID in my inf-file, but what I have written previously - it only works if I walk throuhg the manual installation for each port.

Thanks for your reply, hope you have any other idea, because I still don’t know where to go next.

Regards,
Carsten


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hello Doron,

Use dpinst.executive to preinstall your ing and driver. You not get automatically chosen until you get
your package signed.

… is there any way to test this procedure without having a signed driver (actually I’m talking about Win XP)? During the development it should be possible to test/evaluate the installation process, too, before I submit the driver to MS to get it certified, right?

Regards,
Carsten

I think you can turn the signing requirement off via the UI temporarily.

d

sent from my phpne

-----Original Message-----
From: xxxxx@lxco.com
Sent: April 19, 2010 11:52 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Automated install of a device upper filter (mouse hid) on all USB ports

Hello Doron,

> Use dpinst.executive to preinstall your ing and driver. You not get automatically chosen until you get
> your package signed.

… is there any way to test this procedure without having a signed driver (actually I’m talking about Win XP)? During the development it should be possible to test/evaluate the installation process, too, before I submit the driver to MS to get it certified, right?

Regards,
Carsten


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hello Maxim, I just want to say thanks again, because you were, right. You wrote: "Add a unique serial number to the USB descriptor of your device. " - That’s the solution. Unfortunately this gives me other problems with my firmware, but that’s a different story.

Regards,
Carsten