OT: INF file composite USB

Hi,

Slightly off top post since I’m using windows drivers already written and signed.

I have a USB composite device, CDC+HID working. I have seperate INF files for HID and CDC, both working.

The CDC needs the INF once before I can use it which is good because I’m forced to load my INF.

Issues:

  1. The HID automatically enumerates using sections in microsoft’s “msmouse.inf” as HID compatible device. I’d rather have this come up with unknown device forcing them to use my INF which then names it in device manager. From my INF it uses their work and driver as in:

Include=msmouse.inf
Needs=HID_Mouse_Inst.NT

  1. I’d like 1 INF file for the entire composite device (ideally). However as I’m forced to specify “Class” and “Classguid” in the version section, how can I install the two different devices which are under different classes in one INF?

i.e. CDC is:

Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}

HID is:

Class=Mouse
ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}

I figured I should be able to do this since they are on a composite device. Just little to no reference material around that I can find.

I have included them in 1 INF, I tried moving the class and classguid into the actual device installer sections for the OS but no good. I also tried changing the class and guid to USB

Class=USB
ClassGuid={36FC9E60-C465-11CF-8056-444553540000}

But then they get put under the wrong tab in control panel and they don’t install correctly, i.e. I have to select the HID device and update, select INF for that device.

I guess what I’m trying to get is 1 INF, see either device needing driver install, select my single INF and it updates both so they both look ok, not using mcrosofts default HID.

I’ve changed the HID reports, trying vendor defined usage page, and usage in order to try and stop the mouse being installed without my INF - no luck.

i.e. firmware report 1 as

USAGE_PAGE (Not defined) 05 FF00
USAGE (Undefined) 09 00

rather than:

USAGE_PAGE (Generic Desktop) 05 01
USAGE (Mouse) 09 02

Any suggestions or advice much appreciated - accept if it aint broke dont fix it :wink:

dc

1 you can’t stop the automatic match to the state inf. Either you install driver package via an installer before plugin or have your installer attempt to install your inf after. But this is silly. What do you think the user prefers, a usable mouse with the wrong name or a non functional device that they have to manually install a driver for, just to get a petty name in device manager where they never look?

2 you need two infs, no way to get around it. The class is global to the inf and you are installing into two diff classes

d


From: xxxxx@hotmail.commailto:xxxxx
Sent: ?1/?29/?2013 3:40 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] OT: INF file composite USB

Hi,

Slightly off top post since I’m using windows drivers already written and signed.

I have a USB composite device, CDC+HID working. I have seperate INF files for HID and CDC, both working.

The CDC needs the INF once before I can use it which is good because I’m forced to load my INF.

Issues:

1. The HID automatically enumerates using sections in microsoft’s “msmouse.inf” as HID compatible device. I’d rather have this come up with unknown device forcing them to use my INF which then names it in device manager. From my INF it uses their work and driver as in:

Include=msmouse.inf
Needs=HID_Mouse_Inst.NT

2. I’d like 1 INF file for the entire composite device (ideally). However as I’m forced to specify “Class” and “Classguid” in the version section, how can I install the two different devices which are under different classes in one INF?

i.e. CDC is:

Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}

HID is:

Class=Mouse
ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}

I figured I should be able to do this since they are on a composite device. Just little to no reference material around that I can find.

I have included them in 1 INF, I tried moving the class and classguid into the actual device installer sections for the OS but no good. I also tried changing the class and guid to USB

Class=USB
ClassGuid={36FC9E60-C465-11CF-8056-444553540000}

But then they get put under the wrong tab in control panel and they don’t install correctly, i.e. I have to select the HID device and update, select INF for that device.

I guess what I’m trying to get is 1 INF, see either device needing driver install, select my single INF and it updates both so they both look ok, not using mcrosofts default HID.

I’ve changed the HID reports, trying vendor defined usage page, and usage in order to try and stop the mouse being installed without my INF - no luck.

i.e. firmware report 1 as

USAGE_PAGE (Not defined) 05 FF00
USAGE (Undefined) 09 00

rather than:

USAGE_PAGE (Generic Desktop) 05 01
USAGE (Mouse) 09 02

Any suggestions or advice much appreciated - accept if it aint broke dont fix it :wink:

dc


NTDEV is sponsored by OSR

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>

xxxxx@hotmail.com wrote:

I have a USB composite device, CDC+HID working. I have seperate INF files for HID and CDC, both working.

The CDC needs the INF once before I can use it which is good because I’m forced to load my INF.

Issues:

  1. The HID automatically enumerates using sections in microsoft’s “msmouse.inf” as HID compatible device. I’d rather have this come up with unknown device forcing them to use my INF which then names it in device manager. From my INF it uses their work and driver as in:

Include=msmouse.inf
Needs=HID_Mouse_Inst.NT

The whole point of having standard device classes is so your users don’t
have to be bothered to install your custom driver. However, one way to
do what you want is to change the device class in your interface
descriptor to “vendor defined” instead of “HID”. Your INF could still
use Include/Needs to load the msmouse section.

  1. I’d like 1 INF file for the entire composite device (ideally). However as I’m forced to specify “Class” and “Classguid” in the version section, how can I install the two different devices which are under different classes in one INF?

Can’t be done. Each Class must be in a separate INF. That’s a
fundamental truth.

I figured I should be able to do this since they are on a composite device. Just little to no reference material around that I can find.

Nope. The fact that it is a composite device is irrelevant. The
various interfaces are exposed as unrelated devices.

I guess what I’m trying to get is 1 INF, see either device needing driver install, select my single INF and it updates both so they both look ok, not using mcrosofts default HID.

Part 1 is simply impossible. You will need multiple INFs. There is no
escape from that.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

For a HID mouse I don’t think he will be able to use vendor defined and still be a mouse. This is hidclass enumerating the stack, so at best you can use a vendor page, but then mouhid will not find the required page and usages to operate as a mouse.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Tuesday, January 29, 2013 9:46 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] OT: INF file composite USB

xxxxx@hotmail.com wrote:

I have a USB composite device, CDC+HID working. I have seperate INF files for HID and CDC, both working.

The CDC needs the INF once before I can use it which is good because I’m forced to load my INF.

Issues:

  1. The HID automatically enumerates using sections in microsoft’s “msmouse.inf” as HID compatible device. I’d rather have this come up with unknown device forcing them to use my INF which then names it in device manager. From my INF it uses their work and driver as in:

Include=msmouse.inf
Needs=HID_Mouse_Inst.NT

The whole point of having standard device classes is so your users don’t have to be bothered to install your custom driver. However, one way to do what you want is to change the device class in your interface descriptor to “vendor defined” instead of “HID”. Your INF could still use Include/Needs to load the msmouse section.

  1. I’d like 1 INF file for the entire composite device (ideally). However as I’m forced to specify “Class” and “Classguid” in the version section, how can I install the two different devices which are under different classes in one INF?

Can’t be done. Each Class must be in a separate INF. That’s a fundamental truth.

I figured I should be able to do this since they are on a composite device. Just little to no reference material around that I can find.

Nope. The fact that it is a composite device is irrelevant. The various interfaces are exposed as unrelated devices.

I guess what I’m trying to get is 1 INF, see either device needing driver install, select my single INF and it updates both so they both look ok, not using mcrosofts default HID.

Part 1 is simply impossible. You will need multiple INFs. There is no escape from that.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

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

OK so it’s not possible. Thanks for your replies.

I did figure that because the interface assoication descriptor indicated N interfaces to be part of the one configuration that the host would enforce all drivers for the configuration to be present before use - not the case.

Just to add to the mouse feedback. Even if they have a mouse they can’t use the product because the INF for CDC isn’t/may not be installed, so yes they can move around the screen but that would be about it - useful. There is no keyboard driver installed either so plugging one in and typing out an usable INF is a nono.

Lastly, the mouse uses HID report 0 for position + button information, however other reports exist that are used by specific application code. They are not issued when the CDC isn’t present so the mouse is only thing functioning - again useful.

dc