Is it possible for one physical USB device to appear as two separate classes of devices?

I'm in the early stages of developing a device that requires a USB connection. At a minimum, the device should appear as an outdated serial port, but it would be useful if it could simultaneously appear as a mass storage device.

Is it possible, or should the device switch between mass storage and communication device, so that is just one at a time?

** [edit] ** I probably fired the question a little quickly; this suggests that this can indeed be done using the USB Composite Device Framework. I would still be wondering if anyone has experience in this regard and there may be some hints or pointers, which platform was used and what if any third-party tools or stacks that they could use.

+3
source share
3 answers

Yes, you can make the same device as two (or more) logical devices.

, , . , , , .

, . , , USB-; " " Freescale i.MX21. Jan Axelson USB Complete , Packet-Master USB-.

+6

, . . USB- Huawei E220 UMTS (3G mobile), : ( /dev/ttyUSB{0,1}), - .

, /dev/ttyUSB{0,1} .

0

- , .

, (, , "" ), .

I would advise if you intend to master USB development at least a little and you have a USB analyzer - you can not only analyze your own things, but you can also connect a set of other people and see how they are descriptors ...

0
source

Source: https://habr.com/ru/post/1722770/


All Articles