Chinaunix首页 | 论坛 | 博客
  • 博客访问: 489504
  • 博文数量: 153
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 1724
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-08 11:55
文章分类

全部博文(153)

文章存档

2011年(1)

2010年(55)

2009年(88)

2008年(9)

我的朋友

分类: LINUX

2009-01-14 17:57:17


Contents:
1. Linux console Howto
2. Setup a linux serial console
3. Kermit 95 Terminal Types

In addition, there are also some useful information for reference:
   a site, with a reference for folks who build their own cables, or just need a little help troubleshooting.  We don't sell cables, but can refer you to some folks who do. 

  video display terminal


Linux Serial Console HOWTO

by Van Emery



RS-232C Connectors

Introduction

Have you ever needed to connect a dumb terminal (like a Wyse 50) to a Linux host? Do you need to login to a Linux server from a laptop to perform administrative functions, because there is no monitor or keyboard attached to the server? If you are accustomed to administering routers, switches, or firewalls in this manner, then you may be interested in doing the same with some of your GNU/Linux hosts. This HOWTO will explain, step-by-step, how to setup a serial console for Red Hat 9, although most of it should apply to other distributions as well.

Why did I write this document? Although there are lots of documents available on the Internet dealing with Linux serial ports, most of them seemed to be either out of date, or focused on modem dial-in/dial-out. I wanted consise documentation on how to setup simple terminal access via RS-232-C serial ports for Red Hat 9.

Assumptions/Setup

I was using Red Hat 9 for this test. My test machine consisted of:

  • Motherboard: Gigabyte Technology GA-7VA motherboard (Rev. 2.0)
  • Chipset: VIA KT400A
  • CPU: AMD-K7 (Duron 1400)
  • RAM: 256MB DDR333
  • Serial Ports: 2 built-in ports with 16550A UARTs, DB-9 male
  • Linux kernel: 2.4.20-24.9

Step 1: Check your system's serial support

First, let's make sure that your operating system recognizes serial ports in your hardware. You should make a visual inspection and make sure that you have one or more serial ports on your motherboard or add-in PCI card. Most motherboards have two built-in ports, which are called COM1: and COM2: in the DOS/Windows world. You may need to enable them in BIOS before the OS can recognize them. After your system boots, you can check for serial ports with the following commands:

[root@oscar root]# dmesg | grep tty
ttyS0 at 0x03f8 (irq = 4) is a 16550A
ttyS1 at 0x02f8 (irq = 3) is a 16550A

[root@oscar root]# setserial -g /dev/ttyS[01]
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4

/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3

As you can see, the two built-in serial ports are /dev/ttyS0 and /dev/ttyS1.


Step 2: Configure your inittab to support serial console logins

The /etc/inittab file must be reconfigured to allow serial console logins. You will note that the mingetty daemon is used to listen for virtual consoles (like the 6 that run by default with your keyboard and monitor). You will need to configure agetty or mgetty to listen on the serial ports, because they are capable of responding to input on physical serial ports. In the past, I have used both full-featured gettys. In this document, I will only discuss agetty, since it is already included in the default Red Hat 9 installation. It handles console/dumb terminal connections as well as dial-in modem connections.

What is a getty?

A getty is is a program that opens a tty port, prompts for a login name, and runs the /bin/login command. It is normally invoked by init.

Before you edit /etc/inittab, which is a very important config file, you should make a backup copy:

[root@oscar etc]# cp /etc/inittab /etc/

The required /etc/inittab additions are highlighted in red:

id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4

l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"


# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1

2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run agetty on COM1/ttyS0 and COM2/ttyS1

s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
s1:2345:respawn:/sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100
#s1:2345:respawn:/sbin/agetty -L -i 38400 ttyS1 vt100


# Run xdm in runlevel 5

x:5:respawn:/etc/X11/prefdm -nodaemon


agetty options explained:

  • -L    force line to be local line with no need for carrier detect (when you have no modem).
  • -f    alternative /etc/issue file. This is what a user sees at the login prompt.
  • -i    do not display any messages at the login prompt.
  • 9600    serial line rate in bps. Set this to your dumb terminal or terminal emulator line rate.
  • ttyS0    this is the serial port identifier.
  • vt100    is the terminal emulation. You can use others, but is the most common or "standard". Another widely used termial type is VT102.

Possible serial line rates (sometimes called baud rates) for the 16550A UART:

  • 110 bps
  • 300 bps
  • 1200 bps
  • 2400 bps
  • 4800 bps
  • 9600 bps
  • 19,200 bps
  • 38,400 bps
  • 57,600 bps
  • 115,200 bps

I have tried all of these line rates. 9600 bps is generally O.K., and is a very common setting for networking hardware. 38,400 bps is the speed of the standard Linux console, so it is my second choice. If your dumb terminal or terminal emulator cannot handle 38,400 bps, then try 19,200 bps: it is reasonably speedy and you will not be annoyed.

Here was my custom issue file, /etc/issueserial. It uses escape sequences defined in the agetty manpage to add some useful information, such as the serial port number, line speed, and how many users are currently logged on:

 
Oscar
Connected on \l at \b bps
\U

Now, you must activate the changes that you made in /etc/inittab. This is done with the following command, which forces the init process to re-read the configuration file:

[root@oscar root]# init q

Now, let's make sure that the agetty process is listening on the serial ports:

[root@oscar root]$ ps -ef | grep agetty
root 958 1 0 Dec13 ttyS0 00:00:00 /sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
root 1427 1 0 Dec13 ttyS1 00:00:00 /sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100


Step 3: Test serial port login with an external dumb terminal or terminal emulator


Wyse 50b

I have tested this setup with a WYSE dumb terminal, a Linux laptop running Minicom, and Windows 2000/XP laptops running HyperTerminal. They all worked just fine.

Terminal settings:  should be 9600, N, 8, 1. Terminal emulation should be set to VT100 or VT102. Turn flow control off. If you want to use the 38,400 bps serial port on ttyS1, then your settings should be adjusted to 38400, N, 8, 1.

Cable:  To connect a laptop to the serial port on the Linux host, you need to have a null-modem cable. The purpose of a null-modem cable is to permit two RS-232 DTE devices to communicate with each other without modems between them. While you can construct this yourself, a good, sturdy manufactured null-modem cable is inexpensive and will last longer.

If you insist on making the cable yourself, then check out for the wiring and pinout diagram.

Connectors:  Motherboard serial ports are typically male DB-9 connectors, but some serial ports use DB-25 connectors. You may need some DB-9 to DB-25 converters or gender-changers in order to connect to your terminal. For a typical laptop to server connection, a DB-9 null-modem cable should be sufficient.

Here is what you should see on the dumb terminal or terminal emulator:

Oscar
Connected on ttyS1 at 38400 bps
3 users

login:

Note:  If you want to be able to login via serial console as the root user, you will need to edit the /etc/securetty config file. The entries to add are highlighted in red:

console
ttyS0
ttyS1

vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10

tty11


Step 4: Modifying the agetty settings

If you want to change the baud rate or some other agetty setting, you will need to perform these 3 steps:

  1. Modify the /etc/inittab configuration file
  2. Activate the config change by forcing init to re-read the config file
  3. Restart the agetty daemons

Here is an example of steps 2 and 3:

[root@oscar root]# init q
[root@oscar root]# pkill agetty


Optional:  Configure serial port as THE system console

You can use options in /etc/grub.conf to redirect console output to one of your serial ports. This can be handy if you do not have a keyboard or monitor available for the Linux host in question. You can also see all of the bootup and shutdown messages from your terminal. In this example, we will make the /dev/ttyS1 port be the console. The text to add to the config file is highlighted in red:

# grub.conf generated by anaconda
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-24.9)
root (hd0,0)
kernel /vmlinuz-2.4.20-24.9 ro root=LABEL=/ console=ttyS1,38400

initrd /initrd-2.4.20-24.9.img

Now, if you drop your system into single user mode with the "init 1" command, you will still be able to administer the system from your serial-connected terminal. No monitor or keyboard is required!

Warning!:   The kudzu hardware detection program may "choke" on boot when the serial port becomes the console, instead of the video adapter. To remedy this situation, you should disable kudzu (assuming that your hardware is configured properly and won't be changing). This is how you would do that:

[root@oscar root]# chkconfig kudzu off
[root@oscar root]# chkconfig --list kudzu
kudzu 0:off 1:off 2:off 3:off 4:off 5:off 6:off

You should also know how to break into the Grub bootloader during system startup and edit the kernel line. By deleting the console argument from the kernel line, you can boot the system with the standard console, which uses the video card and attached keyboard. You have been warned!


Conclusion

Now, you should be able to login from the serial ports on your GNU/Linux host. This could be useful for maintenance or for serving a whole room full of dumb terminals. In the future, I will investigate a PCI multiport serial card in the latter role.

Have fun!



Resources


=============Setup a linux serial console ---------------------


Setting up a serial console 

This tutorial will show you how to set up a serial console on a Linux system, and connect to it via a null modem cable. This is quite useful if your Linux server is in a headless configuration (no keyboard or monitor), as it allows you to easily get a console on the system if there are any problems with it (especially network problems, when SSH is not available). In the end, the GRUB menu will appear over the serial link, as will the bootup messages (output when booting the system). I'm using Debian Etch on the server and Ubuntu Edgy on my client, although this should work on any Linux distribution.

 

First steps

One of the most important things we need to check that you do actually have a serial port on the server :). Take a look at the back of your server, and see if it has a 9-pin serial port. Most motherboards have either one or two serial ports. On the system, check to see that Linux is recognising the serial ports:

root@server:~# dmesg | grep tty
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

This shows that my system has one serial port, ttyS0 (remember this for later).

 

GRUB configuration

The next step is to edit the GRUB configuration, so it sends its messages to the serial console. One of the most important things is to set a password, otherwise anyone can connect a serial cable, edit the GRUB configuration line while the system is booting (via the "e" key), and get root access. When a password is set, interactive menu editing will be disabled, unless the correct password is entered. To set the password, we first need to get the encrypted version of it.

Run grub, and use the "md5crypt" command to encrypt the password:

grub> md5crypt

Password: ********
Encrypted: $1$AlfMq1$FxRolxW5XvSLAOksiC7MD1

Copy the encrypted version of the password (we need it for the next step), and then type quit to exit.

Now, we need to edit the GRUB configuration. Edit the /boot/grub/menu.lst file (by typing nano /boot/grub/menu.lst), and find this section:

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'

# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

Below that, add:

password --md5 $1$AlfMq1$FxRolxW5XvSLAOksiC7MD1
serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1
terminal --timeout=10 serial console

Replace $1$AlfMq1$FxRolxW5XvSLAOksiC7MD1 with the encrypted form of your password. The second line tells GRUB to initialise the serial port at 38,400 bps (same speed as the standard console), 8 data bits, no parity, and 1 stop bit (basically, the standard settings). Note that the --unit=0 means that it will use the first serial port (ttyS0). If you're using the second serial port (ttyS1), change it to --unit=1. The last line tells GRUB to show its menu on both the serial line and the console (monitor).

Now, we also need to edit the kernel sections, so that they output messages to the serial console. At the end of every kernel line, add console=tty0 console=ttyS0,38400n8 (replace ttyS0 with the correct serial port). In my case, it ended up looking like:

title           Debian GNU/Linux, kernel 2.6.18-4-vserver-686
root (hd0,1)
kernel /vmlinuz-2.6.18-4-vserver-686 root=/dev/hda3 ro console=tty0 console=ttyS0,38400n8
initrd /initrd.img-2.6.18-4-vserver-686

savedefault
title Debian GNU/Linux, kernel 2.6.18-4-vserver-686 (single-user mode)
root (hd0,1)
kernel /vmlinuz-2.6.18-4-vserver-686 root=/dev/hda3 ro single console=tty0 console=ttyS0,38400n8

initrd /initrd.img-2.6.18-4-vserver-686
savedefault
title Debian GNU/Linux, kernel 2.6.18-3-686
root (hd0,1)
kernel /vmlinuz-2.6.18-3-686 root=/dev/hda3 ro console=tty0 console=ttyS0,38400n8

initrd /initrd.img-2.6.18-3-686
savedefault
title Debian GNU/Linux, kernel 2.6.18-3-686 (single-user mode)
root (hd0,1)
kernel /vmlinuz-2.6.18-3-686 root=/dev/hda3 ro single console=tty0 console=ttyS0,38400n8

initrd /initrd.img-2.6.18-3-686
savedefault
 

Save and exit, by pressing CTRL+O (to "output", or save the file), Enter (to accept the file name) and CTRL+X (to actually exit).

 

Allow logins over Serial Console

Now, the GRUB menu will appear over the serial connection, but we still aren't listening for logins over it (there's no "getty" running on it yet). Edit the /etc/inittab file, and find this section:

# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

Below that (I don't like editing the default lines :P), add:

T0:2345:respawn:/sbin/getty -L ttyS0 38400 vt100

And that's all there is to it. Your server will now show the GRUB menu over the serial console, and also allow logons (once it has finished booting).

 

Let's test it!

Now that that's all done, we need to configure our client. I'm using GtkTerm on my laptop, although any terminal program should work (as long as it can use a serial port. On Windows, HyperTerminal should work). My laptop doesn't have a serial port, so I'm using a USB to Serial adapter I bought off eBay (it creates a ttyUSB0 device). Set your terminal program to these settings:

  • Port (Linux): ttyS0 or ttyS1 (if your system has a serial port), or ttyUSB0 (if you're using a USB to Serial converter).
  • Port (Windows): COM1 or COM2
  • Bits per second: 38400
  • Data bits: 8
  • Parity: None
  • Stop bits: 1
  • Flow control: None, although hardware (RTS/CTS) should work properly

Restart the server (probably from a SSH connection, or however you edited the GRUB config above), and then connect the null modem cable as it's starting (ie. at the BIOS screen). Press any key when prompted, and you'll get something like:..............


Additional info and Difference on Ubuntu:

1.  You can easily use faster baud rates like 57600.

2.  vt102 is the best terminal emulation offered by the kernel.  For more information - "man console_codes".  For a comparison of various terminals see the list.

3.  On Ubuntu Edgy Eft (6.10) or later, is used instead of init.  To configure ttyS0, create a new entry in /etc/event.d by copying one of the existing tty# entries and modifying it.  Example ttyS0:

------------------------------------------------------
# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started

start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5

stop on shutdown

respawn /sbin/getty -L 38400 ttyS0 vt102
------------------------------------------------------

4.  On Ubuntu, for a non-root user to access ttyS0 they must be a member of the dialout group.

5.  Some versions of Grub (0.95, 0.97) on Edgy Eft have broken serial support.  See .  This appears to be fixed in Feisty Fawn (7.04) Herd 5.

6.  Other options for serial terminals are minicom, cu, and c-kermit:

apt-get install minicom
man minicom
minicom -s # Initial setup.  Set port as required and erase modem init and reset strings.
minicom # Normal startup.  You are connected immediately.  Enter Ctrl-A followed by "Z" for help.

apt-get install cu
man cu
cu -lttyS0
Enter "~.~." to disconnect.

apt-get install ckermit
man kermit
kermit -l /dev/ttyS0 -b 38400 -8
Enter "?" for a list of commands.  Enter "connect" to connect to port.  Enter a Ctrl-\ and then a "C" to return to local.

7.  You can run Midnight Commander through a terminal.  Minicom doesn't support graphic characters well so using cu or kermit is recommended.

apt-get install mc
mc
mc -c # if you want color (overrides MC's default behavior which is based on target system's TERM variable)

One of the limitations of the vt100/vt102 terminals is the lack of support for function keys other than F1-F4 and some navigation keys.  In MC you can use Esc # where # is 1-9,0 representing the F1-F10 menu keys.


Other references:





Also see serial-console.txt in the kernel documentation.


-----------------------------------

As of:
Date: 7 June 2002

Kermit 95 2.0 supports 40 terminal emulations:

ADM3A
The Lear-Siegler ADM-3A terminal. No F-keys.

AIXTERM
For accessing IBM AIX systems. Compatible with the AIXTERM window on AIX workstations, and the AIXTERM termcap / terminfo entry. Has F1-F12 keys, also Shift-F1-F12.

ANSI-BBS
For accessing most BBSs. 8 bits, color, line- and box-drawing, "ANSI graphics". As defined in the DOS 5.0 manual. Function keys F1-F4 send what VT100 sends, F5-F12 undefined.

AT386
For accessing (SCO) Unixware and (Sunsoft) Interactive UNIX systems. Has 60 Function keys F1-F12 plus various versions with Shift, Ctrl, Ctrl-Shift, etc.

Avatar/0+
For accessing BBSs that support certain advanced features. If a BBS supports Avatar/0+, this is normally negotiated automatically when you log in to it. F1-F4, like ANSI-BBS.

BA80
The Nixdorf BA80 terminal (Germany), used for accessing Nixdorf computers. Has PA (function) keys 1-12.

BETERM
BeBox console, the preferred terminal type for accessing the BeBox and BeOS.

DG200
Data General DASHER 200, for accessing AOS/VS, DG/UX, and other Data General platforms. Has function keys F1-F12, which can be modified by Shift, Ctrl, or Ctrl-Shift, plus some others (e.g. Alt-F1-F5, Alt-Shift-F1-F5, Ctrl-Alt-F1-F5).

DG210
Data General DASHER 210, for accessing AOS/VS, DG/UX, and other Data General platforms. F-keys as for DG200.

DG217
Data General DASHER 217, for accessing AOS/VS, DG/UX, and other Data General platforms. Includes both DG and UNIX modes, as well as alternate character sets -- Math/Symbol, Line Drawing, Word Processing. F-keys as for DG200.

HEATH19
The Heath-19 or Zenith-19 terminal. Has PF1-4 like VT100.

HFT
IBM's High Function Terminal type, used for accessing AIX and other IBM platforms that support it. Has F1-F12, Shift-F1-F12, Ctrl-F1-F12.

HP2621A
The Hewlett Packard 2621A terminal. Has F1-F16. F9-F16 are entered by Shift-F1-F8.

HPTERM
Hewlett Packard's generic HPTERM specification, used on HP-UX in HPTERM windows, and compatible with various specific HP terminals such as those in the 700 series. F keys as for HP2621A.

HZ1500
The Hazeltine 1500 terminal. Has F1-F12.

IBM3151
The IBM 3151 terminal. This emulation is just enough to support termcap and terminfo driven applications on Unix. A complete keyboard mapping is provided as well as the IBM 3151 graphics character set. None of the special forms modes are (yet) implemented. Has F1-F12, Alt-F1-F12, Shift-Alt-F1-F12.

LINUX
The Linux console. Has 60+ function keys, produced by F-keys (and some others) in various combinations with Shift, Ctrl, and Alt.

QANSI
The QNX ANSI terminal. F1-F10.

QNX
The QNX console. F1-F12, Shift F1-F12.

SCOANSI
The SCO version of ANSI, used by SCO UNIX, ODT, and OpenServer, and Caldera Open UNIX. Has 60 function keys, like AT386. WARNING: The host name is ANSI, but Kermit's name is SCOANSI, to distinguish it from ANSI-BBS, which is different. When making Telnet connections, set Kermit's terminal type to SCOANSI and its Telnet terminal-type to ANSI:

  set terminal type scoansi
set telnet terminal-type ansi

SNI-97801
The Siemens Nixdorf Bildschirmeinheit 97801-5xx (Germany), for use with SINIX. Downloadable character-sets, fonts, and compose tables are not supported. Has tons of function keys produced by various combinations of F-keys with Shift, Ctrl, and Alt.

TTY
Teletypewriter. This is equivalent to no terminal emulation at all.

TVI910+
The Televideo 910+ terminal. F1-F12, Shift-F1-F12, Alt-F1-F6, Alt-Shift-F1-F6.

TVI925
The Televideo 925 terminal. F1-F12, Shift-F1-F12, Alt-F1-F6, Alt-Shift-F1-F6.

TVI950
The Televideo 950 terminal. F1-F12, Shift-F1-F12, Alt-F1-F6, Alt-Shift-F1-F6.

VC404
The Volker Craig 404 terminal. F1-F12.

VIP7809
Partial emulation of the Honeywell VIP-7809 terminal. In fact, this is VT-102 emulation with minor modifications sufficient to allow access to Honeywell DPS-6 systems.

VT52
The Digital Equipment Corporation VT52 terminal. Has PF keys 1-4 on F1-F4 but no F keys.

VT100
The industry-standard 7-bit Digital Equipment Corporation VT100 terminal, with color extensions. Has PF keys 1-4 on F1-F4, but no F keys.

VT102
Like VT100, but with character insertion and deletion capabilities and several other functions added, and with color extensions.

VT220
The industry-standard 8-bit Digital Equipment Corporation VT220 terminal with color extensions. Has PF keys 1-4 on F1-F4, plus 20 F-keys, 1-20, of which only F5-F20 are usable, on F5-F12 and Shift-F1-F10.

VT220PC
VT220 with a PC keyboard.

VT320
The industry-standard 8-bit Digital Equipment Corporation VT320 terminal with color extensions, plus many features of the VT420, VT520, and DECterm. F-keys as for VT220.

VT320PC
VT320 with a PC keyboard.

VTNT
VTNT is a proprietary Microsoft terminal definition used by the Telnet Server distributed with Windows 2000/XP and NT Services for Unix.

WY30
The Wyse model 30 terminal, plus most of the capaibilities of the Wyse 30+ and 35 models. Multiple Windows, display controls, and certain other features are not currently supported.

WY50
The Wyse model 50 terminal. Multiple Windows, display controls, and certain other features are not currently supported. F1-F12, Shift-F1-F12, Alt-Shift-F1-F6, and others.

WY60
The Wyse model 60 terminal, plus most of the features of the Wyse 120, 160, and 350 models. Multiple Windows, display controls, and certain other features are not currently supported. F keys as for WY50.

WY160
The Wyse model 160 terminal, plus most of the features of the Wyse 120 and 350 models. Multiple Windows, display controls, and certain other features are not currently supported.

WY370
The Wyse model 370 terminal, similar to VT320 but with additional color capabilities. F-keys as for WY60, plus some more.

The names in the list are those used in the Terminal Type box on the Terminal page of the Dialer entry notebook, and by the SET TERMINAL TYPE command. These names are also sent to the host in Telnet terminal type negotiations unless you have specified a TELNET terminal-type name to override it.


terminal type is chosen, the following actions are executed automatically:

  • SET TERMINAL BYTESIZE 8
  • SET PARITY NONE
  • SET TERMINAL CHARACTER-SET CP437
  • SET TERMINAL COLOR TERMINAL LGRAY BLACK
  • Your PC code page (right half) is designated to G1, G2, and G3.

The normal mode of operation for any ANSI terminal type is to converse with a host application that uses a PC code page as its character set, and whose code page is the same as your code page. This is because ANSI terminal emulation is generally used for applications where there is a lot of line and box drawing -- "graphics" simulated by colored character cells.

In some environments, however, the host sends Latin-1 or other codes for accented or special characters. In such cases, you can set your terminal character set to Latin-1 (or other set) AFTER selecting an ANSI terminal type, for example:

  set terminal type scoansi                 ; Sets CP437
set terminal remote character-set latin1 ; Set it to Latin-1

But Latin-1 (and Latin-2, Cyrillic, Hebrew, etc) do not include the many box-drawing characters needed for ANSI emulation, and the simple form of the SET TERMINAL CHARACTER-SET command shown above assigns Latin-1 to all of G1, G2, and G3. Thus you must also ensure that your PC code page remains available as an alternate character set by using the more specific form of the command, which is:

  SET TERMINAL REMOTE-CHARACTER-SET name [ Gn ]

This lets you change your remote character set without having to respecify (or even know) your local PC character set (or code page). The optional Gn field designates the named set to the specified terminal graphics table, G0, G1, G2, or G3 (you can specify more than one) according to ISO 4873 and 2022 rules.





for all of the SNI-97801 keys although most are not assigned to the PC keyboard due to lack of space.

Kermit 95 does support all of the 7-bit and 8-bit CH.CODE modes which are controlled by the following commands:

  • SET TERMINAL SNI-CH.CODE {ON, OFF} or the \Ksni_ch_code keyboard verb
  • SET TERMINAL BYTESIZE { 7, 8 }

The CH.CODE mode determines whether the terminal communicates using International character sets such U.S. ASCII and ISO Latin 1; or whether it uses a National character set such as German. The SET TERMINAL LANGUAGE command is used to specify the default language.

The Firmware Versions numbers can be customized using the SET TERMINAL SNI-FIRWARE-VERSIONS command. The default keyboard version number is 920031 and the default terminal version number is 830851.



Many terminals including the Wyse and Televideo terminals support a SEND DATA feature which allows the host application to query the terminal and request that a copy of all of the data on the screen be sent to the host. This feature is very useful with applications that process a complete form of data at a time; or that allow a single terminal to be used with multiple sessions. However, this feature is also a security hole which can be exploited to steal data. Therefore, Kermit 95 disables the SEND DATA feature by default. If you need to use SEND DATA with your application, you must add a SET TERMINAL SEND-DATA ON command to your K95CUSTOM.INI file.

===========EOF================

=====



阅读(3601) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~