PPP & mgetty problem ???
William Theodore Woo (willwoo@ee.ubc.ca)
Sat, 7 Sep 1996 00:36:08 +0200
On Fri, 6 Sep 1996, Raphael Wegmann wrote:
> William Theodore Woo wrote:
> >
> > Hi,
> >
> > I'd installed PPP client (dial-out) on my Linux box a long time ago. It
> > worked fine and recently I'd explored with the possibility of setting my
> > Linux box as a PPP server. However, my Linux box is not able to use that
> > same modem as dial-out anymore.
> >
>
> I had the same problem with mgetty and pppd, and found out, that it
> works if
> you use the same device for dialing out (/dev/ttyS?) and make sure the
> lockfiles
> are made correct: the getty process has to find the pppd-lockfile and
> visa-verse.
>
> First you have to make sure the lockfiles are all in the same directory.
> So link all those lock-dirs to one (/var/(spool/)lock(s) and
> /var/spool/uucp).
>
> One problem I couldn't solve so far is that pppd seems to lock the
> device too late.
> What I do is I lock the device manually from ppp-on.
> "echo $$ > /usr/spool/locks/LCK..ttyS?"
> To make sure that the lock-file doesn't become a stale lock (when ppp-on
> exits too early) I start the pppd with the detatch option.
>
> --
> Raphael Wegmann
> \ snail: Adolfstorgasse 2a/1, A-1130 Wien phone: +43-1-8763850
> o/'\__ private emails to: wegmann@ophelia.tuwien.ac.at
> <\--' \ business emails: Raphael_Wegmann@non-hp-austria-om1.om.hp.com
> "> | "Linux 2.0 lets you reach the top"
>
I finally had it solved (well, kind of :) ). I have both PPP and mgetty
looking at the same lock (/var/lock/ttyS3). I can now dial out and in with
the same modem line. However, when I'm using the modem to dial out to my
ISP, mgetty will complain about having "tcsetattr" error (in tio.c).
Besides, whenever mgetty refreshes and checks the line, it will dump a lot
of FATAL error messages to the console saying line terminated and
"respawning too fast ... suspend for 5 mins (something like this)". It can
accept dial-ins as well, but with similar warnings. Whenever mgetty tries
to do something (be it creating a lock or removing one), it will dump a
lot of complain messages.
But on the PPP aspect, it still routes correctly and does everything I
want. Is there anyone who has seen those warnings before? Or anyone knows
the remedy for it? Or I should simply ignore them (doesn't sound too
healthy!) ?
BTW, I'm using an internal USR sportster 14.4k FAX/DATA modem on com4,
with Linux kernel 1.2.13. I'm giving a '-D' data-only attribute to the
modem. I want to iron out the stuffs one at a time. Should I set the FAX
attributes as well so that it will work fine?
Below is a section of the /tmp/log_mg.ttyS3 file
--
09/06 15:08:05 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:08:06 yS3 check for lockfiles
09/06 15:08:06 yS3 checklock: stat failed, no file
09/06 15:08:06 yS3 locking the line
09/06 15:08:06 yS3 makelock(ttyS3) called
09/06 15:08:06 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:08:06 yS3 lock made
09/06 15:08:06 yS3 lowering DTR to reset Modem
09/06 15:08:07 yS3 tss: set speed to 38400 (017)
09/06 15:08:07 yS3 tio_set_flow_control( HARD )
09/06 15:08:07 yS3 waiting for line to clear (VTIME), read:
09/06 15:08:07 yS3 send: ATH0&C1[0d]
09/06 15:08:07 yS3 waiting for ``OK''
09/06 15:08:07 yS3 got: ATH0&C1[0d][0d][0a]OK ** found **
09/06 15:08:07 yS3 waiting for line to clear (VTIME), read: [0d][0a]
09/06 15:08:07 yS3 removing lock file
09/06 15:08:07 yS3 waiting...
09/06 15:10:02 yS3 checking lockfiles, locking the line
09/06 15:10:02 yS3 makelock(ttyS3) called
09/06 15:10:02 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:02 yS3 lock made
09/06 15:10:02 yS3 waiting for ``RING''
09/06 15:10:02 yS3 got: ATZ[0d][0d][0a]OK[0d][0a]
09/06 15:10:12 yS3 timeout in chat script, waiting for `RING'
09/06 15:10:12 yS3 huh? Junk on the line?
09/06 15:10:12 yS3 removing lock file
--
09/06 15:10:13 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:13 yS3 check for lockfiles
09/06 15:10:13 yS3 checklock: stat failed, no file
09/06 15:10:13 yS3 locking the line
09/06 15:10:13 yS3 makelock(ttyS3) called
09/06 15:10:13 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:13 yS3 lock made
09/06 15:10:13 yS3 lowering DTR to reset Modem
09/06 15:10:14 yS3 tss: set speed to 38400 (017)
09/06 15:10:14 yS3 tio_set_flow_control( HARD )
09/06 15:10:14 yS3 waiting for line to clear (VTIME), read:
09/06 15:10:14 yS3 send: ATH0&C1[0d]
09/06 15:10:14 yS3 waiting for ``OK''
09/06 15:10:14 yS3 got: [0d][0a]ATDT473-9747 pet[0d][0a]
09/06 15:10:34 yS3 timeout in chat script, waiting for `OK'
09/06 15:10:34 yS3 tcsetattr failed: Invalid argument
09/06 15:10:34 yS3 init chat timed out, trying force-init-chat
09/06 15:10:34 yS3 tcsetattr failed: Invalid argument
09/06 15:10:34 yS3 send: \d[10][03]\d\d\d+++\d\d\d[0d]\dATQ0V1H0[0d]
09/06 15:10:38 yS3 waiting for ``OK''
09/06 15:10:38 yS3 got:
09/06 15:10:38 yS3 do_chat: error in read(): Try again
09/06 15:10:38 yS3 tcsetattr failed: Invalid argument
09/06 15:10:38 yS3 init chat failed, exiting...: Interrupted system call
09/06 15:10:38 yS3 removing lock file
--
09/06 15:10:38 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:38 yS3 check for lockfiles
09/06 15:10:38 yS3 checklock: stat failed, no file
09/06 15:10:38 yS3 locking the line
09/06 15:10:38 yS3 makelock(ttyS3) called
09/06 15:10:38 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:38 yS3 lock made
09/06 15:10:39 yS3 lowering DTR to reset Modem
09/06 15:10:39 yS3 tcsetattr failed: Invalid argument
09/06 15:10:39 yS3 tcsetattr failed: Invalid argument
09/06 15:10:39 yS3 tss: set speed to 38400 (017)
09/06 15:10:39 yS3 tio_set_flow_control( HARD )
09/06 15:10:39 yS3 tcsetattr failed: Invalid argument
09/06 15:10:39 yS3 cannot set TIO: Invalid argument
09/06 15:10:39 yS3 mg_init_device failed, trying again
09/06 15:10:39 yS3 lowering DTR to reset Modem
09/06 15:10:39 yS3 tcsetattr failed: Invalid argument
09/06 15:10:40 yS3 tcsetattr failed: Invalid argument
09/06 15:10:40 yS3 tss: set speed to 38400 (017)
09/06 15:10:40 yS3 tio_set_flow_control( HARD )
09/06 15:10:40 yS3 tcsetattr failed: Invalid argument
09/06 15:10:40 yS3 cannot set TIO: Invalid argument
09/06 15:10:40 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:40 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:40 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:40 yS3 check for lockfiles
09/06 15:10:40 yS3 checklock: no active process has lock, will remove
09/06 15:10:40 yS3 locking the line
09/06 15:10:40 yS3 makelock(ttyS3) called
09/06 15:10:40 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:40 yS3 lock made
09/06 15:10:41 yS3 lowering DTR to reset Modem
09/06 15:10:41 yS3 tcsetattr failed: Invalid argument
09/06 15:10:41 yS3 tcsetattr failed: Invalid argument
09/06 15:10:41 yS3 tss: set speed to 38400 (017)
09/06 15:10:41 yS3 tio_set_flow_control( HARD )
09/06 15:10:41 yS3 tcsetattr failed: Invalid argument
09/06 15:10:41 yS3 cannot set TIO: Invalid argument
09/06 15:10:41 yS3 mg_init_device failed, trying again
09/06 15:10:41 yS3 lowering DTR to reset Modem
09/06 15:10:41 yS3 tcsetattr failed: Invalid argument
09/06 15:10:42 yS3 tcsetattr failed: Invalid argument
09/06 15:10:42 yS3 tss: set speed to 38400 (017)
09/06 15:10:42 yS3 tio_set_flow_control( HARD )
09/06 15:10:42 yS3 tcsetattr failed: Invalid argument
09/06 15:10:42 yS3 cannot set TIO: Invalid argument
09/06 15:10:42 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:42 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:42 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:42 yS3 check for lockfiles
09/06 15:10:42 yS3 checklock: no active process has lock, will remove
09/06 15:10:42 yS3 locking the line
09/06 15:10:42 yS3 makelock(ttyS3) called
09/06 15:10:42 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:42 yS3 lock made
09/06 15:10:43 yS3 lowering DTR to reset Modem
09/06 15:10:43 yS3 tcsetattr failed: Invalid argument
09/06 15:10:43 yS3 tcsetattr failed: Invalid argument
09/06 15:10:43 yS3 tss: set speed to 38400 (017)
09/06 15:10:43 yS3 tio_set_flow_control( HARD )
09/06 15:10:43 yS3 tcsetattr failed: Invalid argument
09/06 15:10:43 yS3 cannot set TIO: Invalid argument
09/06 15:10:43 yS3 mg_init_device failed, trying again
09/06 15:10:43 yS3 lowering DTR to reset Modem
09/06 15:10:43 yS3 tcsetattr failed: Invalid argument
09/06 15:10:44 yS3 tcsetattr failed: Invalid argument
09/06 15:10:44 yS3 tss: set speed to 38400 (017)
09/06 15:10:44 yS3 tio_set_flow_control( HARD )
09/06 15:10:44 yS3 tcsetattr failed: Invalid argument
09/06 15:10:44 yS3 cannot set TIO: Invalid argument
09/06 15:10:44 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:44 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:44 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:44 yS3 check for lockfiles
09/06 15:10:44 yS3 checklock: no active process has lock, will remove
09/06 15:10:44 yS3 locking the line
09/06 15:10:44 yS3 makelock(ttyS3) called
09/06 15:10:44 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:44 yS3 lock made
09/06 15:10:45 yS3 lowering DTR to reset Modem
09/06 15:10:45 yS3 tcsetattr failed: Invalid argument
09/06 15:10:45 yS3 tcsetattr failed: Invalid argument
09/06 15:10:45 yS3 tss: set speed to 38400 (017)
09/06 15:10:45 yS3 tio_set_flow_control( HARD )
09/06 15:10:45 yS3 tcsetattr failed: Invalid argument
09/06 15:10:45 yS3 cannot set TIO: Invalid argument
09/06 15:10:45 yS3 mg_init_device failed, trying again
09/06 15:10:45 yS3 lowering DTR to reset Modem
09/06 15:10:45 yS3 tcsetattr failed: Invalid argument
09/06 15:10:46 yS3 tcsetattr failed: Invalid argument
09/06 15:10:46 yS3 tss: set speed to 38400 (017)
09/06 15:10:46 yS3 tio_set_flow_control( HARD )
09/06 15:10:46 yS3 tcsetattr failed: Invalid argument
09/06 15:10:46 yS3 cannot set TIO: Invalid argument
09/06 15:10:46 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:46 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:46 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:46 yS3 check for lockfiles
09/06 15:10:46 yS3 checklock: no active process has lock, will remove
09/06 15:10:46 yS3 locking the line
09/06 15:10:46 yS3 makelock(ttyS3) called
09/06 15:10:46 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:46 yS3 lock made
09/06 15:10:46 yS3 lowering DTR to reset Modem
09/06 15:10:46 yS3 tcsetattr failed: Invalid argument
09/06 15:10:47 yS3 tcsetattr failed: Invalid argument
09/06 15:10:47 yS3 tss: set speed to 38400 (017)
09/06 15:10:47 yS3 tio_set_flow_control( HARD )
09/06 15:10:47 yS3 tcsetattr failed: Invalid argument
09/06 15:10:47 yS3 cannot set TIO: Invalid argument
09/06 15:10:47 yS3 mg_init_device failed, trying again
09/06 15:10:47 yS3 lowering DTR to reset Modem
09/06 15:10:47 yS3 tcsetattr failed: Invalid argument
09/06 15:10:47 yS3 tcsetattr failed: Invalid argument
09/06 15:10:47 yS3 tss: set speed to 38400 (017)
09/06 15:10:47 yS3 tio_set_flow_control( HARD )
09/06 15:10:47 yS3 tcsetattr failed: Invalid argument
09/06 15:10:47 yS3 cannot set TIO: Invalid argument
09/06 15:10:47 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:47 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:48 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:48 yS3 check for lockfiles
09/06 15:10:48 yS3 checklock: no active process has lock, will remove
09/06 15:10:48 yS3 locking the line
09/06 15:10:48 yS3 makelock(ttyS3) called
09/06 15:10:48 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:48 yS3 lock made
09/06 15:10:48 yS3 lowering DTR to reset Modem
09/06 15:10:48 yS3 tcsetattr failed: Invalid argument
09/06 15:10:49 yS3 tcsetattr failed: Invalid argument
09/06 15:10:49 yS3 tss: set speed to 38400 (017)
09/06 15:10:49 yS3 tio_set_flow_control( HARD )
09/06 15:10:49 yS3 tcsetattr failed: Invalid argument
09/06 15:10:49 yS3 cannot set TIO: Invalid argument
09/06 15:10:49 yS3 mg_init_device failed, trying again
09/06 15:10:49 yS3 lowering DTR to reset Modem
09/06 15:10:49 yS3 tcsetattr failed: Invalid argument
09/06 15:10:49 yS3 tcsetattr failed: Invalid argument
09/06 15:10:49 yS3 tss: set speed to 38400 (017)
09/06 15:10:49 yS3 tio_set_flow_control( HARD )
09/06 15:10:49 yS3 tcsetattr failed: Invalid argument
09/06 15:10:49 yS3 cannot set TIO: Invalid argument
09/06 15:10:49 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:49 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:49 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:49 yS3 check for lockfiles
09/06 15:10:49 yS3 checklock: no active process has lock, will remove
09/06 15:10:49 yS3 locking the line
09/06 15:10:49 yS3 makelock(ttyS3) called
09/06 15:10:49 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:49 yS3 lock made
09/06 15:10:50 yS3 lowering DTR to reset Modem
09/06 15:10:50 yS3 tcsetattr failed: Invalid argument
09/06 15:10:50 yS3 tcsetattr failed: Invalid argument
09/06 15:10:50 yS3 tss: set speed to 38400 (017)
09/06 15:10:50 yS3 tio_set_flow_control( HARD )
09/06 15:10:50 yS3 tcsetattr failed: Invalid argument
09/06 15:10:50 yS3 cannot set TIO: Invalid argument
09/06 15:10:50 yS3 mg_init_device failed, trying again
09/06 15:10:50 yS3 lowering DTR to reset Modem
09/06 15:10:50 yS3 tcsetattr failed: Invalid argument
09/06 15:10:51 yS3 tcsetattr failed: Invalid argument
09/06 15:10:51 yS3 tss: set speed to 38400 (017)
09/06 15:10:51 yS3 tio_set_flow_control( HARD )
09/06 15:10:51 yS3 tcsetattr failed: Invalid argument
09/06 15:10:51 yS3 cannot set TIO: Invalid argument
09/06 15:10:51 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:51 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:51 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:51 yS3 check for lockfiles
09/06 15:10:51 yS3 checklock: no active process has lock, will remove
09/06 15:10:51 yS3 locking the line
09/06 15:10:51 yS3 makelock(ttyS3) called
09/06 15:10:51 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:51 yS3 lock made
09/06 15:10:52 yS3 lowering DTR to reset Modem
09/06 15:10:52 yS3 tcsetattr failed: Invalid argument
09/06 15:10:52 yS3 tcsetattr failed: Invalid argument
09/06 15:10:52 yS3 tss: set speed to 38400 (017)
09/06 15:10:52 yS3 tio_set_flow_control( HARD )
09/06 15:10:52 yS3 tcsetattr failed: Invalid argument
09/06 15:10:52 yS3 cannot set TIO: Invalid argument
09/06 15:10:52 yS3 mg_init_device failed, trying again
09/06 15:10:52 yS3 lowering DTR to reset Modem
09/06 15:10:52 yS3 tcsetattr failed: Invalid argument
09/06 15:10:53 yS3 tcsetattr failed: Invalid argument
09/06 15:10:53 yS3 tss: set speed to 38400 (017)
09/06 15:10:53 yS3 tio_set_flow_control( HARD )
09/06 15:10:53 yS3 tcsetattr failed: Invalid argument
09/06 15:10:53 yS3 cannot set TIO: Invalid argument
09/06 15:10:53 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:53 yS3 cannot get terminal line, exiting: Invalid argument
--
09/06 15:10:53 yS3 mgetty: experimental test release 0.99-Aug07
09/06 15:10:53 yS3 check for lockfiles
09/06 15:10:53 yS3 checklock: no active process has lock, will remove
09/06 15:10:53 yS3 locking the line
09/06 15:10:53 yS3 makelock(ttyS3) called
09/06 15:10:53 yS3 do_makelock: lock='/var/lock/LCK..ttyS3'
09/06 15:10:53 yS3 lock made
09/06 15:10:53 yS3 lowering DTR to reset Modem
09/06 15:10:53 yS3 tcsetattr failed: Invalid argument
09/06 15:10:54 yS3 tcsetattr failed: Invalid argument
09/06 15:10:54 yS3 tss: set speed to 38400 (017)
09/06 15:10:54 yS3 tio_set_flow_control( HARD )
09/06 15:10:54 yS3 tcsetattr failed: Invalid argument
09/06 15:10:54 yS3 cannot set TIO: Invalid argument
09/06 15:10:54 yS3 mg_init_device failed, trying again
09/06 15:10:54 yS3 lowering DTR to reset Modem
09/06 15:10:54 yS3 tcsetattr failed: Invalid argument
09/06 15:10:54 yS3 tcsetattr failed: Invalid argument
09/06 15:10:54 yS3 tss: set speed to 38400 (017)
09/06 15:10:54 yS3 tio_set_flow_control( HARD )
09/06 15:10:54 yS3 tcsetattr failed: Invalid argument
09/06 15:10:54 yS3 cannot set TIO: Invalid argument
09/06 15:10:54 yS3 mg_init_device failed, exiting: Invalid argument
09/06 15:10:54 yS3 cannot get terminal line, exiting: Invalid argument
Regards
____________________________________________________________________________
William Theodore Woo
Dept. of Electrical Engineering | e-mail : willwoo@ee.ubc.ca
University of British Columbia | phone : (604) 822-5084
Vancouver B.C. CANADA | homepage : http://www.ee.ubc.ca/~willwoo
____________________________________________________________________________