03-06-2011 03:21 PM
I need to test whether some USB extension ports are wired correctly. What I'm thinking is to use some small USB devices such as flash drives connected to these extension ports and run the program to list the devices. Because the test is going to be handled by other people, I want to have proof that correct ports are used.
I'm open to suggestions regarding how this test can be done, or detailed to how I can display the devices and their ports.
I did some search and find this site, the solution it provides will list audio devices, but it couldn't give a port ID.
Guangdew
03-07-2011 03:42 PM
Hey-
I found a good link that might help point you in the right direction.
http://zone.ni.com/devzone/cda/tut/p/id/4478
Hope this helps!
Thanks,
Sean
03-07-2011 04:37 PM
Hi Sean,
I studied this article before for some other project. I revisited and want to see whether it will show me the port information. But then I realized that it's port dependent. If I plug an audio device to a specific port, Windows can recognize it as a usb device, but not a HID device, MAX can recognize it as usb device. For other ports, Windows can recognize it as both HID and usb device but MAX can not recognize it at all. This device is the one I tried with this article. Because it shows only on one port, I don't know whether it has port information in it, and also I don't know how I can read it out with my LabVIEW program. Please advise.
Thank you for your help.
03-07-2011 05:22 PM
I have used MS DevCon to find ports and devices on a Windows based PC.
I find USB comports
Network Interfaces installed.
Comport and LPT port addresses
PCI bus devices etc.
Check if this will provide the port info you need and if so I have a number of VI to parse out the info from DevCon.
03-08-2011 07:10 AM
Thank you for your suggestion. I tried the DevCon before. If I run the DevCon itself, it will only give me a flash of cmd screen. If I use use System Exec.vi to call it, it will not give me any meaningful list on the output sind.I don't know whether my computer has problem or not.
03-08-2011 08:50 AM
The flash means there was likely an error. Like it could not find devcon.exe or you did not use the correct form of the command.
First do you have a copy of devcon.exe where your program can find it (in system32)?
Have you tried opening a Command Prompt window first and manually typing devcon and seeing what if any errors are reported.
This is the help from devcon
devcon [-m:\\<machine>] find <id> [<id>...]
devcon [-m:\\<machine>] find =<class> [<id>...]
Find devices that match the specific hardware or instance ID.
This command will work for a remote machine.
Examples of <id> are:
* - All devices
ISAPNP\PNP0501 - Hardware ID
*PNP* - Hardware ID with wildcards (* matches anything)
@ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID)
<class> is a setup class name as obtained from the classes command.
Devices are listed as <instance>: <descr>
where <instance> is the unique instance of the device and <descr> is the descrip
tion.