M
megaabite
Guest
We have a product that contains a UBS hub. Two devices are always connected to the hub, a third device is optional. There may be more than one of the product connected to a computer.
One of the devices is a basic RFID reader which does not have a serial number. In order to determine which pair or triplet of devices is part of a specific physical product I want to enumerate the devices by hub.
Currently using a free tool (NativeUsbLib) which is loosely based on usbview. For each hub, the devices are enumerated using DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, ...) At one point the code gets the device driver key using DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME) which, according to the code, is "useful in locating a device". From the driver key the code also finds the InstanceId which can be used to uniquely identify the device. But, none of this has led to the DevicePath.
At some point I need to be able to open the device for reading and writing. For some reason I cannot figure out how to get the DevicePath from the above described enumeration process.
Any ideas how to get the info needed to group devices by hub then open one of the devices for reading and writing? TIA for your feedback!!!
Continue reading...
One of the devices is a basic RFID reader which does not have a serial number. In order to determine which pair or triplet of devices is part of a specific physical product I want to enumerate the devices by hub.
Currently using a free tool (NativeUsbLib) which is loosely based on usbview. For each hub, the devices are enumerated using DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, ...) At one point the code gets the device driver key using DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME) which, according to the code, is "useful in locating a device". From the driver key the code also finds the InstanceId which can be used to uniquely identify the device. But, none of this has led to the DevicePath.
At some point I need to be able to open the device for reading and writing. For some reason I cannot figure out how to get the DevicePath from the above described enumeration process.
Any ideas how to get the info needed to group devices by hub then open one of the devices for reading and writing? TIA for your feedback!!!
Continue reading...