Hello Linux users. This is a long post beware! A summary of replies
will be posted since I've noticed others having similar problems.
Please reply to bm...@futuremedia.com
Thanks.
Bryan.
-----------------------------Cut Here----------------------------------
Getty Problem Report
I am trying to get a getty, any getty, to control the modem line so that
others may login to my system. I've been playing with this for awhile
and therefore the post that follows is fairly long and detailed.
I have tried two different configurations and will detail all software
and hardware used for each. Both result in the same answer to the following
question, "Does getty work as documented?" Simple answer "No".
The Background
The system is configured to use uucp for mail, and from time to time
I use minicom to link up with a SunOS machine for Internet fun.
To date I have had no problems dialing out via uucp/minicom. And no
problem while in MS-DOS receiving faxes, dialing out etc. (Yes I know
efax works for Linux, but not in my case it won't answer the phone.
Sending seems to be Ok though.)
The Players --
1. First Configuration
Yggdrasil Linux Summer '94 CD-ROM dist. 1.1.X (they don't specify)
poeigl-1.11
simpleinit, C comment says version 1.8
agetty, sccs id says version 1.29 9/1/91
/etc/inittab -- in simpleinit format see below
# inittab for linux, poeigl 1.6
# Format:
# ttyline:termcap-entry:getty-command
tty1:con80x60:/etc/getty 9600 tty1
tty2:con80x60:/etc/getty 9600 tty2
ttyS1:dumb:/etc/getty -m -t30 9600,4800,2400,1200,300 ttyS1
hayes modem 14400bps/V.42
2. Second Configuration
Yggdrasil Linux Summer '94 CD-ROM dist. 1.1.X
poeigl-1.11
simpleinit, C comment says version 1.8
getty_ps, RCS id: main.c,v 2.0 90/09/19
/etc/inittab -- in simpleinit format see below
# inittab for linux, poeigl 1.6
# Format:
# ttyline:termcap-entry:getty-command
tty1:con80x60:/etc/getty 9600 tty1
tty2:con80x60:/etc/getty 9600 tty2
ttyS1:unknown:/etc/getty_ps ttyS1 9600
/etc/gettydefs
# Modem that autobauds to different speeds, terminal ...:
# - SANE includes CS8 ISTRIP HUPCL
# - DON'T USE SANE or ECHO for initial config!!!!!
#
9600# B9600 CS8 # B9600 SANE -ISTRIP #login:\s#9600
4800# B4800 CS8 # B4800 SANE -ISTRIP #login:\s#4800
2400# B2400 CS8 # B2400 SANE -ISTRIP #login:\s#2400
1200# B1200 CS8 # B1200 SANE -ISTRIP #login:\s#1200
300# B300 CS8 # B300 SANE -ISTRIP #login:\s#300
/etc/default/getty.ttyS1
DEBUG=577
CLEAR=NO
HANGUP=YES
INITLINE=cua1
INIT="" ATZ\r OK
TIMEOUT=30
WAITFOR=RING
CONNECT="" ATA\r CONNECT\s\A
hayes modem (same as above)
The Story
The first config above requires setting up the modem to auto answer
and be quiet while doing so. I set this up by hand by issuing commands
in minicom. In particular set result code echoing to off and modem
echo to off, and answer after 1 ring. Commands while in minicom are:
atq1 \n //modem does not send responses
ats0=1 \n //answer the phone, otherwise just rings and rings
ate0 \n //commands not echoed according to HOW-TO FAQ
at&w0 \n //store this as the active profile
The result of this configuration is that dialing in yeilds the following:
Dial-in system sees:
CONNECT 9600 // from the "local" modem
Eventually, after approx. 30 seconds the dial-in system beeps as it dumps
a screen full of non-sense, that would lead me to believe it really wanted
parity to be set. But those problems are echoes of the past on a VAX gone
by.
The second config above requires re-setting the modem to do things a little
differently. The modem should not answer but rather wait for RING. This
means set S0=0 while in minicom, and verify word result codes "v1".
ats0=0 //modem should not auto answer.
atv1 //modem should use word responses
at&w0 //make this the new active config.
This results in the following debug output from getty_ps.
getty Started: Fri Oct 7 13:19:02 1994
command line values:
[-C] connect = (NULL)
[-d] defname = (NULL)
[-h] NoHangUp = (FALSE)
[-r] waitchar = (FALSE)
delay = (0)
[-t] TimeOut = (0)
[-w] waitfor = (NULL)
line = (ttyS1)
speed = (9600)
type = (unknown)
lined = (NULL)
loading defaults
defvalue(SYSTEM) called
defvalue returns NULL
defvalue(VERSION) called
defvalue returns NULL
defvalue(LOGIN) called
defvalue returns NULL
defvalue(INIT) called
defvalue returns ("" ATZ\r OK)
defvalue(ISSUE) called
defvalue returns NULL
defvalue(CLEAR) called
defvalue returns (NO)
defvalue(HANGUP) called
defvalue returns (YES)
defvalue(WAITCHAR) called
defvalue returns NULL
defvalue(DELAY) called
defvalue returns NULL
defvalue(TIMEOUT) called
defvalue returns (30)
defvalue(CONNECT) called
defvalue returns ("" ATA\r CONNECT\s\A)
defvalue(WAITFOR) called
defvalue returns (RING)
open stdin, stdout and stderr
Stdin just opened:
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
-ixoff -iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl -echoke
setup terminal
gtabvalue(9600) called
gettytab=/etc/gettydefs
line read = (# Modem that autobauds to different speeds, terminal locked at 9600, etc:^J)
line read = (#^I- SANE includes CS8 ISTRIP HUPCL^J)
line read = (#^I- DON'T USE SANE or ECHO for initial config!!!!!^J)
line read = (#^J)
line read = (^J)
line read = (9600# B9600 CS8 # B9600 SANE -ISTRIP #login:\s#9600^J)
line read = (^J)
parseGtab() called
parsing line:
field=1, nextword=(9600)
field=2, nextword=(#)
field=3, nextword=(B9600)
field=3, nextword=(CS8)
field=3, nextword=(#)
field=4, nextword=(B9600)
field=4, nextword=(SANE)
field=4, nextword=(-ISTRIP)
field=4, nextword=(#)
field=5, nextword=(login:)
login=(login:\s)
field=6, nextword=(9600)
gtabvalue() successful
After processing gettydefs:
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
-ixoff -iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl -echoke
perform line initialization
chat("" ATZ\r OK) called
EXPECT: ([nothing])
SEND: (ATZ^M) -- OK
EXPECT: <30> (OK), GOT:
^@[timed out after 30 seconds]
Modem initialization failed -- aborting
...
<<<>>>more of the same messages deleted
The Conclusion
I have tried several "alternates" including getting getty_ps to work on
a VC. It doesn't. I have been able to dial-in to the Linux box while
in minicom and doing an 'ata' when I see the RING. (Unfortunately I have
more to do in life than be a getty process.) By doing this I proved to
myself at least that I do not have a modem-to-modem problem. I was able
to even transfer files from the dial-in system to Linux PC while in minicom.
The only other thing I think of to do is start reverse engineering the
uucp/minicom modem initialization code and put that in getty or of course
build a modem from bits and pieces of my Amiga and re-write the entire
Linux kernel and device drivers from scratch while implementing
a mutex threaded kernel that will run on loosely coupled processors
distributed across the Internet :-).
Any getty guru type help would be greatly appreciated. Pointers to a bug
list etc, etc.
Thanks in advance.
Bryan.