SUMMARY - dial-in/dial-out on the same port - SUMMARY

SUMMARY - dial-in/dial-out on the same port - SUMMARY

Post by Vladimir Stavitsk » Mon, 22 Jul 1996 04:00:00

Hi, everybody.

it seems that finally i got this combination of getty_ps, ppp
and seyon running stable; obviously, the most serious problem
was to get dial-in working with dial-out on the same line.

As i mentioned before, i have set this up 2 times already on
linux and 2 times on Sparc previously; still every time i have
to do it again - i have to spend at least couple of days on and
off to get it working. This time it was no exception.

I got help from a number of people on the net as well as from
some friends. I am posting this in order to share the information
i collected. Unfortunately, i do not have any confidence this should
be of much help to other people, since most of the tweaking was done
to my modem, and for some other modem brand this may be of no
or little use.

First - my hardware & software.

I run Slackware with 1.2.8 kernel and getty_ps 2.0.7i on HP Vectra
486DX/33. My modem is DataLink (noname) external 28.8 on COM2. The
modem is pretty good; i run ppp for more than a year on this setup
with no problems whatsoever.

The easy part goes first (i am posting here only what i have changed):

I. getty related stuff:

====== /etc/rc.d/rc.serial ================
${SETSERIAL} /dev/cua1 ${AUTO_IRQ} skip_test autoconfig spd_hi

====== /etc/gettydefs =====================

-- # 38400 autobauding Modem entry with hard flow control








============= /etc/inittab =================

S1:45:respawn:/sbin/uugetty ttyS1 38400 vt100

============= /etc/default/uugetty.ttyS1 ============


# timeout to disconnect if idle...

# modem initialization string... Sets the modem to disable auto-answer
# format: <expect> <send> ... (chat sequence)
INIT="" \d+++\dAT&F\r OK\r\n ATM1E1Q0&C1&Q5&D2V1X4L1S0=0\r OK\r\n

# waitfor string... if this sequence of characters is received over the
# a call is detected.

# this line is the connect chat sequence.  This chat sequence is
# after the WAITFOR string is found.  The \A character automatically
# the baudrate to the characters that are found, so if you get the
# CONNECT 2400, the baud rate is set to 2400 baud.
# format: <expect> <send> ... (chat sequence)

# this line sets the time to delay before sending the login banner

II. ppp related files:

This is also easy; i find Al Longyear's ppp to be an exceptional quality
very easy to handle. Thanks a lot, Al.

========== options file for my ISP ================
# I have static ip address with my ISP; here is my "options" file
# (replace IP with your IP address):
# /prod/comm is just my own place where i keep whole lot of
# related junk;
escape FF
connect /prod/comm/

============= /prod/comm/ ==================
# again, replace IP with your (static) IP;
# i have /etc/resolv.conf set up as a link to /tmp/resolv.conf
# replase DT# with your ISP phone #;
# replace xyz with your login, abc with your password.
cp /prod/comm/resolv.isp /tmp/resolv.conf
chmod 666 /tmp/resolv.conf
/usr/lib/ppp/chat -v ABORT "NO CARRIER" ABORT BUSY "" ATZ OK
CONNECT "" sername: xyz word: abc lection: 1 ost IP

============= /etc/ppp/options ======================

# this is to set pppd when it is spawned by uugetty;
escape FF

III. Modem settings:

This is most difficult part; i do not really understand certain things
but nevertheless i will try to give some info.

The most important things for both dial-in and out are E1 and Q0; i
think they
are required on all modems. Then, for INIT string in uugetty i had to
start with
AT&F - without that my dial-out would fail when getty was listening on
the port.
In chat scripts when dialing out i found ATZ should be issued, which is
obvious, i think.

Another thing in uugetty INIT is &Q5&D2; Nels Lindquist recommended &Q0,
but it
does not work for my modem.

IV. Miscellanious.

Another thing i was able to setup is ppp connection with a call-back
terminal server; it is very easy, and i am mentioning that only 'cause
i used to think this is related to getty, which is wrong; if you have
to set up your ppp to answer callback - you do not need getty at all.

What you need is in your chat script you have to set up auto answer
(S0=1); then you have to send whatever they (terminal server) need
to identify you and just stay in chat expecting RING; when you get
it - just continue chat as if nothing happened.

Also, please note that i set S0=0 in getty INIT; i use WAITFOR=RING
and it works like a charm; somehow i do not like autoanswer enabled.

V. Remaining problems.

For some reason it takes close to 30 sec for getty to respawn; may
be it is because i use lock files AND kernel synch mechanism
(hup_notify); if i try to dial out befor getty is ready - dial out
fails; i will play with it later, if i have time.

Most of the stuff above i got from various FAQ, HOWTO etc over many
years, so it is not something new; i am posting this hoping it would
save some time to other people. Enjoy!

        ... occurrences like this will be few and far between ...

        ... occurrences like this will be few and far between ...



1. Summary: dialing in without locking out dial-out

I got a lot of responses to my question; for that, many thanks.  Here is
a brief summary of what I learned:

1) Use getty_ps.  I already was, and I think I said so, but some people
        apparently wanted me to use it twice.

2) One person suggested I use mgetty (mgetty+sendfax).  Although I may
        try it in the future, I found the documentation left much to
        be desired.

3) My main problem seemed to be an abstraction violation: my
        /etc/default/uugetty.ttyS1 file had the INITLINE as modem
        and the ALTLOCK and ALTLINE as cua1.  As long as I have no
        references to cua1 at all, only to modem (which, in case you
        didn't know, is just a link to cua1) everything worked.
        Stupidly, I had some lines refer to one, and some to the other.
        I banged a sausage against my head for that one, you may well

Other than the above, just following the instructions with getty_ps seemed
to pull me through.

Good luck, all.


                                                        | assume this .sig
DISCLAIMER: I hereby claim the city of Dis as my own.   | is already funny.

2. blackcat linux

3. Trouble using same port for dial-in/dial-out

4. Bad experiences with AIX mirroring?

5. Problems with dialing out when dial-ins are enabled

6. AnswerBook docviewer for X-terminal

7. Modem Problems: dial-out is ok/dial-in is not ok (Solaris 2.6)

8. signal handling

9. PPP-Device fuer Dial-IN UND Dial-OUT ?

10. What does it take to dial-out / dial-in dependably?

11. PPP problems with multiport dial-in/dial-out server

12. Dial-in & Dial-out...Need some advice...