Some quick background:

We are making a set of USB medical data collection devices. Most commonly,
they will be packaged together and permanently connected to a USB hub in the
same case, however they will also be available as independent devices. I
need to know whether a unified device is connected or a bunch of individual
modules, among other things the user should be informed if one of the
devices fails in the unified collection. The hub chip uses an EEPROM that
specifies the VID, PID, and device number.

How can I use the standard USB hub driver for our device but tag it in a way
I can detect while enumerating devices (using e.g.
SetupDiCreateDeviceInfoList, SetupDiGetDeviceInterfaceDetail)? It would be
best if I can control the name of the device which appears in Device Manager
after the driver loads, but as long as I can distinguish our hub+devices
group from a device attached to a standard hub it will be fine.

Should I put in a different VID/PID pair (we can get numbers assigned) and
write an INF that loads the Microsoft driver? Where would I find an example
of that? Or would it be better to leave the VID and PID alone and change
the device number? Any advice would be appreciated.

Re: make USB hub easily identifiable by Doron

Doron
Tue May 29 21:51:59 CDT 2007

have each configuraiton be a unique vid/pid. then have an INF which matches
to the specific hw id of the hub and load the msft usbhub driver using your
inf, supplying a name in the INF. so essentially, your INF is just naming
the device and letting the in box driver isntall

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Ben Voigt" <rbv@nospam.nospam> wrote in message
news:umw21KioHHA.3772@TK2MSFTNGP03.phx.gbl...
> Some quick background:
>
> We are making a set of USB medical data collection devices. Most
> commonly, they will be packaged together and permanently connected to a
> USB hub in the same case, however they will also be available as
> independent devices. I need to know whether a unified device is connected
> or a bunch of individual modules, among other things the user should be
> informed if one of the devices fails in the unified collection. The hub
> chip uses an EEPROM that specifies the VID, PID, and device number.
>
> How can I use the standard USB hub driver for our device but tag it in a
> way I can detect while enumerating devices (using e.g.
> SetupDiCreateDeviceInfoList, SetupDiGetDeviceInterfaceDetail)? It would
> be best if I can control the name of the device which appears in Device
> Manager after the driver loads, but as long as I can distinguish our
> hub+devices group from a device attached to a standard hub it will be
> fine.
>
> Should I put in a different VID/PID pair (we can get numbers assigned) and
> write an INF that loads the Microsoft driver? Where would I find an
> example of that? Or would it be better to leave the VID and PID alone and
> change the device number? Any advice would be appreciated.
>



Re: make USB hub easily identifiable by Ben

Ben
Mon Jun 04 11:14:35 CDT 2007


"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:%23F7DAWmoHHA.4412@TK2MSFTNGP02.phx.gbl...
> have each configuraiton be a unique vid/pid. then have an INF which
> matches to the specific hw id of the hub and load the msft usbhub driver
> using your inf, supplying a name in the INF. so essentially, your INF is
> just naming the device and letting the in box driver isntall

Ok, I was able to get this mostly working by making a copy of the usb.inf
file and replacing most of the sections by
Include=usb.inf
Needs=<section name here>

Now, when I go to Device Manager and select Update Driver, I will choose the
driver from a list, the new name appears. But it isn't chosen by default.
I think this might be because it is unsigned, however the documentation
contradicts itself. On one page, it says Windows can choose an unsigned
driver if it is the best hardware id match. On another page, it says
signing status is the most significant portion of the rank. What should I
believe?

http://support.microsoft.com/kb/279112
http://msdn2.microsoft.com/en-us/library/aa477008.aspx

This is all under Windows XP, and our primary deployment will be with XP
embedded, but the device also needs to be usable from a laptop running 2000
or XP (and hopefully Vista as well).

>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "Ben Voigt" <rbv@nospam.nospam> wrote in message
> news:umw21KioHHA.3772@TK2MSFTNGP03.phx.gbl...
>> Some quick background:
>>
>> We are making a set of USB medical data collection devices. Most
>> commonly, they will be packaged together and permanently connected to a
>> USB hub in the same case, however they will also be available as
>> independent devices. I need to know whether a unified device is
>> connected or a bunch of individual modules, among other things the user
>> should be informed if one of the devices fails in the unified collection.
>> The hub chip uses an EEPROM that specifies the VID, PID, and device
>> number.
>>
>> How can I use the standard USB hub driver for our device but tag it in a
>> way I can detect while enumerating devices (using e.g.
>> SetupDiCreateDeviceInfoList, SetupDiGetDeviceInterfaceDetail)? It would
>> be best if I can control the name of the device which appears in Device
>> Manager after the driver loads, but as long as I can distinguish our
>> hub+devices group from a device attached to a standard hub it will be
>> fine.
>>
>> Should I put in a different VID/PID pair (we can get numbers assigned)
>> and write an INF that loads the Microsoft driver? Where would I find an
>> example of that? Or would it be better to leave the VID and PID alone
>> and change the device number? Any advice would be appreciated.
>>
>
>



Re: make USB hub easily identifiable by chris

chris
Mon Jun 04 12:07:07 CDT 2007

On Jun 4, 11:14 am, "Ben Voigt [C++ MVP]" <r...@nospam.nospam> wrote:

> Now, when I go to Device Manager and select Update Driver, I will choose the
> driver from a list, the new name appears. But it isn't chosen by default.
> I think this might be because it is unsigned, however the documentation
> contradicts itself. On one page, it says Windows can choose an unsigned
> driver if it is the best hardware id match. On another page, it says
> signing status is the most significant portion of the rank. What should I
> believe?

You should believe the behavior you are actually seeing on your
system. Why would you believe anything else?

(Translation: signed drivers will always be chosen over unsigned
drivers. As a result, you will need to WHQL your INF which manually
references usbhub, if you want to go this route.)


Re: make USB hub easily identifiable by Ben

Ben
Mon Jun 04 12:47:13 CDT 2007


<chris.aseltine@gmail.com> wrote in message
news:1180976827.462370.78720@p77g2000hsh.googlegroups.com...
> On Jun 4, 11:14 am, "Ben Voigt [C++ MVP]" <r...@nospam.nospam> wrote:
>
>> Now, when I go to Device Manager and select Update Driver, I will choose
>> the
>> driver from a list, the new name appears. But it isn't chosen by
>> default.
>> I think this might be because it is unsigned, however the documentation
>> contradicts itself. On one page, it says Windows can choose an unsigned
>> driver if it is the best hardware id match. On another page, it says
>> signing status is the most significant portion of the rank. What should
>> I
>> believe?
>
> You should believe the behavior you are actually seeing on your
> system. Why would you believe anything else?

I was wondering if something else was preventing my .inf from being utilized
during search (missing pnf, wrong directory, etc).

>
> (Translation: signed drivers will always be chosen over unsigned
> drivers. As a result, you will need to WHQL your INF which manually
> references usbhub, if you want to go this route.)
>

Well rats. I can check VID+PID from code anyway without a .inf, and it's
not worth that kind of expense just to change the name the user sees.

Next idea. Is it possible to check whether a USB port is marked as
non-removable from user code? If so, what function would I use (or what
IOCTL)? Thanks.