adigostin
adigostin

Reputation: 638

What is an Alternate Setting in a USB interface?

What is an Alternate Setting? Example of device that needs them?

The USB spec has a lot of talk about them, but never tells what one is and - most importantly - why I would use one. I never saw a USB device that uses alternate settings.

Upvotes: 10

Views: 8685

Answers (2)

David Aparicio
David Aparicio

Reputation: 53

As far as I understood the specs, a given USB host expects to install ONLY ONE specific driver for a given VID/PID identifier. Now, some devices provide different interfaces, which would require a completely different driver. For example a USB modem that also implements a usb storage to provide installation software. One mechanism that allows the host to select either the MSC interface (storage) or the SSP interface (modem) is the alternate setting configuration.

Upvotes: 0

azizulhakim
azizulhakim

Reputation: 658

Alternate setting is used to provide the advantage of having two configurations on the fly even though the device has only one configuration.

The alternate setting of a USB interface is define by the bAlternateSetting attribute in the Standard Interface Descriptor. A USB interface with an alternate settings can be used in two mode. For example a USB interface endpoints may act as INTERRUPT pipes in normal settings, but might act as BULK pipe in alternate settings providing you the facility of two different mode on the same interface. You just have to send a SetInterface request to activate a settings. I myself didn't have to use it much though. And I think normally device drivers don't tend to use it as I couldn't find out any example driver.

You can look at this link for more details.

Upvotes: 8

Related Questions