From: Alan S. <st...@ro...> - 2013-07-09 17:19:18
|
On Tue, 9 Jul 2013, Ram wrote: > Hi Alan Stern , > > Thanks for your reply, > > Actually I am building application for handling identical(Same VID/PID) usb > devices on Linux OS(using libusb API).I am able to connecting devices one by > one and doing operations on usb device which is opened.But i am not able to > differentiate identical usb device, It's not clear what you mean here. Identical devices can be differentiated by their device address or port path (older versions of libusb may not provide this information, though). On the other hand, there's no way for a program to tell when somebody has unplugged two of these devices and then plugged them back into each other's port. To put it another way, you can tell the devices apart, but you can't identify them. > For this I have used libusb API functions > "libusb_get_bus_number" but i got same bus number for both identical usb > devices and also i got same descriptor values from libusb > API(libusb_get_device_descriptor). > > > How can i access exact device file(Like eventX) for doing operations on > exact device????? Try libusb_get_port_path(). Alan Stern |