From owner-freebsd-stable@FreeBSD.ORG Fri Dec 8 10:50:48 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60C0016A40F for ; Fri, 8 Dec 2006 10:50:48 +0000 (UTC) (envelope-from michael.schuh@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BB9643CBB for ; Fri, 8 Dec 2006 10:49:37 +0000 (GMT) (envelope-from michael.schuh@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so1061790nfc for ; Fri, 08 Dec 2006 02:50:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YcAO2kG0jLavqoqEmjEj32YcgeCLjaG+ccnSzLjQnoGmRNYkTeLV1z6uBB4POilyjB6ldb/uli9KwgTKou5gP3pncdNoc3zy4+PmugGEEjuVAUGS0aVhr9egwnHHHJqST6qBJRmI9TXBNbYTVfGlV1x0oIb+RYnszquK3JEfemA= Received: by 10.49.93.13 with SMTP id v13mr85159nfl.1165575033742; Fri, 08 Dec 2006 02:50:33 -0800 (PST) Received: by 10.49.95.3 with HTTP; Fri, 8 Dec 2006 02:50:33 -0800 (PST) Message-ID: <1dbad3150612080250r2e98ac8au32c2913edd7f1f02@mail.gmail.com> Date: Fri, 8 Dec 2006 11:50:33 +0100 From: "Michael Schuh" To: "Ian Smith" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1dbad3150612061829x4fdc9140o5e13bb430534a6f3@mail.gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: chat(8) doesn't parse special strings correctly X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2006 10:50:48 -0000 Hi Ian, Hi @stable, thanks this helps me to, but it doesn't correct the error in chat :-; thank you regards michael 2006/12/7, Ian Smith : > This probably belongs in -questions, but .. > > On Thu, 7 Dec 2006, Michael Schuh wrote: > > > i update my ppp.conf to > > > > set speed 115200 > > #set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT\ > > OK-AT-OK AT%C3M0E1Q0%G1%B56000 OK \\dATDT\\T TIMEOUT 40 CONN= ECT" > > > > set dial "REPORT CONNECT ABORT BUSY ABORT NO\\sCARRIER TIMEOUT > > 5 \"\" AT\ > > OK-AT-OK AT%C3M0E1Q0%G1%B56000 OK \\dATDT\\T TIMEOUT 40 CONN= ECT" > > > > man say's this is the right way to log any answer after CONNECT like > > 46666/LANP/V.42bis..... > > But with the above configuration chat says: > > > > Dec 7 03:20:52 brenner ppp[2691]: tun0: Chat: deflink: Dial attempt 1= of 1 > > Dec 7 03:20:52 brenner ppp[2691]: tun0: Chat: Expect(30): REPORT > > Dec 7 03:20:56 brenner ppp[2691]: tun0: Phase: Signal 15, terminate. > > > > after digging in the source it seem's to me that chat doesn't really > > parse the special string "REPORT" and "ABORT" correctly, but i am not > > really sure. > > I don't know about 'REPORT', but I've always used something like: > > set log +connect +chat > set dial "ABORT BUSY ABORT NO\\sCARRIER ABORT NO\\sDIAL TIMEOUT 5 \"\" = \ > ATZ OK-ATZ-OK ATE0Q0 OK-AT-OK \\dATDT\ \T TIMEOUT 60 CONNECT \\c \\n" > > where the \\c \\n catches data till newline after the CONNECT, eg: > > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Dial attempt 1 > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Expecting: > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Sending: ATZ^M > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Expecting: OK-ATZ-OK > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Wait for (5): OK > Dec 7 01:58:42 gaia ppp[6018]: tun0: Connect: ^M > Dec 7 01:58:42 gaia ppp[6018]: tun0: Connect: OK > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Sending: ATE0Q0^M > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Expecting: OK-AT-OK > Dec 7 01:58:42 gaia ppp[6018]: tun0: Chat: Wait for (5): OK > Dec 7 01:58:42 gaia ppp[6018]: tun0: Connect: ^M > Dec 7 01:58:42 gaia ppp[6018]: tun0: Connect: ATE0Q0^M^M > Dec 7 01:58:42 gaia ppp[6018]: tun0: Connect: OK > Dec 7 01:58:44 gaia ppp[6018]: tun0: Phase: Phone: xxxxxxxx > Dec 7 01:58:44 gaia ppp[6018]: tun0: Chat: Sending: ATDTxxxxxxxx^M > Dec 7 01:58:44 gaia ppp[6018]: tun0: Chat: Expecting: CONNECT > Dec 7 01:58:44 gaia ppp[6018]: tun0: Chat: Wait for (60): CONNECT > Dec 7 01:58:44 gaia ppp[6018]: tun0: Connect: ^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: ^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: CARRIER 49333^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: ^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: PROTOCOL: LAP-M^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: ^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: COMPRESSION: V.42BIS^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: ^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: CONNECT > Dec 7 01:59:14 gaia ppp[6018]: tun0: Chat: Sending: > Dec 7 01:59:14 gaia ppp[6018]: tun0: Chat: Expecting: \n > Dec 7 01:59:14 gaia ppp[6018]: tun0: Chat: Wait for (60): \n --> > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: 49333/ARQ^M > Dec 7 01:59:14 gaia ppp[6018]: tun0: Connect: > Dec 7 01:59:15 gaia ppp[6018]: tun0: Phase: NewPhase: Authenticate > > HTH, Ian > > --=20 michael-schuh.net Michael Schuh Preu=DFenstr. 13 66111 Saarbr=FCcken phone: 0681/8319664 mobil: 0177/9738644 @: michael.schuh@gmail.com