Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Recover Unused COM Numbers

I have USB-RS232/4 boxes in multiple test fixtures that interface to test benches. Each test fixture is routinely connected to/removed from the test benches (pcs). This causes the USB devices to be detected and Com ports to be assigned. For one particular USB-RS232/4 box the Com ports are always the same, but a different box gets assigned new Com ports. My intention is to prevent my Com port numbering to get out of control. I can prevent this by manually by the following procedure (according to NI SERIAL Help):
 
"To free up the COM number assignments that are no longer associated with hardware physically present in the system, follow these steps:
Select Start»Programs»National Instruments»Measurement & Automation to launch MAX.
Select Tools»NI-Serial»Recover Unused COM Numbers."
 
Is there a way to programmatically "Recover Unused COM Numbers" (using LabVIEW)?
 
I know this function deletes keys in the registry, but I do not know the complete procedure.
The only keys I am aware of are in "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB", with certain "vid_3923&pid_xxxx". Where, xxxx = 7011 (USB-232/4 Ports 1 and 2),7025 (USB-232/4 Ports 3 and 4), 703c (NI-Serial Device Initialization), and 704a (Generic USB Hub).
 
Any help would be appreciated.
 
Jerry
0 Kudos
Message 1 of 3
(3,660 Views)
Hi Jerry,

After looking into this issue, at this point, that is not a supported feature of NI-Serial.  Using the steps you described from the NI-Serial Help is the recommended way of recovering unused COM ports.

Let me know if you have any other questions!

Meghan
0 Kudos
Message 2 of 3
(3,636 Views)

Dear all USB Users,

 

> Is there a way to programmatically "Recover Unused and FIX COM Numbers" 

 

It is hard to live with the Totally Random USB COM port Enumeration that Windows always apply...

Is there a way to make this less Random, or even totally controlled and Previsible?

 

I found that for each USB device the following apply (or at least should apply)

Each device has:

- VID = Vendor ID

- PID = Product ID

- PSN = Product Serial Number

So with we have the possibility to make a COM-Port-Number Reservation/Binding Option for this USB device with Unique ID: VID&PID&PSN

This would result in the possibility for having the desired Unique Fixed COMxx Port Number Reservation...

 

.....................

 

The Windows USB COM-Port Enumeration is a worldwide problem... as it seems to be only totally dynamic...

Is there really NO way to fix or reserve COM-Ports some way...?

 

I found this software on the web: usbdeview-x64.zip and I installed it...

 

The Solution to this Problem could be just like DHCP MAC-Address to IP-Address binding...

 

If Windows USB COM-Port Enumeration could work this way:

Windows USB COM-Ports seems to use 2 or 3 parameters…
- VID = Vendor ID

- PID = Product ID

- PSN = Product Serial Number*** (seems to currently NOT being applied in Windows?)

=>

VID&PID&SN results in a Unique_Id_Number that could be bound (in the Device Manager)

to the same COMxx each time the USB Hardware is detected!

 

Thanks...

The World and I would appreciate a COMMENT to this...

And much better also an action to this problem...!

 

Thank you for reading ana all the best regards

Ronn

 

0 Kudos
Message 3 of 3
(1,025 Views)