Getting friendly name of serial ports

The serial port names assigned by the system are usually cryptic and don’t tell anything about the device. Luckily, such devices have a “friendly” name that is more informative. For example:


COM14 by itself wouldn’t tell the user much, but with the friendly name it is clear that it is the Arduino Uno they have plugged into the machine.

Here is the code that will extract this friendly name on Windows:

Public Shared Function GetSerialPortFriendlyName(PortName as string) As String
  #if TargetMacOS
    #Pragma Unused PortName
    return ""
  #elseif TargetLinux
    #Pragma Unused PortName
    return ""
  #ElseIf TargetWindows
    // Get the VID and PID for the port
    var reg1 as new RegistryItem("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter\Devices", false)
    var val1 as string
      val1 = reg1.Value(PortName)
      return ""
    end try
    if val1 = "" then return ""
    // Get the friendly name using VID and PID
    var parts() as string = val1.ToArray("#")
    var key as string = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\"
    key = key + parts(0).Replace("\\?\", "") + "\"
    key = key + parts(1) + "\"
    key = key + parts(2)
    var reg2 as new RegistryItem(key)
    var val2 as string
      val2 = reg2.Value("FriendlyName")
      return ""
    end try
    if val2 = "" then return ""
    // Extract the Descriptions
    val2 = val2.Replace("(COM", "|COM")
    val2 = val2.Replace(")", "")
    parts = val2.Split("|")
    if parts.Count <> 2 then return ""
    var Description as string = parts(0).Trim
    return Description
  return ""
End Function

As you can see, this is missing the implementation for macOS and Linux, but the one for Windows works as expected. I haven’t found a good way to obtain the friendly name for USB/Serial devices for macOS yet, and I haven’t even looked for Linux.

I’m hoping that someone can perhaps provide a lead on how to do this on macOS (without plugins, please). Thanks!


Sorry, can’t help on Mac (but am interested in solutions, with or without plug-ins).

Interesting how you get FriendlyName under Win using the Registry. I use Win32 API calls via Chris Carter’s DeviceList classes:, but a 64-bit-compatible solution would be great.

With Chris’ classes I can get the “Raw Name”, which includes an FTDI converter chip’s (user-programmable) serial number - can you also get the FTDI serial number using the Registry?

Not sure.

Here is what HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter\Devices returns for the one of the FTDI devices I have:


When I then lookup the details for this device using Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\VID_0403+PID_6010+FT0LPM5UA\0000, I get the following:

Perhaps the piece after the VID and PID is the raw name?

Here are a few more USB/Serial device my system has in the registry, for your reference:


I hope this helps.


1 Like

This thread lists a method to get this information on macOS:

1 Like

Still looking for a good way to do this on LINUX.

for linux the command would be lshw