*BSD News Article 79762


Return to BSD News archive

#! rnews 2001 bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!howland.erols.net!news.mathworks.com!uunet!in1.uu.net!interaccess!usenet
From: Jay Kuri <jay@interaccess.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: bsd, ppp, chat, a lamers question
Date: Wed, 02 Oct 1996 13:00:14 -0500
Organization: InterAccess, Chicago's best Internet Service Provider
Lines: 28
Message-ID: <3252ADAE.41C67EA6@interaccess.com>
References: <32513dd2.15256087@news.hol.gr>
NNTP-Posting-Host: oneway.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0 (X11; I; FreeBSD 2.1.5-RELEASE i386)
CC: sergios@prometheus.hol.gr

> Now the problem is : it seems i cannot use the chat correctly since my
> provider is actually a BBS and one must pass a lot of ansi screens and
> other shit* stuff before the ppp interface starts. with minicom/pppd
> in linux it was quite easy. can the ppp script in bsd be configured
> like this? do I miss the obvious?
    This is actually pretty easy to do.  The trick is figuring out how
chat
scripts work.  Basically, if you have this chat script:

"TIMEOUT 5 ogin:-\\r-ogin: username word: password"

It sets the timeout to 5 seconds.  waits for the string "ogin:" if it
doesn't recieve it in 5 seconds, sends a carriage return "\\r", and
waits again for "ogin:" if it gets it, it sends the string "username". 
It then waits (again, up to 5 seconds) for "word:" when it recieves it,
it sends the string "password".  Basically its "TIMEOUT #  expect send
expect send expect send ...".
You can get it to navigate through the BBS system's menus by using the
expect - send sequences.
For a complete description of how chat scripts work, look at man chat.

Hope this helps, let me know how it goes,

Jay K.
 
---
Everyone can be taught to sculpt:  Michelangelo would have had to be 
taught how not to.  So it is with the great programmers.