Subject: dial-up setup
To: None <netbsd-help@netbsd.org>
From: Fusie Zhang <fzhang@cs.nmsu.edu>
List: netbsd-help
Date: 05/17/1999 15:57:55
i am trying to use Bob Nestor's files (downloaded from "www.macbsd.com") to set 
up dial up from my modem in an i386 box. i used to have this running. due to a 
recent crash i had to reinstall NetBSD(1.4 this time). the modem was used to be 
detected as a Boca pnp isa modem. now all i see from the dmesg message is com3 
at isapnp0. i don't know if this should cause any problems. i include here part 
of the dmesg message and the scripts i used for the dial up.
...
joy0: joystick not connected
com2 at isapnp0 port 0x3e8/8 irq 9: ns16550a, working fifo
apm0 at mainbus0: Power Management spec V1.1 (slowidle)
apm0: A/C state: on
...

chat-script:
#!/bin/sh -x
MODEM_INIT="AT&FE1V1X4&C1&D2S0=0"
#
# Crack the argument string and get the phone number and optionally
#  the account username.
#
NUMBER=`echo $1 | /usr/bin/awk '{print $1}'`
LOGIN=`echo $1 | /usr/bin/awk '{print $2}'`
#
# If LOGIN name is not blank it means we're going to attempt to
#  connect to a Terminal Server using a Login protocol. In that
#  case we need to extract the account password from the pap-secrets
#  case we need to extract the account password from the pap-secrets
#  file.
#
if [ -n "${LOGIN}" ]; then
     PASSWD=`/usr/bin/grep ${LOGIN} /etc/ppp/pap-secrets | /usr/bin/awk '{print 
$3}'`
fi
TMP="/tmp/${$}"
#
rm -f ${TMP}
umask 077
echo 'ABORT BUSY' >${TMP}
echo 'ABORT "NO CARRIER"' >>${TMP}
echo 'ABORT "NO DIAL"' >>${TMP}
echo 'TIMEOUT 10' >>${TMP}
echo '"" AT' >>${TMP}
echo 'OK ATZ' >>${TMP}
if [ -n "${MODEM_INIT}" ]; then
    echo "OK ${MODEM_INIT}" >>${TMP}
fi
echo "OK ATDT${NUMBER}" >>${TMP}
echo 'TIMEOUT 60' >>${TMP}
echo 'CONNECT ""' >>${TMP}
if [ -n "${MODEM_INIT}" ]; then
    echo "OK ${MODEM_INIT}" >>${TMP}
fi
echo "OK ATDT${NUMBER}" >>${TMP}
echo 'TIMEOUT 60' >>${TMP}
echo 'CONNECT ""' >>${TMP}
#
# This section might require some hand tweeking to deal with the
#  prompt strings received from the Terminal Server during Login
#  and what needs to be sent to bring up the PPP link.  The default
#  here assumes the Server will prompt for Username with "Username:"
#  and Password with "Password:".  Following validation the PPP link
#  is started with the "ppp" command to the Server.
#
if [ -n "${LOGIN}" ]; then
    echo "name:-\r-name: $LOGIN" >>${TMP}
    echo "word: $PASSWD" >>${TMP}
    echo "ppp" >>${TMP}
fi
#
# Now invoke the script we just built
#
/usr/sbin/chat -f ${TMP}

startup script:
tty01 57600     # modem port and speed
connect '/etc/ppp/chat-script "6478695"' # connect script
welcome '/sbin/route delete default' # delete any current default routes first
ipparam "NMSU.Edu 128.123.3.5,128.123.2.19"
passive                         # wait for remote to come up
crtscts                         # use hardware flow control
defaultroute                    # add default routing when link comes up
lock                            # lock the modem port on connect
modem                           # use full modem control
noipdefault                     # no local defaults for IP addresses
nopredictor1
nobsdcomp
lcp-echo-interval 30            # ping the remote every 30 seconds
lcp-echo-failure 30             # declare link down after 30 pings fail
ipcp-accept-local               # allow remote to specify our IP address
ipcp-accept-remote              # allow remote to specify his IP address
netmask 255.255.255.0   # netmask for our assigned IP address
domain NMSU.Edu         # domain name we're connecting into
user fzhang             # account name to use to log onto remote
mtu 1500                        # maximum transmission size for link


if anybody could spend a few minutes and try to spot and prolemsome part of the 
scripts, it will help me greatly. i have tried to change the line port from 
tty00 to tty02. 
i checked the error log file. it said "illegal option -" 
when i tried to dial i did not hear the modem respond. 
also, if anybody have a HP laser jet 6 could you pls send me your printcap file 
and the filter. i tried the magic filter package, it did not work. the printer 
only printed blank pages.

Fujie Zhang
2217 Hagarty Road #12, Las Cruces, NM 88001. (505)532-8307  
131 Science Hall, NMSU, Las Cruces, NM 88003. 646-6229