Skip to main content

Serial_GetPortInfo (function reference)

By July 1, 2023July 17th, 2023Online Help, Troi Serial Plug-in
Troi Serial Plug-in for FileMaker Pro


Get information and status of the serial port with the specified name.

SyntaxFunction badge

Serial_GetPortInfo ( switches ; portname )


switches specifies which information you want to get
portname the name of the serial port you want to get the information of


switches can be one of this:

-Status (default) returns the status of a serial port: this can be: open/closed/not found
-Verbose returns a detailed list of information about the port

Returned Result

Data type returned



The requested information.

If an error occurs an error code is returned. Returned error codes can be:

$$-50 paramErr parameter error

Other errors may be returned.

Originated in

Troi Serial Plug-in 5.0


FileMaker Pro 16 to FileMaker Pro 2023


Set Field [ result ; Serial_GetPortInfo( "-Status" ; "COM1") ]

This returns the status of the COM1 serial port. If the port is open the result will be the text: “open”.

Example 2

Set Field [ result ; Serial_GetPortInfo ( "-Verbose" ; "usb12345" ) ]

This returns information of the “usb12345” serial port. If the port is open the result will be similar to this:

Port name: usb12345
Status: open
Bytes in receive buffer: 123
Trigger filename: SimpleSerial
Trigger script name: Receive data TriggerScript

Used in example file


Related functionsFunction badge


Related topics

Troi Serial Plug-in online help (overview)

Online Help Page for Troi Serial Plug-in for 16 to 2023 –> Serial_GetPortInfo (serip4815) 2023-0717 12:49:06