If a device is connected to a hub, the correct port number in sysfs should be like a.b.c (the port number on their respective hubs), as attached in the screenshot.
The current implementation only takes the last port number into consideration, thus returning wrong results.
Fix it by using libusb libusb_get_port_numbers API.
If a device is connected to a hub, the correct port number in sysfs should be like
a.b.c
(the port number on their respective hubs), as attached in the screenshot. The current implementation only takes the last port number into consideration, thus returning wrong results. Fix it by using libusblibusb_get_port_numbers
API.