Re: Modified usb-devices.sh script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 20, 2009 at 2:17 PM, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:
snip
>> 4) There are other defined strings in the usb spec, but I cannot find
>> a generic way to find them in sysfs. It would be nice to print all the
>> strings, but I really don't want the script to cause extra usb bus
>> accesses, so I print only the 3 current strings, if they exist.
>
> Sysfs displays only the standard strings that usbcore knows about.
> There hasn't been any reason to load other strings -- in fact, there
> isn't really any reason load some of the strings that _are_ there.
>
> But sysfs does include more than 3 strings.  It has Product, Vendor,
> Serial, Configuration, and Interface strings.  If there are any others
> defined in the USB 2.0 spec, I haven't noticed them.
>


Thanks, Alan,

I had not noticed any interface or config strings. In fact, only one
of my webcam's has an "interface" string. It would have been easier
for browsing if sysfs had a strings subdirectory per device, but I
guess we are locked in to the current layout.

There are lots of other strings defined in the spec, especially in the
class specs, which the .../devices file doesn't particularly cover.
For example, video class (webcams) has descriptor type 36 in the
configuration that contains possible strings for iProcessing,
iTerminal, iExtension etc. I guess that is not relevant in a
description of the device file as we currently have it.

>> 5) The output of this script could be expanded to display other
>> configuration contained data, such as hid or audio or video etc
>> descriptors, if desired. Additional descriptors that are driver
>> requested (hid descriptors etc) are not part of sysfs. If they were
>> they could also be displayed.
>
> I think this is not desirable.  A chief virtue of the devices file is
> its brevity.  If anyone wants detailed information about other
> descriptors, they can use lsusb -v.
>

I guess you are right. I mainly wanted to display everything available
without a bus access. lsusb is not so easy in an embedded system - It
requires several library/executable things to be installed, must be
run as root and needs /proc/bus/usb/devices to be installed to run.
The nice thing about these scripts is all non-root info available can
be presented to the user.

Did you try the gawk script and did it hang your system too?

Regards, Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux