Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2001 16:45:54 +0200
From:      "Dave Raven" <dave@raven.za.net>
To:        <freebsd-questions@freebsd.org>
Subject:   Kermit (and pppd)
Message-ID:  <001901c179ad$b6fb2520$1400a8c0@evolve.za.net>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hello all,

    I copied a few ppp scripts from the fBSD man pages and it uses kermit to handle the modem connections / whatever. I have created a /etc/ppp/pppserv file containing:

#!/bin/sh
ps ax |grep pppd |grep -v grep
pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'`
    if [ "X${pid}" != "X" ] ; then
            echo 'killing pppd, PID=' ${pid}
            kill ${pid}
    fi
ps ax |grep kermit |grep -v grep
pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'`
    if [ "X${pid}" != "X" ] ; then
        echo 'killing kermit, PID=' ${pid}
        kill -9 ${pid}
fi

# reset ppp interface
ifconfig ppp0 down
#ifconfig ppp0 delete
ifconfig ppp0

# enable autoanswer mode
kermit -y /etc/ppp/kermit.ans

# run ppp
pppd /dev/cuaa0 19200




My kermit.ans contains: 

set line /dev/cuaa0
set speed 19200
set file type binary
set file names literal
set win 8
set rec pack 1024
set send pack 1024
set block 3
set term bytesize 8
set command bytesize 8
set flow none

pau 1
out +++
inp 5 OK
out ATH0\13
inp 5 OK
echo \13
out ATS0=1\13   ; change this to out ATS0=0\13 if you want to disable
                    ; autoanswer mod
inp 5 OK
echo \13
exit



This should all work.
However, when I run the kermit -y kermit.ans I get these errors everytime it sends a command:

[root@chaos /etc/ppp]# sh pppserv
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
?Connection on /dev/cuaa0 is not open.
?Connection on /dev/cuaa0 is not open.
?Connection on /dev/cuaa0 is not open.
?Connection on /dev/cuaa0 is not open.

?Connection on /dev/cuaa0 is not open.
?Connection on /dev/cuaa0 is not open.

Closing /dev/cuaa0...OK
[root@chaos /etc/ppp]# 



Any ideas on why this would be happening?

Thanks in advance
--Dave
OpteqSec


[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; I copied a few ppp scripts from 
the fBSD man pages and it uses kermit to handle the modem connections / 
whatever. I have created a /etc/ppp/pppserv file containing:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#!/bin/sh<BR>ps ax |grep pppd |grep -v 
grep<BR>pid=`ps ax |grep pppd |grep -v grep|awk '{print 
$1;}'`<BR>&nbsp;&nbsp;&nbsp; if [ "X${pid}" != "X" ] ; 
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 
'killing pppd, PID=' 
${pid}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
kill ${pid}<BR>&nbsp;&nbsp;&nbsp; fi<BR>ps ax |grep kermit |grep -v 
grep<BR>pid=`ps ax |grep kermit |grep -v grep|awk '{print 
$1;}'`<BR>&nbsp;&nbsp;&nbsp; if [ "X${pid}" != "X" ] ; 
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 'killing kermit, PID=' 
${pid}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kill -9 
${pid}<BR>fi</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># reset ppp interface<BR>ifconfig ppp0 
down<BR>#ifconfig ppp0 delete<BR>ifconfig ppp0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># enable autoanswer mode<BR>kermit -y 
/etc/ppp/kermit.ans</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># run ppp<BR>pppd /dev/cuaa0 19200<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My kermit.ans contains: </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>set line /dev/cuaa0<BR>set speed 19200<BR>set file 
type binary<BR>set file names literal<BR>set win 8<BR>set rec pack 1024<BR>set 
send pack 1024<BR>set block 3<BR>set term bytesize 8<BR>set command bytesize 
8<BR>set flow none</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>pau 1<BR>out +++<BR>inp 5 OK<BR>out ATH0\13<BR>inp 
5 OK<BR>echo \13<BR>out ATS0=1\13&nbsp;&nbsp; ; change this to out ATS0=0\13 if 
you want to 
disable<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
; autoanswer mod<BR>inp 5 OK<BR>echo \13<BR>exit<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This should all work.</FONT></DIV>
<DIV><FONT face=Arial size=2>However, when I run the kermit -y kermit.ans I get 
these errors everytime it sends a command:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>[root@chaos /etc/ppp]# sh pppserv<BR>ppp0: 
flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500<BR>?Connection on /dev/cuaa0 is 
not open.<BR>?Connection on /dev/cuaa0 is not open.<BR>?Connection on /dev/cuaa0 
is not open.<BR>?Connection on /dev/cuaa0 is not open.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>?Connection on /dev/cuaa0 is not 
open.<BR>?Connection on /dev/cuaa0 is not open.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Closing /dev/cuaa0...OK<BR>[root@chaos /etc/ppp]# 
<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any ideas on why this would be 
happening?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks in advance</FONT></DIV>
<DIV><FONT face=Arial size=2>--Dave</FONT></DIV>
<DIV><FONT face=Arial size=2>OpteqSec</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT></BODY></HTML>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001901c179ad$b6fb2520$1400a8c0>