Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The serialportlist object exposes the available serial ports on a BrightSign player.

serialportlist IDL

Code Block
languagejs
interface SerialPortList {
    Promise<array> getList();
};


Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px

Object Creation

To create a serialportlist object, first load the brightsign/serialportlist module using the Require() method. Then create an instance of the serialportlist class. 

Code Block
languagejs
var SerialPortListClass = require("@brightsign/serialportlist");
var serialPortList = new SerialPortListClass();

serialPortList

Use this interface to get a list of the available serial ports (an array of serial port objects).

getlist()
Code Block
languagejs
Promise<array> getList()

The following table is an example of what getList() might return:

 [{"fid":"UART:0","path":"/dev/ttyS0"},
  {"fid":"UART:1","path":"/dev/ttyS1"},
  {"fid":"USB:B/2.0","path":"/dev/ttyUSB0","pid":24577,"vid":1027},
  {"fid":"USB:B/4.0","path":"/dev/ttyUSB1","pid":24577,"vid":1027}]

  • fidThe friendly ID that indicates the physical location on the player of a port

  • vid, pid The vendor and product ID (for USB devices only) vendor and product ID

  • path:  the The native path suitable for passing to the SerialPort constructor

The roDeviceInfo GetUSBTopology() method contains information about USB devices (though fids used in that method don't contain USB: prefix), and details about the interpretation of the fid field. 

This is the standard port enumeration of serial devices:

  • Most standard serial devices (including the USB-serial port on the LS424) enumerate on port 0.

  • To communicate with the serial port of an OPS display (for example, with the HO523), use port 1.  

See the Node SerialPort bindings documentation for more context.

Example

Refer to the node-serialport documentation for examples.