The daemon is controlled through D-Bus messages. In short, D-Bus is a message bus system, a simple way for applications to talk to each other.

Usually D-Bus defines two buses, called the system bus and the session bus.

SEC registers itself on the system bus.

When there are no connections created in SEC, only /SEC and /log objects are present.

A shared serial port is called a connection meaning a link between network and serial port. Type of network side of the connection can be defined only on connection creation.

The following network modes are available:

  • TCP server
  • TCP client
  • UDP (with multicast support)

Each connection has its own unique object appearing in D-Bus objects’ tree as /SEC‘s child (see examples below).

This object has serial and net child objects allowing to control specific parameters of each side of the connection.

Usually, the process of sharing serial port consists of the following steps:

1. Create a connection, specifying:

  • serial port name (or a symbolic link name in case of virtual port),
  • serial port type: real or virtual,
  • network side type.
    See createConnection method.

2. Set connection, network and serial port parameters.

3. Start the connection by calling start method.

Properties and methods have three access levels: no access, read-only access and full access (read-write). After connection started, access level can be changed for some properties and methods. For example, properties and methods with no access level can become available, that is, they can acquire read-only or full access. And, vice versa, properties and methods with full access level can become read-only ones. See descriptions of specific methods and properties below.

If a method is not supported in the current mode, then it will not be visible in D-Bus object.

Note: In case of virtual port, Serial to Ethernet Connector will use native Linux virtual serial port in connection. Read/write rights to access virtual serial ports are granted to ‘root’ user and ‘dialout’ group only.
Note: Make sure you have customized your firewall settings so that network traffic is not blocked.