From: James Purdon (purdon@cons1.mit.edu)
Date: 04/13/93


From: purdon@cons1.mit.edu (James Purdon)
Subject: Linux Serial Saga Or How I Got Kermit Working
Date: 14 Apr 1993 03:03:52 GMT

I snagged linux in early march out of some archive. No doubt my version
is completely obsolete by now, but since I haven't had the time to write
the thrity or so floppies needed for the latest SLS distribution, there
it is.

For the curious, a 'uname -a' reports the following:

        Linux slugpc 0.99.pl4-62 01/23/93 i386

I have what FastMicro calls its ValueLine (or some such marketing hype)
special. It's a 25MHz 486sx with 4Mb of RAM, 64K cache, 80Mb Conner IDE
drive, 1.44Mb floppy drive, TVGA 9000 SVGA (hah!) card, and general
all-purpose IDE, parallel port, game port, floppy, and dual serial port
card. I added a MouseSystems serial mouse hooked up to ttyS0.

Anyway, I've been wanting to talk to the outside world on this box
for quite a while, but I had no modem on it, and I didn't want to
remove the modem from one of the other two machines I have laying
around here. No problem, I thought, I'll just whip me up a null
modem cable, wire my linux to my incredibly ancient 286 running
Microport SYS V/AT and instant access!

So I hook things together, create the proper tty on the linux box
(well, I admit it, the SLS FAQ for this version was kind of weak
on what the tty's should be called, so I made them all), and change
inittab to spawn a getty on it.

No luck. Inttab complains about getty respawning too rapidly and
kermit gives me I/O error messages. So I futz around a bit, creating
ttys3, cua3, and ttyS3 and having no luck with any of them. I even
tried using uugetty instead of getty, but still no luck. In
desperation, I shut down linux and bring up MS-DOS and give the port
(supposedly configured as COM4) a try. No luck, but I notice that
during boot the BIOS is reporting only one serial por, and come to
think of it, so was linux.

So I open up the machine (which is when I discovered the all-purpose
controller card), pull out the card, dig up the rather sparse docs
on the junper configuration and discover that the folks at FastMicro
have cleverly disabled the port. So I correct it, and bring up
linux again.

Still no luck. Inittab still claims that getty is respawning too
rapidly and kermit reports I/O error after a communications
disconnect. However, during one of my kermit tests suddenly the
linux login page appears on the machine connected to the serial
port and I log in! But once I log out, the same old behavior
returns. So I wrote the following:

        for i in 0 1 2 3 4 5 6 7 8 9
        do
                for j in 0 1 2 3 4 5 6 7 8 9
                do
                
                        ...
                        
                        for n in 0 1 2 3 4 5 6 7 8 9
                        do
                                getty 9600 ttyS3
                        done

                        ...
                done
        done

and eventually I get the login prompt. But its all so random. Most of
the time the getty stops immediately (guess thats why inittab said it
was respawning too fast).

Finally, I start mucking about with "stty -a </dev/ttyS3" and see
a "-hupcl" in the report. I decide to do a "stty hupcl </dev/sttyS3"
and suddenly it works! Inittab successfully spawns getty and kermit
suddenly is able to talk to the Microport 286. However, because
I used ttyS3 in the kermit, getty suddenly tries to grab the in-use
tty for itself, resulting in hundreds of failed login attempts. So
I comment out the inittab entry, because all I want to do right now is
use kermit to talk to the Microport 286 to use its modem to dial
into Athena to post this message so here we are.

Now I'm going to try the parallel ttyS3/cua3 thingie and see if getty
will really keep its mits off the tty if I use the cua3 for the kermit.
I'm not sure why this should work, as both ttyS3 and cua3 have the same
major and minor device numbers, which makes them the same device, in
my book.

By the way, at least in this version, for me, the "stty hupcl </dev/whatever"
seems to be required for me to successfully use the port, at least
initially. After I've grabbed it though, a "stty -hupcl </dev/whatever"
doesn't seem to hurt things.

Anyway, that's my serial saga to date. Serves me right for using
obsolete stuff I suppose, but now that I'm able to use two machines
at once from linux strange but beautiful women approach me on the
street and ask to have my baby, and even my wife claims that I
look sexier than ever.

-- 
Jim

Once I was single. Now I am married.