Hi to all,
I have some identical SmartCard Reader (Gemplus reader) connected to a usb hub.
Each of these has identical vendorId and productID, so I can't recognize which of them I'm using in a determinate moment.
need to associate a device to a port and recognize it: to do it, I need
only to obtain a data (code, ID, number, or something else) that can
tell me that I'm using a determinate usb port (or device). This code
has to be identical indipendently from the reboot of machine or from the adding
of other devices.
I've tryed to use usblib and I've seen that in the properties of the descriptor I've in "non-public members" a string like this:
filename=\\.\libusb0-0006--0x08e6-0x3437, next=0, prev=4109368,
bus=4106240, descriptor=[usb_device_descriptor: bcdDevice = 256, bcdUSB
= 272, bDescriptorType = 1, bDeviceClass = 0, bDeviceProtocol = 0,
bDeviceSubClass = 0, bLength = 18, bMaxPacketSize0 = 8,
bNumConfigurations = 1, idProduct = 13367, idVendor = 2278,
iManufacturer = 1, iProduct = 2, iSerialNumber = 0], config=62,
that terminate whit a code, called dev, that seems
to be always the same indipendently of the usb port where I attache the
device. So it could be the code that I need for my scope, but I don't know how to obtain something contained in non-public member.
Some idea on how to obtain it or to obtain an identifier from usb port