Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What are multiple configurations for? How are they typically used?



At 4:03 PM -0500 2/16/06, Dan Smith wrote:

The question I have is this. Our device is only going to have one
configuration, and it's going to be vendor-specific. As a matter of good
practice, if you know that a device with device ID so-and-so, product ID
so-and-so has only one configuration, would you bother to go through the
configuration steps anyway, or would you skip them?

It depends on what you mean by "the configuration steps", I don't know which example you're working to.


If you know everything about a device, you do not need to discover the configurations it has, you could skip straight to the setting of the configuration. In theory a device should not do anything unless it has been configured (that's in the USB spec), so you should do at least that.

If you're having problems discovering the configurations, you should really fix that. It sounds like its failing to deal with very basic, required (by the USB spec) commands.

And to answer your question, I always go through the discovery and setting of configurations, even if I know everything about the device. Its one less thing to change when you change your device.

Second, neither the Cypress book nor "USB Complete" explains very clearly just
what would be some real-world examples of multiple configurations, or how they
would be used. What are some real-world examples? Do end user typically select
a configuration in some utility? Does a system typically configure the USB
device as soon as it's connected, or does it get switched from one to another
while it's running, or what? What are they for, and how are they typically used?

Multiple configurations are very rare. My theory is that's mainly because one of the major OSs in the world does not support multiple configurations and makes it very difficult to work with them.


The major use of a multiple configurations is to change the power usage of the device. The configuration specifies the bus power that a device can draw, there are 2 types of ports in the world high powered and low powered. If you want your device to always work on any port (high or low powered) and to be able to draw as much power as possible (100mA or 500mA), you can do that with multiple configurations. One will specify high power and one will specify low power.

The problem there is the support for such things is spotty and inconstant across the major OSs. Mac OS X will automatically choose the highest powered supportable configuration, but only if you have 10.3.6 or greater. Linus will choose the first configuration, whether it can be supported or not. OS 9 will choose the first supportable configuration (above 9.?) and Windwos will choose the first configuration, only if it can be supported.

For an example of a device which does this, see the iPod shuffle. It does some extra tricks to work on Windows.

Another, and even rarer use of multiple configurations is to entirely change the functioning of the device. An example of this are the latest iPods (nano and the one with video). In normal circumstances they manifest as Mass Storage Class devices, so iTunes can sync with them. However they have a second configuration which only has a HID interface in it. Given a suitable host driver, the host can configure the iPod with this second configuration and then can use the HID interface. (The details of which are not published.)

This is very rare, as one of the major OSs does not support multiple configurations as i mentioned. So most developers don't even try to do this.
--
Barry Twycross
email@hidden
---
USB, it's not a Dyslexic BUS. (Thanks to TC.)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden


This email sent to email@hidden
References: 
 >What are multiple configurations for? How are they typically used? (From: "Dan Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.