Serial Line Terminals

Serial Line Terminals

Post by Malcolm Cow » Wed, 29 Apr 1998 04:00:00



I've been spending some time recently connecting various dumb terminals
to the serial lines on some linux boxen in my office. To all intents and
purposes these terminals appear to be working correctly. However, the
character map translations are causing some frustration, and I was
hoping for some help in this regard: specifically, the "special" keys
(such as cursors, Page Up, Page Down, etc.) on the keyboard are not
behaving as they ought. We are using pre*ly Wyse terminals and
have set up getty to treat them as such, and the termcap contains the
correct information with regard to these terminals, but instead of
having e.g. cursor down moving the cursor down, I get a line-feed. For
various reasons, all of them _legacy_ (I don't wanna talk about it since
it makes me want to cry), it is not practical to change the terminal
emulation to VT100.

So the question is: is it possible to run these terminals in wyse-50
mode, and get the use of the cursor keys in bash, emacs, pine, etc. or
am I stuck with ^P, ^N, ^B, ^F or whatever else I would be reduced to?

Malcolm.

 
 
 

Serial Line Terminals

Post by stan ba » Wed, 29 Apr 1998 04:00:00



> So the question is: is it possible to run these terminals in wyse-50
> mode, and get the use of the cursor keys in bash, emacs, pine, etc. or
> am I stuck with ^P, ^N, ^B, ^F or whatever else I would be reduced to?

> Malcolm.

I'm not on my Linux machine at the moment so I can't check but I'm
pretty sure wyse-50 terminals are supported - look at /etc/termcap
and see if its there.

Hope this helps...

--
Stan Barr                                  
I wish I could think of something clever to say here.......

 
 
 

Serial Line Terminals

Post by Ben McKeeg » Thu, 30 Apr 1998 04:00:00




Quote:> I've been spending some time recently connecting various dumb terminals
> to the serial lines on some linux boxen in my office. To all intents and
> purposes these terminals appear to be working correctly. However, the
> character map translations are causing some frustration, and I was
> hoping for some help in this regard: specifically, the "special" keys
> (such as cursors, Page Up, Page Down, etc.) on the keyboard are not
> behaving as they ought. We are using pre*ly Wyse terminals and
> have set up getty to treat them as such, and the termcap contains the
> correct information with regard to these terminals, but instead of
> having e.g. cursor down moving the cursor down, I get a line-feed. For
> various reasons, all of them _legacy_ (I don't wanna talk about it since
> it makes me want to cry), it is not practical to change the terminal
> emulation to VT100.

> So the question is: is it possible to run these terminals in wyse-50
> mode, and get the use of the cursor keys in bash, emacs, pine, etc. or
> am I stuck with ^P, ^N, ^B, ^F or whatever else I would be reduced to?

This is the norm - by default left generates a backspace and down a
linefeed. If you don't like this 'helpfull' feature, you can
reprogram the cursor keys to produce something else, for example VT100
style codes, provided you define yourself a new termcap or terminfo entry
with the appropriate changes made.

We have a number of old Link 125 terminals here that emulate wyse-50s.
Here's my notes on how I set them up for our terminfo based system, I'll
leave it for you to figure out how to do this with termcap.

=============================================================
Configuring a Link 125 terminal for Linux
=========================================

We have a number of Visa Link 125 terminals (some have been re-badged
'Crystal'), which I have found make excellant Linux terminals.

These terminals are used in WYSE 50 emulation mode. By default
this has silly codes for the cursor keys (left=backspace and down=newline),
but it is possible to reprogram them to produce more sensible (but non
standard) codes.

The following may or may not be applicable to other terminals that have
WYSE 50 emulation.

1 Host configuration :

  The line of inittab that runs getty on the line should specify a term
  type of wy50ak. This is a non-standard type we will define. It's
  basically a standard wyse50 type with VT100 style cursor key codes
  and auto margin capability removed. You also need to give getty the
  '-h' option to turn on hardware handshaking (linux alternative getty).

==== file wyse50ak.src =============
wy50ak|wyse50ak|Wyse 50ak,
        bw, hs, mc5i, mir, msgr, xon,
        cols#80, lh#1, lines#24, lw#8, ma#1, nlab#8, wsl#45,
        acsc=0wa_h[jukslrmqnxqzttuyv]wpxv, bel=^G, cbt=\EI,
        civis=\E`0, clear=\E+$<20>, cnorm=\E`1, cr=^M, cub1=^H,
        cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c,
        cuu1=^K, dch1=\EW$<1>, dim=\E`7\E), dl1=\ER, dsl=\EF\r,
        ed=\EY$<20>, el=\ET, flash=\E`8$<100/>\E`9, fsl=^M,
        home=^^, ht=^I, hts=\E1, il1=\EE, ind=\n$<2>, ip=$<1>,
        is1=\E`\072\E`9$<30>, is2=\016\024\E'\E(, kHOM=\E{,
        kbs=^H, kcbt=\EI, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,

        kf10=^AI\r, kf11=^AJ\r, kf12=^AK\r, kf13=^AL\r, kf14=^AM\r,
        kf15=^AN\r, kf16=^AO\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r,
        kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r,
        khome=^^, kich1=\EQ, kil1=\EE, knp=\EK, kpp=\EJ, kprt=\EP,
        krpl=\Er, ll=^^^K, mc0=\EP, mc4=^T, mc5=^X, nel=^M^J,
        pfx=\Ez%p1%'?'%+%c%p2%s\177,
        pln=\Ez%p1%'/'%+%c%p2%s\r, prot=\E`7\E), rev=\E`6\E),
        ri=\Ej, rmacs=\EH^C, rmir=\Er, rmln=\EA11, rmso=\E(,
        sgr=%?%p1%p3%|%t\E`6\E)\n%e%p5%p8%|%t\E`7\E)%e\E(%;\n%?%p9%t\EH\002%e\E$
        sgr0=\E(\EH\003, smacs=\EH^B, smir=\Eq, smln=\EA10,
        smso=\E`6\E), tbc=\E0, tsl=\EF,
================================

  Run 'tic wyse50ak.src' as root which compiles this file and puts it in the
  right place (/usr/lib/terminfo/w/wyse50ak).

  (If you need termcap support as well you'll also need to convert this to a
  termcap entry.)

  As this is a non standard type it may be awkward when accessing remotes hosts.
  You should be able to use the 'screen' program to convert your terminal to
  VT100, however.

2 Terminal configuration

  You will need to reprogram the cursor keys to produce the VT100 style codes,
  by typing the following sequences on the terminal's keyboard. Unfortunately
  the terminal seems to give no visual feedback whatsoever, so make sure you
  get them right!

  Up:

   SHIFT-ESC
   |    (press shift \)
   -
   1
   ESC
   [
   A    (must be capital)
   CTRL-y

  Down:

   SHIFT-ESC
   |
   .
   1    
   ESC  
   [
   B    (must be capital)
   CTRL-y

  Right:

   SHIFT-ESC
   |
   0
   1    
   ESC  
   [
   C    (must be capital)
   CTRL-y

  Left:

   SHIFT-ESC
   |
   /
   1
   ESC  
   [
   D    (must be capital)
   CTRL-y

  You should now find the arrow keys generate the sequences ^[[A through to
  ^[[D .

  Going into setup (shift-setup) and pressing S for save seemed to permanently
  save these settings, although this may not even have been necessary.

  Other notable settings:
    Auto newline should be off (pine is buggy and assumes no automargins)
    Auto scroll should be on
    Handshaking should be set to DTR

  Note on handshaking:- Linux uses RTS/CTS whereas the terminals use DTR
  Without handshaking the terminals didn't work properly above 2400bps,
  but using a cable with DTRs wired to DSR and CTS on the other end it
  seems fine at 19200 (which is faster than the terminals can update the
  screen). The cable also wired RTS to DCD on the other end. Handshaking
  is only really needed from the terminal to the host.

Ben McKeegan    

December 97

=============================================================

--
/   Ben McKeegan                                                       \
\   Fitzwilliam College, University of Cambridge, UK.                  /

 
 
 

1. HP 200LX as a serial line terminal to Linux Box

Has anyone done this?

I have the general interest of being able to share files between my Linux
Box and my 200LX over a serial line.  I have an extra serial port, I've
verified that the Linux Box is talking to the 200lx and vice versa by
doing things like:

date > /dev/cua4

cat < /dev/ttyS4

and although it is miserably slow, I am seeing the interaction.  So, I
figured I'd try to set up the 200lx as a serial terminal that I could log
into the Linux Box from... Just to see how it works.

Well, I tried:

/sbin/agetty -Lh 38400 ttyS4

and I get the login message on the palmtop, but it happens ridiculously
slowly.  Certainly not at 38400 baud, as best I can judge.  Also, after I
get the login message and I try to login, I type my login name to the
palmtop, touch the enter key on the palmtop, and the password prompt never
comes up.  I'm not using the timeout feature, but it goes away anyway.
I'd like to crank up the speed, but I'm just feeling around in the dark
here.  I've not seen much in the way of documentation for doing what I'm
trying to do.  Can anyone offer any pointers?

Might there be a problem with the fact that the serial device in the 200lx
is an old one?  (what, 8250 or something?).

In case this is important, here's the relevant portion of my rc.serial
file:

# This section for setting up ports on the STB 4-COM multi-port
# serial card (ksf) (7/13/96)  As of now, only one serial device
# will be used in this card, that is the HP 200LX Palmtop PC for
# short file transfers.
#
# The `^fourport' option tells Linux that the STB card is NOT an AST
# fourport card, so it will handle it correctly.
#
# Here, the following assignments apply (BTW, COM5,6,7,8... my words
only).
# COM5, port1 on the STB 4-COM
# COM6, port2 on the STB 4-COM
# COM7, port3 on the STB 4-COM
# COM8, port4 on the STB 4-COM

${SETSERIAL} /dev/cua4 irq 11 uart 16550a port 0x1F8  ^fourport
${SETSERIAL} /dev/cua5 irq 11 uart 16550a port 0x2A8  ^fourport
${SETSERIAL} /dev/cua6 irq 11 uart 16550a port 0x1E8  ^fourport
${SETSERIAL} /dev/cua7 irq 11 uart 16550a port 0x1A8  ^fourport

do I need to do anything with the /dev/ttyS[1-4] devices?  I'm not sure
what to do with the uart type option on these.  The serial card does use
the 16550, but I think the 200lx uses the 8250 uart.

I'd really appreciate any help.

___________________________________________________________________________
 Plan ahead.  Promote swift colonization of the solar system...  *First*
____________________________________________
__________________

"Plaese porrf raed."
                -- Prof. Michael O'Longhlin, S.U.N.Y. Purchase

_______________________
____________Kevin S Ford__________

2. Please help! Installing Proxim Symphony on Redhat 7.1

3. Running a Serial-Line Terminal

4. Have i been cracked?

5. serial line terminal only gets one character

6. Draft Japanese LGX manual on ftp.yggdrasil.com

7. Redirect serial line to X-Terminal

8. FTP Server Questions

9. STTY and a Serial Terminal (3s at end of every line)

10. Dumb Terminal over serial lines...

11. Terminal emulation on a serial line

12. virtual terminals over serial lines?

13. computer over a serial line as a terminal?