linux - How to determine sysfs devpath from USB device VID and PID in Python? -


I need to locate a USB device in my VID and PID Python in sysfs tree. What will be the most sensible approach? Scanning the Directory Tree consistently is the only idea that comes to my mind. Is there a better view? I can not use libusb binding

You can try to use the sysfs path for the USB IDProduct and for idvendor files / Sys / bus / usb / devices /, and globbing

  / sys / bus / usb / devices / * / idProduct / sys / bus / usb / devices / * / Idvendor  < / Pre>  

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -