How can you check if an MIDI device is also an USB device?
Seems that checking for this string "\\?\\usb" in the device identifier is not enough all the time.
Use CM_Get_Parent (recursively) to find out whether the MIDI device is connected beneath a USB root port.
Related
If I connect a USB device to the host and then upgraded the USB device with a new firmware with changes in the Descriptor of the device. The host will use the old descriptor.
I know that I can force the device to re-enumerate itself by deleting Windows initialized driver for the device etc. or I can bump the ProductId in the descriptor and the device will re-enumerate.
Windows cash the information about the device etc. and thereby windows never ask the device to provide the information again on reconnecting about interfaces, configuration, endpoints, HID descriptor etc.
idProduct - changing this will re-enumerate the device because windows will think its a different device.
iSerialNumber - changing this will re-enumerate because windows need to differentiate between two same idProducts (two of same products connected)
bcdDevice - should do the trick of re-enumeration but it's not working as specified in USB specification.
My question is how can I force Re-enumeration of the USB device without deleting drivers etc. or changing idProduct or iSerialNumber?
Any help will be appreciated...
This is the closest I could fine but it enumerates all usb devices. In my case I am handling WM_DEVICECHANGE event where I handle arriving usb device and want to gather extended information from this device when its plugged in other than the simple USB strings that contains the vid and pid.
I can't find any resource on it, is that possible?
I am using windows 7 and qt 5.5
How to identify a device connected on USB port is a mass storage device with the help of Mac OSX IO Kit library? Lets an example USB keyboard and USB flash drive is connected on Mac OSX system. How can i differentiate ONLY the mass storage USB device?
You can access the IOService node (IOMedia object) corresponding to a specific disk using the Disk Arbitration framework's DADiskCopyIOMedia function. You can walk up the IOService tree to your IOUSBInterface/IOUSBDevice from there.
Alternatively, you can use I/O Kit matching to find all USB mass storage or USB attached SCSI (UAS) nodes in the system by their IOKit classes. Similarly for keyboards (they are part of the I/O Kit's HID family).
I suggest taking a look at the IOService tree of your system in IORegistryExplorer.
I'm trying to get a device name for a USB Bluetooth transceiver to use with CreateFile, but I don't know the file path. I've tried the USB file path but always return SHARING_VIOLATION.
In order to understand if that's the correct device path, how can I get Windows registered device names? Is there a standard device path for a Bluetooth transceiver?
The most straight-forward is likely USBDeview to find the exact device name.
And I'm not aware of a standard name for the BT transceiver.
I am developing a USB composite device. The composite device have 8 switches and one LED.
When I plugged the Composite device to PC,I could find five devices (each with same device ID but different instance IDs) in the HID section of Device Manager.
Why OS is showing multiple instances instead of One. Can anyone help me understand the concept?
As I recall 'composite device' is just a name in windows to mark that you have multiple devices on your USB line. There isn't a composite device class in the USB protocol. When you connect your USB device to your PC it communicates with all the devices contained in it and reports individually all their address and types. If you are missing some devices in your device manager it could be a driver issue or the device itself is broken. I don't know for sure but maybe there is a limit lower then it could be in theory in the windows hid host driver for the number of supported devices on a single line.