On Mon, 22 May 2006, Abdelkader YEDDES wrote:

> Yes fopen take a handle on a file or a device. I always use these function.
> But in we must send an IO control to the device to have the specific data.
> And every IOCTL is dependent to driver.
> So, after opening the device with fopen. I should know what IOCTL should be
> sent with ioctl function. 

There is no IOCTL to retrieve the vendor/product/serial IDs.

On the other hand, you can simply read the first 18 bytes of the device 
file.  They contain the device descriptor, which includes the vendor and 
product ID numbers as well as the serial string descriptor number.  Then 
you can read the serial number string by sending a Get-Descriptor request.

Or you could do what I suggested originally: Open the file 
/sys/bus/usb/devices/1-4/idSerial and read the serial number from it.

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

Reply via email to