I'm developing an embedded USB device which needs to be available to two different hosts. The first is a normal PC, where it will be used as a MSC (mass storage) device, and the second is a specific hardware which the USB device needs to comunicate with a CDC profile.

during the enumeration, the USB device send descriptor table where it declares its capabilities.

Is there a way in the enumeration process to know to which host the device was connected to ?

有帮助吗?

解决方案

The simplest solution perhaps would be to implement a "USB Composite Device", where the single device presented both the MSC and CDC class interfaces simultaneously. The host PC would see both interfaces, but you could simply leave one unused. The "specific hardware" would probably simply ignore the MSC class if it had no support for it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top