Hi,
There are some alternative solutions which are related to the HAL (dbus) daemon.
You can get information not just for any USB devices but also some other 
detected hardware.
See: hald, libhal

Mainly you can write a C, C++ (may be other languages) application which can 
search for USB information.
HAL is using an XML based structure to manage the information (see 
hal-device-manager).
Also you can be notified when some USB devices are unplugged or plugged in.
The current problem is that libhal doesn't have a stable API, so you have to 
change your code from time to time.
Regards,
Eugen

> 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Þk&kid0709&bid&3057&dat1642
> _______________________________________________
> [email protected]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-users
> 



-------------------------------------------------------
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

Reply via email to