On Fri, 12 May 2006, Abdelkader YEDDES wrote: > Hello, > > I'm new in USB under linux, I worked under windows many USB based > application. So, all Linux API are new for me. > I 'd like to know if there are any API that can read the PID / VID , Serial > Number. > If not, How can access to the USB device under Linux?
Yes, there is such an API. For example, right now I have a USB flash drive plugged into my computer. Its pathname is 1-4 (i.e., it is plugged into port 4 of USB controller 1). The information you want is available as follows: $ cat /sys/bus/usb/devices/1-4/idProduct 1400 $ cat /sys/bus/usb/devices/1-4/idVendor 0d7d $ cat /sys/bus/usb/devices/1-4/serial 07460E030679 More general access to USB devices can be programmed using libusb. Alan Stern ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
