LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the list of USB connected devices

Solved!
Go to solution

Hi,
 
I am looking for a simple function in labview to progammatically scan for connected devices and list them.
This query concerns USB devices of all types: storage media, printer, mouse, game controller, networking accessory...
Does .NET offer any solution ?
 
Thanks,

 

Eric

0 Kudos
Message 1 of 4
(4,471 Views)

Hello:

 

The .NET method works but I found that the returned data is non descriptive (or lacks identifiable friendly names of devices). 

 

My search plus a suggestion from smercurio landed me on this page. 

 

https://www.nirsoft.net/utils/usb_devices_view.html

 

The usbdeview.exe utility has many command line options including one that returns user friendly names of the usb devices query'ed.

 

Here is a LabVIEW 2014 wrapper that implements the usbdeview.exe utility and returns data for actively connected USB devices and saves that data in a file.

 

The info returned is comprehensive enough to be able to identity the USB device correctly as described.

 

Anthony

 

Download All
Message 3 of 4
(2,485 Views)

BTW:

 

Here is an example of the detailed info returned by the usbdeview.exe utility for a connected USB device. This case is for the USB4 Encoder DAQ board from US Digital.

 

==================================================
Device Name : USB4 Adapter
Description : US Digital USB4 fully functional
Device Type : Vendor Specific
Connected : Yes
Safe To Unplug : Yes
Disabled : No
USB Hub : No
Drive Letter :
Serial Number :
Registry Time 1 : 7/27/2021 1:55:17 PM
Registry Time 2 : 7/27/2021 1:55:47 PM
VendorID : 09c9
ProductID : 0044
Firmware Revision : 0.00
USB Class : ff
USB SubClass : 00
USB Protocol : 00
Hub / Port : Hub 6, Port 2
Computer Name : MEZ-LV14
Vendor Name :
Product Name :
ParentId Prefix :
Service Name : CYUSB3
Service Description: US Digital USB4 Driver Using CyUSB3.sys
Driver Filename : CYUSB3.sys
Device Class : Encoder Interface
Device Mfg : %MfgName%
Friendly Name :
Power : 100 mA
USB Version : 2.00
Driver Description: US Digital USB4 fully functional
Driver Version : 1.2.3.10
Driver InfSection : CYUSB3
Driver InfPath : oem12.inf
Instance ID : USB\VID_09C9&PID_0044\8&3242ce6d&0&2
Capabilities : Removable, SurpriseRemovalOK
Install Time :
First Install Time:
Connect Time :
Disconnect Time :
==================================================

0 Kudos
Message 4 of 4
(2,478 Views)