LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify the correct USB Device in LabVIEW.

Hi Fellow LabVIEW’ers.

 

This may not be an all-LV Question, but I’ll give it a try anyway. Bear with me.

I’m currently working on a Test Jig for testing a USB based Communications Device. The Device is based on a Maxlinear 4 port HUB, and utilizes several Silabs CP210x USB to UART Bridges.

The Test Jig will be connected to a test PC, through a Industrial USB HUB. (Which one?)

I want to know how I can make sure I’m talking to the correct Device before I start testing.

The Challenge is, that any number of USB Devices can be plugged in to the Test PC, so I will need to know the Structure of the USB Tree, or in some other Way identify the UUT.

I been tinkering with the Registry VI’s, but I can’t seem to find the Information I’m looking for. (Hence it’s more a Windows Question)

I know my way around LabVIEW fairly well, but this is more than I can comprehend. 🙂

 

Testsetup.png

 

To sum up: How do I make sure I’m talking to the correct USB Device (The Silabs CP210x in the UUT).

 

BR 

Bjarne

 

Working on LV2019.

 

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 1 of 13
(2,948 Views)

If you have multiple devices of the same type connected?

If the device has a serial number (as defined in the Device Descriptor in the USB standard, then it should be possible to retrieve this somehow.

If it doesn't then yopu'll have to rely on some vendor-specific implementation of a unique identifier.

 

If you just want a certain type of device, you can filter based on PID and VID, just like PCI-E devices have.

 

YOu should never need to know the connection tree for this kind of operation.

0 Kudos
Message 2 of 13
(2,943 Views)

Hi Intaris. 

 

Thanks for responding. 

I know the VID & PID for the Maxlinear HUB, but I'm stuck from there.

I'm looking for a way to find out what devices are connected to the Maxlinear. But as said before, I cannot seem to find the information in the Registry. Maybe I'm just looking in the wrong place. 

 

BR

Bjarne

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 3 of 13
(2,923 Views)

Hello,

 

Here the Lib I've found some time ago on the forum or somewhere else. Working for all USB that is a COM port.

It follows the same process described by Intaris, you can find your USB with PID, VID or even serial number if severals USB are from same PID/VID.

0 Kudos
Message 4 of 13
(2,923 Views)

Hi Defaphe.

 

Thanks for replying.

Could You backsave that one to LV2019.

Thanks.

 

BR

Bjarne

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 5 of 13
(2,918 Views)

If nothing else works you could just try polling all the devices in your network. As long as you don't have multiple same devices, the answer given after polling should help you identify what device you are talking to.

0 Kudos
Message 6 of 13
(2,903 Views)

BCL@Servodan wrote:

Hi Intaris. 

 

Thanks for responding. 

I know the VID & PID for the Maxlinear HUB, but I'm stuck from there.

I'm looking for a way to find out what devices are connected to the Maxlinear. But as said before, I cannot seem to find the information in the Registry. Maybe I'm just looking in the wrong place. 

 

BR

Bjarne


Is the Maxlinear hub not a standard USB hub?

0 Kudos
Message 7 of 13
(2,900 Views)

Hi AeroSoul.

 

Thanks for responding.

Polling all Devices could be a possible solution. (Though not very Elegant) 🤔

I'll consider that if don't get another Answer.

 

Thanks.

 

BR 

Bjarne

 

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 8 of 13
(2,892 Views)

 


BCL@Servodan wrote:

I'm looking for a way to find out what devices are connected to the Maxlinear.

On Windows, the device manager can enumerate the parent, siblings and children of a device. There should be a way to get these values from the Windows API (this looks like a starting point: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/retrieving-device-relations).

0 Kudos
Message 9 of 13
(2,891 Views)

Hi Intaris.

 

The Maxlinear Chip is indeed a standard 4 port HUB.

If I could just get the Information what is connected to the Maxlinear HUB, I think I'd be Homefree. 

I tried using USBVIEW2.EXE from a Command Prompt, but the information it returns is simply Overwhelming. 

 

BR

Bjarne

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 10 of 13
(2,890 Views)