On Windows, if there is a Bluetooth port that is not connected to a device, there can be a long (30 sec or more) pause when the port is accessed in a loop like this:
PortList.DeleteAllRows
for i=0 to System.SerialPortCount-1
PortList.AddRow System.SerialPort(i).Name
next
Why is this? I'm not opening any serial ports. It is possible to enumerate ports without attempting to open them. e.g. this C++ library works just fine:
http://www.naughter.com/enumser.htmlThis is driving many of my customers to despair. Is there a solution to getting the list of serial port names fast, without attempting to open them?
Alternatively, is there a way to know the mapping of COMxx to System.SerialPort(yy), so that I don't have to enumerate the names as I do above?
Paul Rodman