![]() ![]() The hub, send the hub an IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX Given an handle to an open hub and the number of downstream ports on ![]() It has this to say about the EnumerateHubPorts() function in its code: Perhaps it might be easier if you create an unmanaged C++ DLL that provides a few calls your C# application can use to get the information it needs. I think you will find if you compile and run this application, you'll see that it shows you exactly where your device is plugged in, and if you plug any device into that port, it shows up in the same place. That application is the USBView sample application. The good news is, Microsoft provides an example C++ application that completely enumerates all USB devices and shows exactly which ports they are connected to. It requires opening the low-level USB root hub devices and directly sending driver IOCTL commands to them. As far as I can tell, it does require the DDK and PInvoke, there's no C# or WMI interface for this information. I know it's been awhile since any activity on this answer, but I am working on a project that requires a similar functionality to this as well, and I can tell you it is indeed possible. During manufacturing, it would be beneficial to track a device as it changes between the manufacturer's ROM (unique VID/PID/serial number) and my custom firmware interface (different VID/PID/serial number). The microcontroller in these devices contains a ROM that enumerates as a CDC device (i.e. Can this information be retrieve through WMI queries or some other method? Is there a better approach to solving this problem?ĮDIT: I know this sounds like a strange scenario. However, the information is available somewhere because there is a "Location information" field under the "Details" tab when viewing the device via the Device Manager. #Retrospect 8 0 serial number update#Plugging the hardware into a different port does not update that field. Port_#0001.Hub_#0010), but it only contains the location of the device when the driver was first loaded. The Win32_PnPSignedDriver class has a "Location" field that seemed perfect (e.g. My thought was to track it by its hub and port location. #Retrospect 8 0 serial number serial number#I have a USB device that enumerates with a different interface, VID, PID and serial number when commanded to do so, and I'd like to keep track of the physical device after this change occurs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |