Skip to main content

Serial_GetUSBInfo (function reference)

By July 2, 2023November 27th, 2023Online Help, Troi Serial Plug-in
Troi Serial Plug-in for FileMaker Pro


Get USB information (if available) of the serial port with the specified name.

SyntaxFunction badge

Serial_GetUSBInfo ( switches ; portname )


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


switches can be one of this:

-Verbose (default) returns a list of USB information about the port
-USBVendorName returns the vendor name of the USB port hardware
-USBProductName returns the product name of the USB hardware
-USBSerialNumber returns the serial number of the USB hardware
-USBVendorID returns the vendor ID as a hex number
-USBProductID returns the product ID of this hardware product as a hex number

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 8.0


FileMaker Pro 16 to FileMaker Pro 2023


A serial port can be implemented as virtual port on top of a USB port. When this is the case this function returns information about the USB (hardware) port, like the USB vendor name, USB Product name and USB Serial number.
If this serial port is not running on a USB port the function returns “<no USB information found>”.
If you specify no portname a list of information of all ports is returned.


Set Field [ result ; Serial_GetUSBInfo ( "-Verbose" ; "usbmodem15501" ) ]

This returns the USB information of the usbmodem15501 serial port, and will be similar to this:

USB Vendor ID: 0x2a03
USB Product ID: 0x1043
USB Vendor Name: Arduino SRL           
USB Product Name: US-123AB Serial Adapter
USB Serial Number: 12345678AB5B0

Example 2

Set Variable [ $USBSerialNumber ; Serial_GetUSBInfo ( "-USBSerialNumber" ; "usbmodem42501" ) ]

This returns the USB serial number of this USB port. If you have multiple USB devices attached to a computer you can use the USB serial number to distinguish between these similar USB ports.

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_GetUSBInfo (serip4818) 2023-0717 12:51:49