Returns a list of all available ASCOM serial ports with COMnnn ports sorted into ascending port number order

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
public string[] AvailableCOMPorts { get; }
Visual Basic
Public ReadOnly Property AvailableCOMPorts As String()
	Get
Visual C++
public:
virtual property array<String^>^ AvailableCOMPorts {
	array<String^>^ get () sealed;
}

Field Value

String array of available serial ports

Return Value

A string array of available serial ports

Implements

ISerial..::..AvailableComPorts

Remarks

Update in platform 6.0.0.0 This call uses the .NET Framework to retrieve available COM ports and this has been found not to return names of some USB serial adapters. Additional code has been added to attempt to open all COM ports up to COM32. Any ports that can be successfully opened are now returned alongside the ports returned by the .NET call.

If this new approach still does not detect a COM port it can be forced to appear in the list by adding its name as a string entry in the ForceCOMPorts key of the ASCOM Profile. In the event that this scanning causes issues, a COM port can be omitted from the scan by adding its name as a string entry in the IgnoreCOMPorts key of the ASCOM Profile.

See Also