Versions Compared

Key

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

Anchor
TOC
TOC
Include Page
KBCOMMON:KB-CSSstyle
KBCOMMON:KB-CSSstyle

Table of Contents

Table of Contents
excludeTable of Contents

General Description

CHARON-AXP offers two-port serial console on all supported AXP models.

Example for OPA0 console ("COM1" port):

set COM1 alias=OPA0

When (info) Starting with Charon-AXP V4.11 build 204-13, the line above is optional. OPA0 is mapped by default to COM1.

Example when using the TTA0 console ("COM2" port):

set COM2 alias=TTA0

Refer to to Mapping Serial line controllers to system resources for details of mapping.

Include Page
KBCOMMON:DOC-GoToToc
KBCOMMON:DOC-GoToToc

Div
classpagebreak


General parameters

CHARON-AXP console lines COM1 and COM2 have the following parameters:

(info) All the values in the following tables are case insensitive.

alias

Parameteralias
TypeIdentifier
Value

This parameter is used to set an useful name for COM1 or COM2 ports.

Usually

  It can be any name, for example "Console1", but usually it is "OPA0" for COM1 and "TTA0" for COM2.

This name is logged in CHARON log file, it can also be used for parametrization in CHARON configuration file along with "COM1" and "COM2" identifiers.

The main purpose of this parameter is migration from old CHARON systems (which do not have the described implementation of consoles) to the current design, since it allows retaining the original name used for parametrization, since the rest of the parameters stay the same in both implementations.

Note
titleThis note applies to builds before 204-13

If the "alias" parameter is not specified CHARON log file will miss the name for the given console, for example " : Connected. Remote 127.0.0.1:63516" will be displayed instead of "OPA0 : Connected. Remote 127.0.0.1:63516". So it is always recommended to specify the "alias" parameter.

Example:

set COM2 alias=TTA0


Div
classpagebreak



communication


Parametercommunication
Type

Text string

Value
  • "ascii" - for connection to terminals  (default)

  • "binary" - for binary (packet) protocols, which are used mainly for communicating with PLCs

baud

Parameterbaud
TypeNumeric
Value

Forces the baud rate of the corresponding TTY port to a specified value.The variety of supported values depends on the underlying physical communication resource (TTY port). The most widely used values are: 300, 1200, 9600, 19200, 38400.

Example:

set OPA0 baud=38400

break_on

Parameterbreak_on
TypeText string
Value

Specifies what byte sequences received over the physical serial line will trigger a HALT command.

This parameter works only for the console line.

Specify the following values: "Ctrl-P" , "Break" or "none" ("none" disables triggering a HALT condition).

Note

If your guest operating system is OpenVMS in addition to "none" setting you have to set a specific console parameter "controlp" to "off" in the following way:

>>> set controlp off
>>> power off

 

The second line is to preserve the ROM settings.

Example:

set OPA0 break_on="Ctrl-P"

The default value is "Break".

(warning) This parameter can be specified only for COM1 (OPA0) console


Div
classpagebreak


stop_on

Parameterstop_on
TypeText string
Value

Specifies what byte sequences received over the physical serial line will trigger a STOP condition. The STOP condition causes CHARON-AXP to exit.

Specify either “F6” or “none” ("none" disables triggering a STOP condition).

Example:

set OPA0 stop_on="F6"

The default value is "none".

Setting "F6" triggers the STOP condition upon receipt of the "<ESC>[17~" sequence. Terminals usually send these sequences by pressing the F6 button

(warning) This parameter can be specified only for COM1 (OPA0) console

log

Parameterlog
TypeText string
Value

A string specifying a file name to store the content of the console sessions or a directory where the log files for each individual session will be stored.

If an existing directory is specified, CHARON-AXP automatically enables creation of individual log files, one for each session using the same scheme as used for the generation of the rotating log files. If the "log" parameter is omitted, CHARON-AXP does not create a console log.

ExamplesExample 1:

set OPA0 log="log.txt"

Example 2:

set OPA0 log="/Charon/Logs"


Note

Only existing directory can be used as a value of the "log" parameter.



Div
classpagebreak


log_file_size

Parameterlog_file_size
TypeText string
Value

If log rotation is enabled, the log_file_size parameter determines the log file size threshold at which the log is automatically rotated.

  • "unlimited" or "0" (default) - the feature is disabled
  • "default" - default size is used (4Mb)
  • <size>[KMG] - size of the current log file in bytes with additional multipliers:
    • K - Kilobyte - multiply by 1024

    • M - Megabyte - multiply by 1024*1024

    • G - Gigabyte - multiply by 1024*1024*1024

ExamplesExample 1:

set OPA0 log_file_size="default"

Example 2:

set OPA0 log_file_size=10M

(warning) Minimum log file size is 64K, maximum is 1G. Setting size less then 64K effectively makes the log file unlimited.

...

log_flush_period


Parameter
host
log_flush_period
Type
Text string
Numeric
Value

A remote host’s IP address or hostname (and optionally a remote TCP/IP port number) for the virtual serial line connection. If omitted, the virtual serial line does not initiate a connection to the remote host and will listen for incoming connection requests.

Specify the value in the following form:

set OPA0 host="<host-name>[:<port-no>]"
If the "<port-no>" is not specified, the virtual serial line uses the TCP/IP port number specified by the "port" parameter (see below).
  • <period-in-seconds>

Defines a period of flushing log to disk.

Default period is 60 seconds (it means that every minute log file is flushed to disk)

Example:

set OPA0 log_flush_period=30

port

Parameterport
TypeNumeric
Value

The TCP/IP port number for the virtual serial line. A virtual serial line always listens on this port for incoming connection requests.

If multiple virtualized machines are running on a server, ensure the port number is unique across the platform.


Div
classpagebreak


application

Parameterapplication
TypeText string
Value

A command line for calling some host application for communication to CHAARON Charon on a given COM line.

Typically this parameter is used for mapping COM1 or COM2 ro or some "xterm" terminal emulator

Example:

set OPA0 application = "xterm -title OPA0 -e telnet 127.0.0.1 10003"

...

If "putty" terrminl emulator is going to be used as an option copy the following file to your home directory:

# mkdir -p $HOME/.config/putty/sessions (if it does not already exist)
cp /opt/charon/putty/sessions/CHTERM-VT100 $HOME/.config/putty/sessions

Example:

set OPA0 application = "putty -load CHTERM-VT100 -title OPA0@XYZ -P 10003"

connection_override

Parameter

connection_override

Typetext string
Value
"enable"
Allows new connection to override existing connection, if any. Enabled connection override on OPA0 allows to intercept virtual serial console.
When emulator detects new connection request on the port (10003 for the below example), it closes old connection, if any, and switches to the new one.
Example:
set COM1 alias = OPA0
set OPA0 port = 10003 connection_override = enable
(warning) This is implemented only for serial lines using the new syntax, not for lines using the legacy syntax (load virtual_serial_line ...).

access_control

(info) Available only since build 204-13

Parameteraccess_control
Typetext string
Value

"disable"

Since build 204-13, Incoming connection requests are by default filtered for virtual serial lines and then allowed only for the localhost. This is to avoid security scanners that can block the port.

Example:

set OPA0 access_control = disable

(warning) This is implemented only for serial lines using the new syntax, not for lines using the legacy syntax (load virtual_serial_line ...).


Div
classpagebreak


Notes on "port" and "application" parameters

...

Use the combination of "port

...

"

...

and "application" parameters as follows to connect a 3rd party terminal emulator or similar program.


set COM1 alias=OPA0 port=10003 application="xterm -title OPA0 -e chterm -h 127.0.0.1:10003"


In this example CHARON-AXP OPA0 console connects to port 10003 of localhost ("127.0.0.1") and at the same time it starts "xterm" with parameters "-title OPA0 -e chterm -h 127.0.0.1:10003", instructs it to connect to the port 10003 of the host with TCP/IP address "127.0.0.1" (localhost)

     

It is possible to specify a port on a remote host (note that CHARON always acts as a server). The syntax is:

set COM2 alias=TTA0 host="192.168.1.1:20000" port=10000

In this example CHARON-AXP accepts connection on local port 10000 and connects to remote port 20000 of a host with TCP/IP address "192.168.1.1"

Note: the examples above are mainly used for inter-CHARON communications. They are used to connect CHARON-AXP to an application that communicates to CHARON-AXP as described below.

Example of two CHARON systems connected to each other:

On host "A":

...

On host "B":

...

On these two hosts, executing CHARON-AXP, the two TTA0 lines connect to each other, thus creating a "serial" cable between the two emulated Alphas. The sequential order in which the instances of CHARON-AXP are started makes no difference.

Include Page
KBCOMMON:DOC-GoToToc
KBCOMMON:DOC-GoToToc

Mapping Serial line controllers to system resources

line

(or "(console)" value):

  • (console) for CHARON console (the console from which it starts). It is the default setting for COM1 ("OPA0")
  • "/dev/
tty<N>"Virtual serial lines
  • tty<N>" for virtual console
  • "/dev/
ttyS<N>"Onboard
  • ttyS<N>" for onboard serial lines
  • "/dev/
ttyUSB<N>"Modem
  • ttyUSB<N>" for modem or USB serial lines adapters
  • "/dev/
tty<XXX>"Proprietary
  • tty<XXX>" for proprietary (depending on a driver) devices such as DIGI or MOXA cards


Parameterline
TypeText string
Value

A defined TTY port on host system :

SyntaxDescription
Note

If a virtual console "/dev/tty<N>" is going to be used, it must be freed from all the processes running on it at first. Refer to your OS documentation for details, also some description on how to do it is available here.


Note

A specific account for running CHARON ("charon") does not allow usage of physical consoles "/dev/tty<N>" as CHARON consoles. If you plan to map CHARON console to "/dev/tty<N>" use only "root" account for CHARON running.

...



...

Div
classpagebreak


"ttyY" notation specifics

Note that the "ttyY" notation can have different forms depending on the nature of the device used:

MappingTypeCommentary

"/dev/tty<N>"

where N is from 0 to 11

Linux virtual tty

Those tty devices must be free from the Linux "getty/mgetty" and similar programs (specified in "/etc/inittab")

Example:

"/dev/tty1"

"/dev/ttyS<N>"

where N is a number

Onboard serial lines

Example:

"/dev/ttyS1"

"/dev/tty<XXX>"

where XXX is a complex letter/number notation

Proprietary (depending on a driver) devices 

Example for a first port of a MOXA card:

"/dev/ttyR01"

Example for a first port of a DIGI card:

"/dev/ttyaa"

"/dev/ttyUSB<N>"

where N is a number

Modem or USB serial lines adapters

Example:

"/dev/ttyUSB1"

OPA0 console configuration examples

Using legacy syntax (not recommended)

This example maps OPA0 to port 10003, enable F6 key (emulator stop) and logs the console input/output to a rotating log file in /charon/myaxp/logs folder:

load virtual_serial_line OPA0

set OPA0 port=10003

set OPA0 stop_on="F6"

set OPA0 log="/charon/myaxp/logs"

Using new syntax (recommended)

This example maps OPA0 to port 10003, enable F6 key (emulator stop), logs the console input/output to a rotating log file in /charon/myaxp/logs folder and enables the connection_override feature:

set COM1 alias=OPA0 (optional starting with build 204-13)

set OPA0 port=10003

set OPA0 stop_on="F6"

set OPA0 log="/charon/myaxp/logs"

set OPA0 connection_override=enable

Include Page
KBCOMMON:DOC-GoToToc
KBCOMMON:DOC-GoToToc