Click or drag to resize
SerialAvailableCOMPorts Property
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.3.0.2839)
Syntax
public string[] AvailableCOMPorts { get; }

Property Value

Type: String
String array of available serial ports

Return Value

Type: String
A string array of available serial ports
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