Closed smrtos closed 2 years ago
lsusb.py is showing you the interface for that device, you asked for it with the "-I" option. If you don't want to see it, don't add that option to the command line when you run it.
As far as I can tell, this is working as designed. If not, please provide the version of the release you are using, as well as the full command line arguments you are using to see the above two images.
thanks!
I am using the lsusb (usbutils) 014
. It should be the latest one as of now.
I don't see the version of lsusb.py
but it should be the same.
I am using lsusb.py -I
.
According to here, the general format is:
<bus>-<port[.port[.port]]>:<config>.<interface>
So in the lsusb.py output, the 3-0:1.0
should mean bus 3, port 0, config 1, interface 0
.
So, lsusb shows port 1, 2, 10 for usb3. lsusb.py shows port 0, 2, 10 for usb3.
I think one of them must be showing the wrong port.
The sysfs documentation is for the values that the kernel exports in sysfs, and has nothing to do with the lsusb.py output format.
You are showing the interfaces in lsusb.py, and the values are shown there correctly from what I can determine.
I do not see the discrepancy here, what do you expect the output should look like?
I am expecting the same set of port numbers to be shown for each USB hub. But maybe I am wrong since I am not an USB expert.
Again, the lsusb.py tool is showing you the interface number here, not the port number at all.
The sysfs documentation you are pointing at is how sysfs exports the values, NOT how the lsusb.py tool is showing the values. They are independent and not related as you have pointed out.
Thanks. It seems different schemas are used.
Could you give a formal definition of the lsusb.py output like 3-2:1.3
?
If the component 2
in the 3-2:1.3
means interface, what does the last 3
mean?
I think it is the endpoint number. Would have to go dig through the python source to verify.
I guess I need to dig into some USB book as well.
BTW, could you leave this issue open until we have a solid solution or understanding? Thanks.
I think it is the endpoint number. Would have to go dig through the python source to verify.
Hi, could you provide the formal definition of the 3-2:1.3
now?
Why is a "formal definition" needed?
The lsusb always treat the port number of root hub as 1. While the lsusb.py treat the port number of hub as 0.
Related code: https://github.com/gregkh/usbutils/blob/4bf4819a0dfddc53810a640e3be83dbbeeab0802/lsusb-t.c#L163
Related output of lsusb:![image](https://user-images.githubusercontent.com/54129187/159160509-d63c39bc-fba2-4e4b-bae0-b78d0f9e8d4c.png)
Related output of lsusb.py:![image](https://user-images.githubusercontent.com/54129187/159160570-13a385b5-eb17-4ba1-95ec-363f64962b6c.png)
I think they should be consistent at least...