Mixing and matching usbfs with sysfs
I'm having trouble coming up with a decent way to combine information
found in /proc/bus/usb/devices (usbfs) with stuff under
Specifically I have a hard time mapping the topology info in the "T:"
lines of /proc/bus/usb/devices to the device nodes unser
for example, I can find out by hand that
belongs to the device whose entry in /proc/bus/devices/usb starts with
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 7 Spd=12 MxCh= 0
But I have no real idea on how to automatically match the two. So I
wonder if anyboday has solved this problem already?
Thanks in advance,
Re: Mixing and matching usbfs with sysfs
Linards Ticmanis wrote:
> I'm having trouble coming up with a decent way to combine information
> found in /proc/bus/usb/devices (usbfs) with stuff under
> Specifically I have a hard time mapping the topology info in the "T:"
> lines of /proc/bus/usb/devices to the device nodes unser
Ok... just for the benefit of people who might use the archive in the
The answer is, you can usually forget usbfs (/proc/bus/usb stuff) for
anything beyond simply viewing the contents. Everything that is there is
also buried in sysfs somewhere, and while /proc/bus/usb/devices is a
nice human readable thing, crisscrossing through sysfs is really much
easier for programs.