[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with seting up a dumb terminal to Linux please



On Thu, 8 Jan 1998, K.C. Habib wrote:

> Hi!  I have Redhat 5, and appreciate your help, since the help from the
> Slackware people hasn't helped much simply because of the differences
> between the two distributions. What I'm trying to do is to connect
> a 286 PC, running only DOS6.2 with my P166 Linux box.  On the DOS side, I
> am using Telix for the terminal program.  The serial cable is plugged into

Well, I note that someone in a later post that I saw today suggested that
Telix is a poor choice for your use, so I suggest that you find out from
him what simpler (dumber) program is more appropriate for speech use.
I know that there are many free terminal emulation programs available for
Messy-DOS.  Then email me about what terminal protocol you intend to
use for it, and we can try to write you a suitable gettydefs entry for it.
Now for what the "protocol" means: both ends must talk the same language,
that is, we need to know how many bits per character you are using (7
or 8), whether you are using parity, and, if so, whether it is odd or
even, and whether you are using 1 or 2 stop bits.  Or you could just
adopt the protocol I tell you to use on the terminal (286) end, in the
example below.

> Serial port 1 on that machine.  On my linux machine the serial cable is
> plugged into Serial port2.  

So that would be com2, in MS-DOG terminology, or ttyS1 on Linux.

> I want to make it so that the Dos box will show the login
> prompt, so I can give commands to my Linux box through that computer, and
> so that the output for my commands will go to the Dos box.

Like any normal terminal, yes.

> This is just like any other dumb terminal situation.

As stated by a previous author, though, most terminals are anything
but "dumb", since they can present you with all sorts of boxed and
bordered windows, and hilighted, reversed, or bold, and even blinking
text, and the common vt100 to vt520 series terminals are very adept at
this.  I should think that this would be nasty stuff for a speech
synthesizer.  This stuff is all done in Linux/Unix, if the application
uses them, through a cursor control library known as "curses" or
"termcap" or "ncurses".  You probably really need to dumb the
situation down, by setting up a simpler terminal emulation that will
tell applications that use "curses" that your terminal can't do this
sort of thing.  You do this on the Linux end by setting your terminal
type to "dumb".  You set this up initially by putting the terminal
name "dumb" at end of the getty line in /etc/inittab:

t1:345:respawn:/sbin/getty -r1 ttyS1 DT9600 dumb

This can be the last line in the file.  Be VERY careful
with this file, since messing it up can make your system unbootable.
Make a rescue disk, and save a copy of the original inittab to
inittab.original, or something similar.  There are ways you can boot
the system in an emergency, if you are using LILO, though, and
this one serial line, if it is the only line that is wrong, will
only prevent the serial port from working.

To activate this change, as root (super user) do:
/sbin/telinit q

Later we can talk about some old text editors, etc, that do NOT
use "curses", and are line oriented, such as "ed", or "ex".
And you could strip the "dumb" terminal description down even
further, to cripple it even more, so programs can't do undesirable
things (and they will complain bitterly when they start up, about
this, some may even die -- but you don't want them anyway).

> I would prefer doing this at 57600 BPS, but I can be flexible on
> that.

Let's get things working at a more conservative speed, at first, since
some old serial ports can't handle the higher speeds.  Later we can
increase the speed: we'll start at 9600.   There is a stock entry in
the default supplied /etc/gettydefs for the "DT9600" label, which you
can use, if you wish:

# 9600 baud Dumb Terminal entry
DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S login: #DT9600

This is an 8 bit protocol, and appears to use the protocol default
(the traditional 8N1).  You can run the following command as root, to
find out how the serial port is set up:

stty -a < /dev/ttyS1
And here is the output (in part):
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts

"man stty" shows that this is indeed a no parity, 1 stop bit setup,
for the default:
       [-]parenb
			               Generate parity bit in output and expect parity
										 bit in input.
       [-]cstopb
			               Use two stop bits per character (one with `-').

After you get your getty started, you should run the above command 
(stty -a < /dev/ttyS1) to verify this is the case, and modify your
settings on both ends, accordingly, till they match (you will know
when they match, because the output will be intelligible).

When you have your DOS box set up for 8N1, give it a couple of
carriage returns and wait a second for the delay we have specified
(-r1), and you should (we hope) get a login prompt.

After logging in (you have made a user account, haven't you?), you
should do:
echo $TERM
dumb
to see if your terminal type is still set to "dumb", or has been
reset in some default shell startup file to something else, like
"linux" or "vt100", which are similar to each other.  If you need help
with this, or anything else, get back to me.  When you get this far,
then we can look at what speeds your serial ports can handle,
according to the chips you have in your serial port boards on each
end, etc, and experiment with increasing the speed (we may, for
instance, have to use the "setserial" command and "rc.serial" script
to set up your linux port to accept the higher speeds, on bootup).
The limitation here is likely to be the older serial ports in the 286:
the oldest chips can't handle more than 9600 reliably.  New serial
cards are very cheap now, though (should be less than $15.00).

> Could you give me exact instructions on what to type in what file,

Well, I have assumed that you know how to use some editor, and
know how to access the above mentioned files, and save backup
copies of them, etc.  If not, I'm not sure how to tutor you, 
without more detail about where you stand.  You should, of
course, read the online manuals on your CD, or available
on the web, for RedHat, and the manuals in the /usr/doc directory,
according to what is applicable.  There is, for instance, a good
"Linux Installation and Getting Started Guide" on your disk, and
also on the web.

> so that the Dos box can emulate the Linux box?  I would really
> appreciate it.  P.S. I installed the complete Redhat 5 distribution,
> so i have all of the files necessary.

I assume that this means that getty_ps is installed: you can verify
this by typing:
rpm -q getty_ps
and you should get:
getty_ps-2.0.7h-4
But the version number might be a bit different, since I am running
RedHat 4.2, not 5.0

By the way, after you get things working, you will want to visit the
"upgrade" directory on RedHat's ftp site (or a mirror), for security
upgrades and bug fixes (and there are a bunch of files there now).  I am
waiting till things stabilize a bit more on the new glibc stuff,
before upgrading.

L. C. Robinson
reply to infynity@cyberhighway.net (a family account)


---
Send your message for blinux-list to blinux-list@redhat.com
Blinux software archive at ftp://leb.net/pub/blinux
Blinux web page at http://leb.net/blinux
To unsubscribe send mail to blinux-list-request@redhat.com
with subject line: unsubscribe