|
From: Graeme G. <gr...@ar...> - 2007-11-12 21:50:00
|
Dan Ellis wrote: > Having a configuration descriptor with a value of zero is very broken - > there is no way to select it. When the host issues SET_CONFIGURATION > with wValue = 0, to select that configuration, the device should enter > the low power state, and the host should assume that the device has no > active endpoints. > > The library doesn't have a coherent way of dealing with a device with a > configuration with value zero, since it keeps track of which endpoints > are valid to send data on. > > What would be your suggestion for a solution? I would imagine that the simplest thing may be to assume that the descriptor is in error, since (from what you say), it would make no sense for a device to actually have a maximum configuration value of 0. The sort of thing I've done in such cases (dealing with broken implementation of standards) is to have a configurable "forgiving" mode, with appropriate debug messages being available to track what's going on. So with libusb set to a "try and correct broken configuration desciptors" mode, it would internally treat a configuration descriptor with a value of zero as a value of 1, which (I would guess), might solve the original posters problem. Graeme Gill. |