Steps to reproduce:
- Plug a generic usb-serial adapter (e.g. prolific 2303)
- Try to list serials with list_ports.comports()
Bug: On list_ports_posix.py, function usb_lsusb_string is calling lsusb with parameter "-s X:Y". According to lsusb manual, X should be the bus number and Y should be the device number. However, on the python function, those values came from parsing of device path, from function "describe". This function is getting the correct bus number, but getting the port number, not the device number. In the end, lsusb is being called with Y being the port number, which causes it to return without the expected result.
Suggestion: get the bus and device numbers using another method that is not path parsing (e.g. on my box I have busnum file (with a 6 inside) and devnum file (with a 5 inside) on "/sys/devices/pci0000\:00/0000\:00\:1d.0/usb6/6-2/", for device plugged on bus 6, port 2).
Log in to post a comment.