Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's difference between configuration and interface in USB device?

What's the difference between configuration and interface in USB devices?

I appreciate if you explain it for me by an example.

like image 574
user5439180 Avatar asked Oct 13 '15 13:10

user5439180


1 Answers

A USB device has a certain number of configurations. The USB host must tell the device which configuration to use as one of the last steps needed to set it up.

Each configuration has different power requirements and a different set of interfaces that are exposed. You can think of an interface as a function or a feature of the device. One interface might be an HID keyboard, and another interface might be a virtual serial USB CDC ACM serial port. Typical USB drivers on the host side will attach themselves to an interface of a device rather than the whole device.

A device with multiple configurations might have a high-power configuration where it provides some interface that needs a lot of power (e.g. one that controls motors from the USB power) and a low-power configuration that just has low-power interfaces.

Every device needs at least one configuration and one interface. I think that devices with more than one configuration are rare, since you need specialized drivers on the host side to pick the configuration and it's not that useful. Devices with multiple interfaces are called composite devices, and those are common.

like image 169
David Grayson Avatar answered Oct 25 '22 08:10

David Grayson