Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

SerialPort.List

Returns list of names of serial ports.

Component Version macOS Windows Linux Server iOS SDK
SerialPort 3.0 ✅ Yes ✅ Yes ❌ No ✅ Yes, on macOS and Windows ❌ No
MBS( "SerialPort.List" { ; Mode } )   More

Parameters

Parameter Description Example Flags
Mode Pass 1 on Windows to see longer names from registry.
Pass 2 on macOS or Windows to return JSON.
Optional

Result

Returns the list of names.

Description

Returns list of names of serial ports.
On Windows can list ports with textual name.

When script calling this function runs on client in FileMaker Pro, you may see the ports of the machine your FileMaker Pro runs on. But if run on server side, you see the ports of the server.

Added mode 2 for MBS Plugin in version 12.3 to return information as JSON. Returns JSON array with objects. Each object has at least Index and Name values.

Examples

Get device list and pick first one:

$list = MBS( "SerialPort.List" )
$firstDevice = LeftValues($list; 1)

See also

Release notes

  • Version 12.3
    • Added Mode = 2 for SerialPort.List function to return information as JSON.
  • Version 8.2

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 31st May 2022


SerialPort.LastError - SerialPort.Open