I have a device that connects to the computer through serial port. I understand to open the port in .NET I can call the port by COM number. For example
SerialPort s = new SerialPort("COM9");
s.Open();
calls the device on COM9. However, if I run my program and serial port device on another computer port number could be changed, yet the device name is always the same on every computer. For example in this picture I would like to communicate with "Numato Lab 8 Channel USB Relay Module" regardless of the COM port number (Name is always the same as opposed to the port number).
Question is: Is there anyway that instead of the code above I call my device with its name as shown in device manager rather than its port number? like
SerialPort s = new SerialPort("Numato Lab 8 Channel USB Relay Module");