Table of contents
Serial Lines for Emulated Systems
All emulated HP3000 and HP9000 models have at least two serial lines (LDev 20 and 21). One of these emulated lines is mapped to the serial console, the other to a second serial port. Some models may have more serial lines. Please refer to Emulated Model Hardware Configuration Details for more information.
Configuration Parameters Overview
Each emulated line has a device path denoting bus and slot information in the emulated system (see configuration file template or chapter Emulated Model Hardware Configuration Details) and a configuration path. The configuration path is used to set up the serial line configuration in the emulator configuration file.
The following table shows the device and configuration paths used for the two serial lines:
Serial line | Configuration path |
---|---|
1 = Console | serial.uart0.device |
2 | serial.uart2.device |
Serial port configuration options are specified using the following syntax:
serial.uartX.device.<option>="<value>" |
A serial port has three configuration options:
Serial port option | Description |
---|---|
type | The serial port type determines the protocol used on the serial port. Possible values are:
|
port | Each port is mapped to a TCP socket on the emulator host or to a physical line. This parameter defines the port number used or the name of the physical device. The port number must be unique among all active port numbers on the host system. A port number is specified as: Default values:
A physical device is specified as " Example:
|
command | This parameter is optional. It can be used to specify a terminal emulation program that is started automatically when the emulated system is started. Charon-HPA provides preconfigured profiles for PuTTY (HPA-Socket HPA-Telnet HPA-Telnet-VT100) that can be used to connect to the emulated system via a serial line. |
The configuration file templates contain the following default configurations:
Line | HP3000 | HP9000 |
---|---|---|
Emulated serial console on port 30000 using the telnet protocol. PuTTY started automatically with preconfigured profile. | ||
1 | serial.uart0.device.type="telnet" serial.uart0.device.port=":30000" serial.uart0.device.command="putty -load HPA-Telnet" |
|
Emulated second serial line in raw mode on port 30002. | ||
2 | serial.uart2.device.type="socket" serial.uart2.device.port=":30002" | serial.uart2.device.type="socket" serial.uart2.device.port=":30002" |
Terminal Emulation Considerations
The emulated serial lines can be accessed via a terminal emulation program running on the emulator host system or on a remote system.
Please note: if the terminal emulation program runs on a remote system, any firewall between the remote system and the emulator host system must permit the configured ports.
Stromasys supplies PuTTY profiles with the Charon-HPA kit. However, customers can select another terminal emulation program better suited to their purposes. This is especially true for emulated HP3000 systems where applications often use block mode terminals. This mode is not supported by PuTTY.
If not done so already during the installation, copy the provided PuTTY profiles to the correct directory on the host system. See Charon-HPA Software Installation.
Accessing Emulated HP3000 Systems via Terminal Emulation
HP3000 guest systems running on Charon-HPA can be accessed directly from the Linux emulator host using either of two freeware terminal emulators listed below, both of which run directly on the Linux host desktop, or by simply using the telnet command. Each has limitations, however. Neither terminal emulator provides a reliable way to paste multiple lines of text into :EDITOR , for example.
Once the HP3000 network is configured, it may be preferable to connect to the virtual HP3000 from a networked PC using any of the robust commercially-available terminal emulators.
Using PuTTY
The PuTTY terminal emulator is the preferred method to use as the HP3000 console. It does not, however, support HP terminal escape sequences, so any inverse or highlighted text codes will be ignored, and block mode applications cannot be run. Using PuTTY in telnet mode (as supplied) allows use of the Break key. PuTTY supports copy and paste. To copy text to the clipboard, just select it with the left mouse button (this automatically copies the selection to the clipboard). To paste the clipboard into a PuTTY window, use Shift-Ins . Unfortunately, PuTTY cannot be used to reliably paste large blocks of text (even with MPE type-ahead enabled), as data overruns can easily occur.
By default, the emulator configuration is set up to start PuTTY on the console port with the command:
serial.uart0.device.command="putty -load HPA-Telnet"
(default port 30000).
To start an terminal emulator manually, perform the following steps:
Step | Command / Action | |
---|---|---|
1 | Make sure the preconfigured PuTTY profiles are in the directory .putty/sessions or .config/putty/sessions in your home directory. | (see Charon-HPA Software Installation) |
2 | Start PuTTY from the command-line. |
|
3 | Should you get an error that a font was not found, change the font. | Start PuTTY from the command-line.
|
4 | To connect from a remote host, change localhost in the template to the correct hostname or IP address. | Start PuTTY from the command-line.
|
The image below shows a PuTTY terminal window connected to the emulated HP3000 system console:
Using xhpterm
The xhpterm terminal emulation (an X Windows version of freevt3k ) does not support many HP terminal escape sequences, but it can be used to run block-mode applications. It must be used on a serial line set up for raw mode.
The following image shows an xhpterm window connected to the second serial line of an emulated HP3000 system (running NMMGR):
Mapping the Block-Mode Enter key
The primary purpose for including this terminal emulator is to allow block-mode applications (like NMMGR ) to be run from the Linux desktop. xhpterm uses the numeric keypad Enter key to simulate block-mode Enter. If your keyboard does not have a numeric key pad, the Enter key can be mapped to another key or key combination using xmodmap on Linux.
Example mapping the numeric key pad Enter key to Right-Ctrl:
Step | Command | |
---|---|---|
1 | Determine the key code of the Right-Ctrl key. |
You will receive an output similar to:
|
2 | Redefine the key code to the numeric keypad Enter key. | $ xmodmap -e "keycode 105 = KP_Enter" |
3 | If original key mapping is required, reverse step 2. | $ xmodmap -e "keycode 105 = Control_R" |
Using Different Fonts
The default command-line to start xhpterm is: $ xhpterm -port 30000 -clean -font 10x20
If the 10x20 font is not found, you can try -font 6x13
instead.
Additional fonts (e.g. the 9x15 font) can be installed using the command
# yum install xorg-x11-fonts-misc |
When using xhpterm , avoid resizing the window - it can result in input and output fields in block-mode programs being misaligned. Changing the screen font will change the window size automatically, without causing this problem.
Accessing Emulated HP9000 Systems via Terminal Emulation
Stromasys provides preconfigured PuTTY profiles to access the serial console of an HP-UX system running on Charon-HPA. PuTTY does not support all control characters used by HP-UX, but many utilities (e.g., SAM) will work with some restrictions.
By default, the emulator configuration is set up to start PuTTY on the console port with the command: serial.uart0.device.command="putty -load HPA-Telnet-VT100"
.
To start an terminal emulator manually, perform the following steps:
Step | Command / Action | |
---|---|---|
1 | Make sure the preconfigured PuTTY profiles are in the directory .putty/sessions or .config/putty/sessions in your home directory. | (see Charon-HPA Software Installation) |
2 | Start PuTTY from the command-line. | $ putty -load HPA-Telnet-VT100 |
3 | Should you get an error that a font was not found, change the font. | Start PuTTY from the command-line.
|
4 | To connect from a remote host, change localhost in the template to the correct hostname or IP address. | Start PuTTY from the command-line.
|
Instead of PuTTY, you can also use the standard telnet command on your remote Linux system (telnet <charon-hpa-host> <port>
). However, Stromasys does not provide profiles for this.
Additional configuration steps to improve the behavior of the terminal emulation:
Step | Command |
---|---|
On Charon-HPA host system or remote Linux system | |
Temporary set locale to C before starting PuTTY if you use a different locale. |
Then start PuTTY. This setting will enable better line-drawing. |
On the HP-UX guest system | |
Set the terminal type to vt100 after logging in to the system (this can be added to the login profile, if required). |
This will configure a terminal type known to HP-UX. Without a known terminal type many screen-based applications (e.g., editor, SAM) will not work. |
The following image shows a PuTTY window running SAM after the settings above were configured:
The following image shows a PuTTY window where the locale on the system running PuTTY is something different from C:
Other Terminal Emulation Considerations
Accessing the Emulated System Console from a Remote System
Please note: intermediate firewalls must allow the ports used.
There can be only one connection to an emulated serial line at one time.
The following two options provide two examples of how to connect to the console of an emulated system from a remote system.
Option 1: using PuTTY installed on the remote system
If PuTTY is installed on the remote system, you can use the session profiles provided by Charon-HPA (copy them from the emulator host) to connect to the emulated system:
- Start PuTTY.
- Load the correct session profile (see sections above).
- Change
localhost
to the name or IP-address of the emulator host. - Start the session.
Option 2: use the telnet program on the remote system
Run the following program from the command-line:
$ telnet <emulator-host> <serial-line-port>
emulator-host
is the name or IP-address of the Linux emulator host.
serial-line-port
is the port of the emulated serial line using the telnet protocol (default 30000).
To exit the session, use the telnet escape key sequence CTRL+}
and type quit
.
Tunneling a Terminal Emulation through an SSH Tunnel
Even though a plain telnet connection can be used to connect to the emulated system's console, this plaintext connection may create security problems. As an alternative, you can tunnel a terminal emulation through an SSH tunnel provided X11 is active on the emulator host and the remote system.
Any intermediate firewall must permit the port used for SSH (default 22).
Use the following steps to start a PuTTY session across an SSH tunnel:
Step | Command | |
---|---|---|
1 | Connect to the emulator host via SSH specifying that X11 should be tunneled. | $ ssh -X <user>@<emulator-host> |
2 | Enter the password of user to log into the emulator host system. | |
3 | Start the terminal emulation program (e.g., PuTTY, assuming the Charon-HPA session configurations have been installed for the user). | $ putty -load HPA-Telnet-VT100 |