Thanks for this information, But, can we do the same thing using a programming lanaguage such as C, C++ or Java. $ cat /sys/bus/usb/devices/1-4/idProduct : Is just a shell command, But if I want to develop a Graphical Interface. How can I obtain this information ?
Thanks in advance. -----Original Message----- From: Alan Stern [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 4:54 PM To: Abdelkader YEDDES Cc: [email protected] Subject: Re: [Linux-usb-users] API that can read the PID / VID 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&kid0709&bid&3057&dat1642 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
