getty/modem GURU help

getty/modem GURU help

Post by Bryan Ma » Sat, 08 Oct 1994 23:37:47



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.

 
 
 

getty/modem GURU help

Post by Mark A. Horton KA4Y » Tue, 11 Oct 1994 13:04:56


        [ some stuff deleted ]...

Well, you said you set up your modem for "quiet" mode
and then :

:       /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

        [ some stuff deleted ]...

:      
: perform line initialization
: chat("" ATZ\r OK) called    <==================== !!!!!
: EXPECT: ([nothing])
: SEND: (ATZ^M) -- OK
: EXPECT: <30> (OK), GOT:   <====================== !!!!!

: Modem initialization failed -- aborting
: ...
: <<<>>>more of the same messages deleted

        It would appear that you have told your modem to not
        send in responses but are expecting them (the OK
        response).  Thus the chat script is never completed
        and times out after the requested 30 seconds.

        I would change your initialisation parameters for the
        modem to reflect what you really want to do.

        For an in-depth discussion of getting getty to run
        from setserial to uucp configurations, you might want
        to get the mini-howto "Getty_ps" on sunsite.unc.edu.

--
"Linux!     Guerrilla UNIX Development     Venimus, Vidimus, Dolavimus."
------------------------------------------------------------




 
 
 

getty/modem GURU help

Post by Gregory Trubetsk » Sun, 16 Oct 1994 10:35:01


Here is what I have:

ALTLOCK=cua1
ALTLINE=cua1
INITLINE=cua1

#Not sure what the above lines do - I think they are a waste cince this
#is for ttyS1 anyway. As a matter of fact I'm gonna remove them after I
#finish typing this... :)

# timeout to disconnect if idle...
TIMEOUT=60

INIT="" \d+++\dAT\r OK\r\n ATH0\r OK\r\n AT\sE1\sQ0\sS0=1\r OK\r\n

#Notice that I set the modem to autoanswer, as I dont' understand the
#getty documentation that sais you should set it off, the wait for RING

DELAY=1
#This line is not really needed either, I think.

--
----------------------------------------------------------------

----------------------------------------------------------------

 
 
 

1. HELP: null modem and getty

Hello everyone,

 I have a problem with my Linux and a Win95 PC box I want to use to log
in using a null modem. I had the setup working on my old Slackware
install but I have installed Red Hat 5.2 and I just can't get it to
work... (yeah, yeah, I should have kept a copy of my config files)

 Anyhow, here are the files I have as of now:

/etc/inittab
t1:2345:respawn:/sbin/getty ttyS1 DT9600 vt100

/etc/gettydefs

 In fact, I did get this to work for a few minutes but it crashed during
a file transfer and it now refuses to work. I have cheked the running
processes and the getty is there. If I kill it and restart it, I will
see the login prompt show up on the Win95 box but I can't enter
anything. Do I need any other files in /etc/default to get ttyS1 to
work?

 I have double-checked and this is not a problem with the echo setting,
I have tried to do a login even tough nothing happens and I can't get
the HD to spin. The FAQs did mention to similar problems and refered to
the IRQ settings but I know for a fact this was not changed since my
Slackware install.

 Any help will be appreciated.
 Regards,
 Patrick

2. Ne2000: Where do I start?

3. Setting getty to answer the modem - help!

4. su to USER and execute commands as USER

5. Help with incoming modems and getty urgently requested!

6. Upgrade problems.

7. help setting up getty for remote modem logins ans sliplogin

8. Compatability and cheap computers.

9. Help: getty with PPP and Maxtech modem

10. HELP: need an auto-answering modem with a getty

11. getty/uugetty looking for CLOCAL on modem port, plse help.

12. Getty/Modem help needed

13. Problem with TTY - GETTY with a modem - Help needed!