Subject: Re: DEC vt320 terminal problem
To: Shannon Hendrix <shannon@widomaker.com>
From: Frederick Bruckman <fb@enteract.com>
List: netbsd-users
Date: 06/16/2001 08:05:05
On Sat, 16 Jun 2001, Shannon Hendrix wrote:

> What would cause a DEC vt320 terminal to work fine for application
> programs, but get linefeeds wrong with shells, and the occasional
> garbage character?

You have no handshaking at all! Try turning on "ixon ixany". Also, you
can set the VT (420 -- not sure about the differences) to send an XOFF
for every 64 characters received, every 128, or none at all. In order
for "ixon" to have any effect, you'll need to set "XOFF at {64,128}".

> I can telnet from NetBSD to another machine and the terminal starts
> behaving fine.  telnet again back to NetBSD and it's screwed up again.

> speed 19200 baud; 0 rows; 0 columns;
> lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
>         -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
>         -nokerninfo -extproc
> iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
>         -brkint -inpck -ignpar -parmrk
> oflags: -opost onlcr -ocrnl oxtabs onocr onlret
> cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb -crtscts -mdmbuf
>         -cdtrcts
> discard dsusp   eof     eol     eol2    erase   intr    kill    lnext
> ^O      ^Y      ^D      <undef> <undef> ^?      ^C      ^U      ^V
> min     quit    reprint start   status  stop    susp    time    werase
> 1       ^\      ^R      ^Q      ^T      ^S      ^Z      0       ^W
>
> If anyone else is using their vt320 with NetBSD and everything works,
> I'd appreciate seeing your settings.

That doesn't look right. You should have "rows" and "columns" set, at
least. Here's what I get with my vt420, termcap entry "vt420", with a
custom gettyab entry (further below), VT set to XOFF at 128, 8 bits no
parity, vt100 mode. (I also have terminal ID set to send "VT102".)

speed 19200 baud; 24 rows; 80 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
	-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
	-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
	brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl oxtabs onocr onlret
cflags: cread cs8 -parenb -parodd -hupcl clocal -cstopb -crtscts -mdmbuf
	-cdtrcts
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
	eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
	min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
	stop = ^S; susp = ^Z; time = 0; werase = ^W;


# Real DEC VT420, software handshaking
#
# The port speed in conjunction with the VT's XOFF setting can be tailored
# for a particular use. The vt.19200 entry, XOFF at 128, is suitable for a
# serial console, to run ddb, or to start a getty and login. The slowest
# speed, XOFF at 64, may produce less garbage with programs such as "vi".
# The vt.38400 entry, no XOFF, is only suitable for applications that redraw
# the screen continuously.
#
vt.9600|vt420-9600:\
	:sp#9600:i0#2f02:i1#2f02:
vt.19200|vt420-19200:\
	:sp#19200:i0#2f02:i1#2f02:
vt.38400|vt420-38400:\
	:sp#38400:i0#2f02:i1#2f02:


Frederick