Subject: Problem with getty in -current on i386
To: None <port-i386@NetBSD.ORG, current-users@NetBSD.ORG>
From: maximum entropy <>
List: current-users
Date: 05/08/1997 19:15:04
Hello folks,

I have an i386 box running -current supped on May 6.  There is a USR
Sportster 28.8 external modem connected on /dev/tty00.  I can
communicate with the modem fine using c-kermit, and can successfully
dial out to another host and maintain a connection.

There seems to be a problem with dial-in access to my box using this
setup.  When I dial in, the two modems synchronize and connect, and
then all I get back from the i386 box is garbage which looks like line
noise but isn't.

The USR modem is set for RTS/CTS flow control, status code reporting
is disabled, and echo is disabled.

The entry in /etc/ttys is:
tty00   "/usr/libexec/getty std.115200" unknown on rtscts

The relevant entries in /etc/gettytab are:
        :np:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200:

Output from dmesg is:
NetBSD 1.2D (CA486) #0: Tue May  6 05:29:05 EDT 1997
cpu0: Intel 486DX (486-class)
real mem  = 33157120
avail mem = 29388800
using 430 buffers containing 1761280 bytes of memory
mainbus0 (root)
eisa0 at mainbus0
ahc0 at eisa0 slot 9: Adaptec AIC-7770 SCSI (on motherboard)
ahc0: aic7770 <= Rev C, Twin Channel, A SCSI Id=7, B SCSI Id=7, 4 SCBs
ahc0: interrupting at irq 10
scsibus0 at ahc0 channel 0: 8 targets
ahc0: target 0 synchronous at 10.0MHz, offset = 0xf
sd0 at scsibus0 targ 0 lun 0: <QUANTUM, LPS525S, 3110> SCSI2 0/direct
sd0: 501MB, 2448 cyl, 6 head, 69 sec, 512 bytes/sec
ahc0: target 6 synchronous at 4.0MHz, offset = 0xf
cd0 at scsibus0 targ 6 lun 0: <TOSHIBA, CD-ROM XM-3401TA, 2873> SCSI2
5/cdrom removable
scsibus1 at ahc0 channel 1: 8 targets
isa0 at mainbus0
ep0 at isa0 port 0x200-0x20f irq 5: 3Com 3C509 Ethernet
ep0: MAC address 00:20:af:9e:1b:32
ep0: 8KB byte-wide FIFO, 5:3 Rx:Tx split, utp/aui/bnc (default bnc)
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 drive 0: <Maxtor 84320A8>
wd0: 4134MB, 8400 cyl, 16 head, 63 sec, 512 bytes/sec
wd0: using 16-sector 16-bit pio transfers, lba addressing
npx0 at isa0 port 0xf0-0xff: using exception 16
pc0 at isa0 port 0x60-0x6f irq 1: color
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
fd1 at fdc0 drive 1: 1.2MB 80 cyl, 2 head, 15 sec
biomask 4440 netmask 4460 ttymask 44e2
boot device: wd0
root on wd0a swap on wd0b
root file system type: ffs

Output of 'stty -a -f /dev/tty00' after the modems were connected:
speed 115200 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
        -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
        -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel
        -brkint -inpck -ignpar -parmrk
oflags: -opost onlcr -ocrnl oxtabs
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb crtscts
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status =
        stop = ^S; susp = ^Z; time = 0; werase = ^W;

Output of same command, while using c-kermit without any trouble:
speed 115200 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo echoe -echok echoke -echonl
        -echoprt -altwerase -noflsh -tostop -flusho -pendin
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany imaxbel
        -brkint -inpck ignpar -parmrk
oflags: -opost onlcr -ocrnl oxtabs
cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status =
        stop = ^S; susp = ^Z; time = 0; werase = ^W;

This setup did work a few days ago on this system.  Though I hadn't
tested it extensively I did dial into the box a few times and didn't
notice anything strange.  Since then I made the following changes:
- Upgraded to -current of May 6, was previously running -current from
approximately April 4
- Added IDE hard disk (previously the system was SCSI-only) and moved
root filesystem to the IDE disk

I have tried the following, all with no observable effect.  I would
occasionally get a good connection and be able to log in, and think I
had stumbled onto something that made a difference, but then if I hung
up and dialed in again without making any changes, I would just
repeatedly get the same old screwed up behavior.
- Swapped in new serial cable and new phone line cord
- Tried /dev/tty01 in case there was something wrong with the first
serial port on my machine
- Tried lower serial speeds (std.57600, std.38400, even tried std.1200)
- Tried dialing in using different remote systems with different types
of modems (both USR and non-USR)
- Disabled the new IDE hard disk
- Tried using old /usr/libexec/getty from before my recent -current
- Backed out to old kernel

When the modem is connected to a DECstation 5000/120 running
NetBSD-pmax (-current from around April 4) I can dial in and log in to
the DECstation with no trouble.  So I don't think the modem itself is
at fault.

Any hints, clues, or suggestions would be welcome.  If I've omitted
some critical piece of information about my configuration, please let
me know.


entropy -- it's not just a good idea, it's the second law.