Getty on a serial port

Getty on a serial port

Post by Martijn van Buu » Thu, 20 Jun 2002 05:46:54



Alohas.

Odd, I thought I knew how these things work, but alas. I have an old Mac
Classic, which I have connected to my P90 running NetBSD 1.5.2. I want to
be able to use the mac as a serial terminal (And/or use PPP on it, but
that's a later issue). The cable is a simple three-wire null-modem cable,
and it's known to be working. In fact, the setup worked as a charm, untill
I decided I had enough of Linux, and threw NetBSD on said P90 (I have been
running NetBSD-current on my other computer, a PowerMac. However, tracking
-current on a P90 isn't really something which sounds very useful to me).

However, it just won't work. If I run ZTerm (About the only decent terminal
emulator for a classical Mac I could find) on the mac, and minicom on the P90,
it works like a charm - except for "return" sending only a CR, no LF. If
I enable getty on the first serial port (by adding something like
'tty00 "/usr/libexec/getty std.9600" on local' to /etc/ttys, and sending
init a SIGHUP), there *is* something happening on the serial port: to be
precise: the mac starts echo'ing things I enter to the screen, which it
doesn't when the getty is turned off. However, I get no login prompt.

It almost seems to me like getty is waiting for a CR+LF to initialize the
login sequence, but the mac isn't able to give it - even if I press "CTRL-M"
"CTRL-J" manually. If I'm being *, and if I connect to /dev/tty00
with a minicom while still having the getty run, and if I press enter, I
suddenly get a login sequence.  I can even login, and do my stuff, on the
Mac.

Getty seems to be waiting for something - but what? And how can I disable this?

--

         Geek code: G--  - Visit OuterSpace: mud.stack.nl 3333
   Kees J. Bot: The sum of CPU power and user brain power is a constant.

 
 
 

Getty on a serial port

Post by Frederick Bruckm » Thu, 20 Jun 2002 09:18:14




Quote:

> However, it just won't work. If I run ZTerm (About the only decent terminal
> emulator for a classical Mac I could find) on the mac, and minicom on the P90,
> it works like a charm - except for "return" sending only a CR, no LF. If
> I enable getty on the first serial port (by adding something like
> 'tty00 "/usr/libexec/getty std.9600" on local' to /etc/ttys, and sending
> init a SIGHUP), there *is* something happening on the serial port: to be
> precise: the mac starts echo'ing things I enter to the screen, which it
> doesn't when the getty is turned off. However, I get no login prompt.

> It almost seems to me like getty is waiting for a CR+LF to initialize the
> login sequence, but the mac isn't able to give it - even if I press "CTRL-M"
> "CTRL-J" manually. If I'm being *, and if I connect to /dev/tty00
> with a minicom while still having the getty run, and if I press enter, I
> suddenly get a login sequence.  I can even login, and do my stuff, on the
> Mac.

> Getty seems to be waiting for something - but what? And how can I disable this?

I'm not sure exactly what's going on, but I think "getty" sets up hardware
hand-shaking by default, which isn't appropriate for the three-wire cable.
Read gettytab(5), and note that getty can have separate settings for writing
the banner, reading the login name, and before it exits.

Try noting the value of the iflag setting with "stty -g /dev/tty00" while
it's working (or "stty -g" in the running session), and using that for the
values of "i0" and "i1" in a gettytab entry. E.g:

zterm|Mac running ZTerm:\
        :sp#9600:i0#XXXX:i1#XXXX:

substituting the values found with "stty" for "XXXX". Now set "zterm" to
the term type in "/etc/ttys", send a SIGHUP, and see what happens.

Note that it's also possible to put descriptive settings in "gettytab", but
I'm not sure exactly how that goes, or what you'd need to put there. Another
thing, you probably want to set software handshaking if you have only a three-
wire cable (and also in the ZTerm). For what it's worth, this is how I set
software handshaking for a VT220:

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

 
 
 

1. Newbie and problems with getty and serial ports

I am quite new in Linux and have a problem with getty.

I am 'only' trying to connect a dumb terminal with a linux box.

I have test the /etc/gettydefs file and it is correct (well it says the
same that my manual). I have configured the file /etc/rc.d/rc.serial as
the manual says.

if i execute from the console:

        /sbin/getty ttyS1 DT9600 vt100

my terminal works fine, so it is not a cabling problem, but when i
logout i cannot log again until i go to the console and execute the
command again.

Then i said, OK i need to respwn it in the /etc/inittab file and i put a
new line on it as:

        S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100

and execute :

        init q

My terminal does not work.
Then i reboot the machine, it does not work

If i execute again the line from the console it works again perfectly
until i logout

I am lose

Help

Thanks in advanced

joseba real de asua

2. Chhosing between two video cards

3. QUESTION: How to disable getty on Serial Port??

4. Is there a scrip, non-GUI, for adding users to Redhat 6.2

5. getty on serial port

6. x hangs

7. getty serial port LCKs on 5.0.4

8. copying boot disk (?)

9. getty respawning too rapidly on serial port attached to modem

10. getty on serial port; login: but no Password:

11. slow getty on serial port

12. Serial Ports+Getty

13. HELP needed with connecting UPS to serial port w/o "getty"