On Mon, 3 Dec 2007, Phil Endecott wrote: > Dear Experts, > > Can anyone suggest the best way to determine the speed (low/full/high) > at which a device is operating from user-space? > > usbdevice_fs has 'connectinfo', which seems to return a flag for > low-speed operation. But it doesn't seem to distinguish between full > and high-speed. A usbdevicefs method would be ideal as I'm already > using that, but maybe there is something in /sys?
That "connectinfo" call really is badly designed. If usbfs weren't in maintenance mode I'd suggest replacing it with something more useful. For example, the structure should return the bus number as well as the device number, plus the bus_id string, plus the speed as an integer (not a boolean). The sysfs file Greg mentioned is probably easiest to use. For thoroughness, it's worth pointing out that you can get the information from usbfs by parsing the data in /proc/bus/usb/devices. But not all distributions mount the filesystem containing that file, which means you can't rely on it being available. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
