NAME
OVERVIEW
The command-line client communicates with SEC daemon running on the local machine. It allows adding and removing shared serial ports and lets you modify serial port settings.
USAGE
DESCRIPTION
The following commands are available:
version
Print the software version
license [OPTIONS]
Query registration info.
You may request:
-n, --name - The name of the user the software is registered to. -t, --type - License type. -d, --days - The number of days left before the license expires. -v, --valid - License validity check.
register
Register the software
list [OPTIONS]
Show the list of active connection (shared serial ports).
-1,-n, --names - Show only the names of shared serial ports. -s,-S, --stat - Show connection statistics.
add
A shared serial port is called a connection, which means a link between the network and a serial port.
You can specify serial-port by using one of the following options:
-r, --real path - The name of a real serial port to open. -v, --virt, --virtual path - The name of a virtual port to create.
You may configure serial port parameters by using the serial subcommand with the following options:
-b, --baudrate, --baud-rate rate - Baud rate.
-c, --char bits - The number of data bits in each character: 5..8.
-p, --parity parity - Parity bit: none, even, odd, mark, space.
-s, --stop-bits stop-bits - The number of stop bits: 1, 1.5, 2.
-f, --flow-control flow-control - Flow control: none, hw, sw.
To configure how data will be read from a serial port, you may use the packets subcommand:
-p, --pause milliseconds - Add a pause between packets. -w, --wait milliseconds - Wait for a specified period of time. before sending data. -b, --block bytes - Send data when the block reaches a certain size. -c, --char char-code - Send data when a character with specified code is received. -C, --no-char - Disable --char.
The type of network for a connection can be selected only on connection creation.
The following network modes are available:
- server: TCP server;
- client: TCP client;
- udp: UDP with multicast support.
A TCP connection can transfer either data only (the RAW protocol) or data and serial port configuration (the Telnet protocol). A UDP connection always uses the RAW protocol.
When utilizing the RAW protocol, you may establish connections to one shared serial port from multiple remote nodes. To specify the sides that will receive data from or send data to a shared serial port, you should use the — incoming and — outgoing options.
none - Disable data transfer. first - In the client and UDP modes, the connection is established with the remote node listed first. In the server mode, it’s the first connected client. last - In the client and UDP modes, the connection is established with the remote node listed last. In the server mode, it’s the last connected client. latest - The peer that was the last one to send data to the connection. all - Receive data from/send to all peers.
Note: These options cannot be used for a Telnet connection, as this type of connection can have only one server and one client.
Connection properties
UDP connection properties:
-i, --incoming mode - The node that is allowed to send data to this connection (none, first, last, latest, all).
-o, --outgoing mode - The node that is allowed to receive data (none, first, last, latest, all).
-l, --local port - The port to receive data.
-4 - Force IPv4 mode when opening port.
-6 - Force IPv6 mode when opening port.
-r, --remote address:port - The address and port to send data to (can be specified multiple times).
TCP server connection properties:
-i, --incoming mode - The node that is allowed to send data to this connection (none, first, last, latest, all). -o, --outgoing mode - The node that will receive data (none, first, last, latest, all). -l, --local port - The port to receive data. -4 - Force IPv4 mode when opening port. -6 - Force IPv6 mode when opening port. -p, --password password - Password-protected connection. -e, --encrypt [encrypt], -E, --no-encrypt - Set data encryption. -m, --max clients - The maximum allowed number of connections. -d, --ondemand, -D, --no-ondemand - Open a real port (or create a virtual one) only when there are active connections. -n, --nagle - Enable Nagle's algorithm.
TCP client connection properties:
-i, --incoming mode - The node that is allowed to send data to this connection (none, first, last, latest, all). -o, --outgoing mode - The node that will receive data (none, first, last, latest, all). -r, --remote address:port - The server to connect to (can be specified multiple times). -p, --password password - Password-protected connection. -e, --encrypt [encrypt], -E, --no-encrypt - Set data encryption. -R, --reconnect timeout - Timeout to re-establish connection. -d, --ondemand, -D, --no-ondemand - Open a real port (or create a virtual one) only when there are active connections. -n, --nagle - Enable Nagle's algorithm.
Both client and server connections can be established in RAW or TELNET modes. The telnet subcommand is used to:
-e, --enable, --enabled - Enable TELNET mode. -E, --disable, --disabled - Disable TELNET mode.
Also, you may configure the keepalive settings to detect connection breaks:
-e, --enable, --enabled - Enable Keep-Alive probes. -E, --disable, --disabled - Disable Keep-Alive probes. -i, --idle seconds - Idle timeout before sending probes (TCP_KEEPIDLE). -I, --interval seconds - The time interval between probes (TCP_KEEPINTVL). -c, --count number - The number of probes (TCP_KEEPCNT).
set
The set subcommand uses mostly the same options and subcommands as the add subcommand does. However, the set subcommand specifies connection name (serial port name) directly, without the –virtual or –real options (as the port type is already known and cannot be changed).
You need to specify the correct network mode subcommand (UDP, client or server) if you want to change corresponding properties. Some properties cannot be changed after the connection is started.
show [-t]
Query connection properties:
-t, --type - Connection type (UDP, client or server).
You may get serial port parameters by specifying the serial subcommand with the following options:
-b, --baudrate, --baud-rate - Baud rate. -c, --char - The number of data bits in each character: 5..8. -p, --parity - Parity bit: none, even, odd, mark, space. -s, --stop-bits - The number of stop bits: 1, 1.5, 2. -f, --flow-control - Flow control: none, hw, sw. -d, --ondemand, -D, --no-ondemand - Open a real port (or create a virtual one) only when there are active connections. -n, --nagle - Enable Nagle's algorithm.
To request how data is
-p, --pause - Pause between packets. -w, --wait - The time daemon waits before sending data. -b, --block - The size of block to send. -c, --char - Character with specified code.
UDP connection properties:
-i, --incoming - The node that is allowed to send data to this connection (none, first, last, latest, all).
-o, --outgoing - The node that will receive data (none, first, last, latest, all).
-l, --local - The port to receive data.
-r, --remote - The address and port to send data to.
TCP server connection properties:
-i, --incoming p - The node that is allowed to send data to this connection (none, first, last, latest, all). -o, --outgoing - The node that will receive data (none, first, last, latest, all). -l, --local - The port to receive data. -p, --password - Password for connection. -e, --encrypt - Data encryption. -m, --max - The maximum allowed number of connections.
TCP client connection properties :
-i, --incoming - The node that is allowed to send data to this connection (none, first, last, latest, all). -o, --outgoing - The node that will receive the data (none, first, last, latest, all). -r, --remote - The server to connect to (can be specified multiple times). -p, --password - Password for connection. -e, --encrypt - Data encryption. -R, --reconnect - Timeout to re-establish the connection.
You may invoke the telnet subcommand to check whether the TELNET protocol is used:
-e, --enable, --enabled - Check whether TELNET mode is enabled.
Also, you may get keepalive settings:
-e, --enable, --enabled - Check whether Keep-Alive probes are enabled. -i,--idle - Idle timeout before sending probes (TCP_KEEPIDLE). -I,--interval - The time interval between probes (TCP_KEEPINTVL). -c,--count - The number of probes (TCP_KEEPCNT).
delete [-A] <connection>…
Delete connections.
-A, --all - Delete all connections.
start [-A] <connection>…
Start connections.
-A, --all - Start all connections.
stop [-A] <connection>…
Stop connections.
-A, --all - Stop all connections.