Hey all,
I have an HID that I have written a custom device driver for. I have written the driver so that the computer recognizes the device as an HID mouse and an HID keyboard. The problem that I am having is that when I install my driver, using dpinst.exe, and plug in my device it shows up under Human Interface Devices in Device Manager as three devices (USB Input Device and two HID-compliant devices which are the mouse and keyboard the computer sees) and the system doesn’t load the proper mouse and keyboard drivers for my device to work properly; I have to manually load the HID-compliant Mouse and HID-compliant keyboard drivers for it to work.
So basically the system will recognize my device and load my driver for the main USB Input device it sees which is great but it won’t load the mouse and keyboard drivers for the other device entries. Is there any way I can get the system to do this automatically when I plug in the device so that it is fully pnp after the initial driver installation? Is it an .inf file issue?
I appreciate the help and time.
What compatible ids are being generated for the mouse and keyboard? Does setupapi.dev.log say anything about a failed install? When you force an update (how are you doing that?) which id is the match?
d
Bent from my phone
From: xxxxx@gmail.commailto:xxxxx
Sent: ?11/?25/?2013 2:02 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Trying to load my custom HID driver, HID mouse and HID keyboard drivers for device
Hey all,
I have an HID that I have written a custom device driver for. I have written the driver so that the computer recognizes the device as an HID mouse and an HID keyboard. The problem that I am having is that when I install my driver, using dpinst.exe, and plug in my device it shows up under Human Interface Devices in Device Manager as three devices (USB Input Device and two HID-compliant devices which are the mouse and keyboard the computer sees) and the system doesn’t load the proper mouse and keyboard drivers for my device to work properly; I have to manually load the HID-compliant Mouse and HID-compliant keyboard drivers for it to work.
So basically the system will recognize my device and load my driver for the main USB Input device it sees which is great but it won’t load the mouse and keyboard drivers for the other device entries. Is there any way I can get the system to do this automatically when I plug in the device so that it is fully pnp after the initial driver installation? Is it an .inf file issue?
I appreciate the help and time.
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
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</mailto:xxxxx></mailto:xxxxx>
Hey, Doron, thanks for the reply.
It is strange. I may have gotten that initial description incorrect. I did some additional testing on a new computer and found that when I install my driver for the first time and then plug in my device it seems to load everything automatically. The problem arises when I uninstall and then re-install my driver that it won’t load the mouse and keyboard drivers automatically (did the uninstall/re-install to make sure the user will be able to uninstall without problems and re-install if they want to).
And once I’ve uninstalled and re-installed the driver I go to properties of each “HID-compliant device” entry in device manager to look at compatible ID’s for each one and nothing shows up for either.
So, in summary, it works great for the first time but then if driver is uninstalled and re-installed it won’t load mouse and keyboard drivers like before. Where would I find setupapi.dev.log? Sorry if these are trivial questions I am still learning all this stuff.
%windir%\inf is the log location. If there are no HW ids on the children, I would look at hoe you are reporting the hid descriptor. If there is an error in it the second time around that can cause the enumeration failure.
d
Bent from my phone
From: xxxxx@gmail.commailto:xxxxx
Sent: ?11/?25/?2013 2:39 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Trying to load my custom HID driver, HID mouse and HID keyboard drivers for device
Hey, Doron, thanks for the reply.
It is strange. I may have gotten that initial description incorrect. I did some additional testing on a new computer and found that when I install my driver for the first time and then plug in my device it seems to load everything automatically. The problem arises when I uninstall and then re-install my driver that it won’t load the mouse and keyboard drivers automatically (did the uninstall/re-install to make sure the user will be able to uninstall without problems and re-install if they want to).
And once I’ve uninstalled and re-installed the driver I go to properties of each “HID-compliant device” entry in device manager to look at compatible ID’s for each one and nothing shows up for either.
So, in summary, it works great for the first time but then if driver is uninstalled and re-installed it won’t load mouse and keyboard drivers like before. Where would I find setupapi.dev.log? Sorry if these are trivial questions I am still learning all this stuff.
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
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</mailto:xxxxx></mailto:xxxxx>
Thanks Doron, I will look into that.
Is it possible that it has something do to with selecting the “Delete Driver Software for this device” check-box on the uninstall window? Since the mouse and keyboard drivers come on the system the system probably prevents them from being actually deleted when this box is checked but could it be deleting something that allows them to get loaded for my device such that it doesn’t recognize that they should be loaded when I re-install?
There are no “compatible ids” listed but the hardware ids listed (once uninstalled and re-installed) for the two “HID-compliant devices” look like this:
HID\VID_xxxx&PID_xxxx&REV_020=&Col01
HID\VID_xxxx&PID_xxxx&Col01
HID_DEVICE_SYSTEM_MOUSE
HID_DEVICE_UP:0001_U:0002
HID_DEVICE
AND:
HID\VID_xxxx&PID_xxxx&REV_020=&Col02
HID\VID_xxxx&PID_xxxx&Col02
HID_DEVICE_SYSTEM_KEYBOARD
HID_DEVICE_UP:0001_U:0006
HID_DEVICE
xxxxx@gmail.com wrote:
It is strange. I may have gotten that initial description incorrect. I did some additional testing on a new computer and found that when I install my driver for the first time and then plug in my device it seems to load everything automatically. The problem arises when I uninstall and then re-install my driver that it won’t load the mouse and keyboard drivers automatically (did the uninstall/re-install to make sure the user will be able to uninstall without problems and re-install if they want to).
Did you disable and enable the device in between? The old driver can’t
be fully uninstalled if there’s still an active instance.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.