From: Frank Natoli on
I understand that one USB device and declare multiple interfaces. What
I would like to do is declare two separate vendor/product codes on a
single USB interface. Is this possible? One socket, one electrical
connection, look like two devices: vendor A product X and vendor A
product Y. Can do?
From: Philip Ries [MSFT] on
You would need to make a compound device, which would look like this
internally:

Hub
\- Device X
\- Device Y

If you don't actually need different product codes, you can also make a
composite device, which gets multiple drivers loaded such that each
driver owns a set of endpoints exclusively. By default the sets of
endpoints are defined by the interfaces in the configuration descriptor.

Frank Natoli wrote:
> I understand that one USB device and declare multiple interfaces. What
> I would like to do is declare two separate vendor/product codes on a
> single USB interface. Is this possible? One socket, one electrical
> connection, look like two devices: vendor A product X and vendor A
> product Y. Can do?
From: Frank Natoli on
Many thanks for your reply.

I do need the different product codes, so the "compound device" would
appear to fit the bill.

The hardware guy has picked for the circuit board a three port USB
hub, the Cypress CY7C65631. Two ports must go to two SSDs. The third
port goes to the CPU USB. But the CPU USB needs to represent two
devices, same vendor ID but different product IDs. The "compound
device" saves the day, don't need to find a four port USB hub.

However, your reply appears to indicate that the CPU must represent
itself as a hub in order to then portray the "compound device". Is
that correct?
From: Tim Roberts on
Frank Natoli <FrankJNatoli(a)EmbarqMail.com> wrote:
>
>I understand that one USB device and declare multiple interfaces. What
>I would like to do is declare two separate vendor/product codes on a
>single USB interface. Is this possible? One socket, one electrical
>connection, look like two devices: vendor A product X and vendor A
>product Y. Can do?

Only if your device can itself be a hub, plus the two separate devices
behind it. That's a lot of work, and most basic USB micros won't do it.

However, it is trivial to make a composite device by putting two interfaces
in your descriptor. Each interface is treated by Windows as a separate
device, with it's own driver stack.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: Frank Natoli on
Thanks, Tim, but when Phil first replied, he appeared to say that a
"composite" device can only describe a single vendor ID and product
ID. But since I need to represent two separate SSDs, and each needs to
be distinguished by different product IDs, it would appear that
"composite" won't do, and "compound" is necessary, correct?

I may be forced to tell the hardware guy that he needs to find a four
port chip.