old-www/LDP/LG/issue29/tag_dumbterm.html

250 lines
9.1 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.1pre6">
<TITLE>The Answer Guy 29: Connecting a Dumb Terminal to your Linux
System</TITLE>
</head>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<!--endcut ========================================================= -->
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <hr> <P>
<!-- =============================================================== -->
<H1 align="center"><A NAME="answer">
<img src="../gx/dennis/qbubble.gif" alt="" border="0" align="middle">
<a href="./index.html">The Answer Guy</a>
<img src="../gx/dennis/bbubble.gif" alt="" border="0" align="middle">
</A></H1> <BR>
<H4 align="center">By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A> </H4>
<p><hr><p>
<H3><img src="../gx/dennis/qbub.gif" alt="(?)" width="50" height="28"
align="left" border="0">
Connecting a Dumb Terminal to your Linux System
</H3>
<p><strong>From Mark Cohen on 07 May 1998
<br><br>
Jim,
<br><br>
My name is Mark, I met you at the
<a href="http://www.balug.org/">balug</a> meeting this week. I
just wanted to shoot off a note to you about getting <tt>getty</tt> to
work on my linux box (RH5.0) Im trying to connect my dumb terminal to
it (pilot)
<br><br>
Any help would be greatly appreciated!
<br><br>
-Mark
</strong></p>
<blockquote><img src="../gx/dennis/bbub.gif" width="50" height="28" alt="(!)"
align="left" border="0">
The simplest method that I know of is to add a line like
this to your <tt>/etc/inittab</tt> file:
<pre>
t1:23:respawn:/sbin/agetty -L 38400,19200,9600,2400,1200 ttyS1 vt100
</pre>
... assuming you have '<tt>agetty</tt>', that you want to use a null
modem on COM2 (use ttyS0 for COM1 etc), and that your
communications package on the PalmPilot will do vt100
emulation).
<br><br>
If you don't have a copy of '<tt>agetty</tt>' you can use a line
like:
<pre>
t1:2345:respawn:/sbin/getty ttyS2 DT38400 vt100
</pre>
... assuming you have a reasonable <tt>/etc/gettydefs</tt> (like
the default one that used to come with Red Hat 4.x --- and
is probably unchanged in newer releases). I won't go into
the details about how the gettydefs file is constructed,
let's suffice it to say that the syntax was "baroque".
<br><br>
It's undoubtedly possible to use <tt>uugetty</tt> and
<tt>getty_ps</tt> with these as well --- though I haven't ever
bothered with those packages. It should also be possible to use
<tt>mgetty</tt> (which I use for modem dial-in lines and incoming
fax support). However that doesn't seem to work even when I use
the <tt>-r</tt> switch as specified in the manual.
<br><br>
Definitely don't try this with <tt>mingetty</tt> --- that is designed
purely for use with virtual consoles.
<br><br>
In any event, these examples use "<tt>t1</tt>" as the inittab
entry "id" and I have them enabled at different runlevels
(since these examples are from different machines on my
network). Read the <tt>inittab(5)</tt> man page for details about
what the fields mean.
<br><br>
After you've edited this file simply issue the command:
<br><br>
'<tt>telinit q</tt>'
<br><br>
... to "tell init" to re-read it's configuration file and
implement your changes. In a few seconds you should be
able to login on that line (you might have to hit [Enter]
a couple of times to get a login prompt).
<br><br>
If you don't get a login prompt, or you see a console message
like: "<tt>respawning too fast.... disabled for five minutes</tt>"
(check your <tt>/var/log/messages</tt> file for this and similar
errors from init and/or from any '<tt>getty</tt>' that you happen
to be using), you should double-check the syntax of your entry,
double-check which serial port you're plugged into (remember Linux'
numbering of serial and printer ports sometimes doesn't correspond to
DOS/BIOS extensions --- some crufty hardware may cause confusion),
and check for IRQ conflicts and cabling errors.
<br><br>
If you still have problems with it after you've double and
triple checked every detail than you have some troubleshooting
choices:
<ul>
<li>buy a cheap "breakout" box and watch how the
LED's respond to your software activity.
<li>connect another system, even a DOS laptop and
run <a href="http://www.columbia.edu/kermit/">C-Kermit</a>
or <a href="http://delta.com/">Telix</a> or
whatever you like in "host mode" and try to access that
port from the other direction.
<li>connect a normal external modem to the box and
see if you can connect and so simple AT commands
to it.
</ul>
In any of these cases you can play with a wide variety of
'<tt>setserial</tt>' and '<tt>stty</tt>' commands to try and get
the serial port to respond and/or behave properly. Before you spend
too long with those, however, I have to say that the times
when I've resorted to them as part of my troubleshooting
have consistently been fixed by untangling an IRQ conflict
or replacing a bad serial port (usually a whole multi-function
controller, actually).
<br><br>
I personally have given up on the cheap $15 IDE/floppy/serial
cards and I pay a bit extra for the
<a href="http://www.quickpath.com/">QuickPath</a> "FlexPort"
cards (which usually come in at close to $100 US). Serial
ports are hard enough to deal with without having flaky
hardware underneath it. (Luckily most of the modern
motherboard that have built-in serial ports have stopped
putting in really cheap ones --- but it used to be that
they were often junk and sometimes could not be disabled
--- even if they had jumpers that purported to do so).
<br><br>
Anyway, good luck.
<br><br>
Personally I usually configure a "dumb terminal" port
for all of my Linux boxes (eventually). This serves two
important purposes: It is the most convenient way for me
to get files to and from my laptop (for which I don't have
a supported ethernet card). More importantly it gives me
an extra troubleshooting option if my system "seems" hung.
I can just plug in the old null modem and give it a go.
<br><br>
It can mean the difference between a clean shutdown and a
game of "red-switch" roulette.
<br><br>
(Although it hasn't happened for any of my systems in so
long I've almost given up on seeing it at all
<img src="../gx/dennis/smily.gif" alt=";)"
width="20" height="24" align="absmiddle"> --- but it
used to be possible for the Linux console driver be completely
unresponsive, and even for the network subsystem to be dead
while the serial lines were still accessible. However, if
you don't configure the terminal line in advance you don't have
the option when you want it).
</blockquote>
<!--================================================================-->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 1998, James T. Dennis <BR>
Published in <I>Linux Gazette</I> Issue 29 June 1998</H5>
<P> <hr>
<!--================================================================-->
<p align="center"><table width="95%"><tr align="center">
<td rowspan="4"><A HREF="lg_answer29.html"><IMG
SRC="../gx/dennis/answernew.gif"
ALT="[&nbsp;Answer&nbsp;Guy&nbsp;Index&nbsp;]"i
align="left"></A></td>
</tr><tr align="center">
<!-- begins -->
<td><A HREF="tag_versions.html">versions</A></td>
<td><A HREF="tag_lilo.html">lilo</A></td>
<td><A HREF="tag_virtdom.html">virtdom</a></td>
<td><A HREF="tag_kernel.html">kernel</A></td>
<td><A HREF="tag_winmodem.html">winmodem</a></td>
<td><A HREF="tag_basicmail.html">basicmail</a></td>
<td><A HREF="tag_betterbak.html">betterbak</a></td>
</tr><tr align="center">
<td><A HREF="tag_shadow.html">shadow</a></td>
<td><A HREF="tag_dell.html">dell</a></td>
<td><A HREF="tag_dumbterm.html">dumbterm</a></td>
<td><A HREF="tag_whylinux.html">whylinux</a></td>
<td><A HREF="tag_redhat.html">redhat</a></td>
<td><A HREF="tag_netcard.html">netcard</a></td>
<td><A HREF="tag_macrovir.html">macrovir</a></td>
</tr><tr align="center">
<td><A HREF="tag_newlook.html">newlook</a></td>
<td><A HREF="tag_tacacs.html">tacacs</a></td>
<td><A HREF="tag_sendmail.html">sendmail</a></td>
<td><A HREF="tag_dialdppp.html">dialdppp</a></td>
<td><A HREF="tag_ppp233.html">ppp233</a></td>
<td><A HREF="tag_msmail.html">msmail</a></td>
<td><A HREF="tag_procmail.html">procmail</a></td>
<!-- ends -->
</tr></table>
</P> <hr> <P>
<!--================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif"
ALT="[&nbsp;Table&nbsp;Of&nbsp;Contents&nbsp;]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[&nbsp;Front&nbsp;Page&nbsp;]"></A>
<A HREF="lg_bytes29.html"><IMG SRC="../gx/back2.gif"
ALT="[&nbsp;Previous&nbsp;Section&nbsp;]"></A>
<A HREF="./hamilton.html"><IMG SRC="../gx/fwd.gif"
ALT="[&nbsp;Next&nbsp;Section&nbsp;]"></A>
<!--startcut ======================================================= -->
</body>
</html>
<!--endcut ========================================================= -->