#!/bin/sh -
#
# Connect to TIA (The Internet Adapter) on netcom
#
# Settings MUST be as follows:
#	TIA cannot use CSLIP	use 'mode SLIP' in your dip script
#	Client (local) IP:	192.0.2.1	# TIA assigned address
#	gateway (remote) IP:	192.0.2.2	# TIA assigned address
#	Netmask:		255.255.255.0
#	NNTP server:		192.0.2.3	# TIA assigned address
#	WWW, Gopher, FTP and
#	telnet			no seutp needed
#
# Notes:
#
# None of netcom's NNTP servers allows connections. You have to
# run your own 'nntpd'. For this you must use the latest 'tia'
# beta and the beta 'nntpd' from ftp://marketplace.com
#
# I've added BUSY signal handling to the example dip script
# that comes with Linux. I'm using dip 3.3.7i-uri.
# The BUSY detection of this version of dip is not 100% reliable
# but I would say, quite close to 85% :-)
#
# If you're used to running 'tin' on netcom, you should do:
#	setenv NNTPSERVER 192.0.2.3
#	tin -r
# On your local linux machine, instead, once 'tia -n -p:119 nntpd'
# is activated on the remote (netcom) side. Or if you use bash/sh
# use:
#	NNTPSERVER=192.0.2.3 tin -r
# instead.
#
# Hope this helps.
#			Anat Faigon (anat@netcom.com)
#
# Here is the call to 'dip'
#
dip -v -p SLIP tia.dip

--------  end of my 'tia' script on Linux --------
------- And here is the 'tia.dip' script: --------
#
# tia.dip	Dialup IP script for use with TIA and netcom
#

main:
  # Set netmask on sl0 to 255.255.255.0
  netmask 255.255.255.0

  # Set the desired serial port and speed.
  # You may need to change cua1 to your modem device...
  port cua1
  speed 38400

  # Reset the modem and terminal line.
  # This seems to cause trouble for some people!
  reset

# Note! "Standard" pre-defined "errlevel" values:
#	0 - OK
#	1 - CONNECT
#	2 - ERROR
#
# You can change those grep'ping for "addchat()" in *.c...

  # Prepare for dialing.
  # Note your modem may need a different init string.
  # mine is a USRobotics V.34 (28800 bps)...
  send AT&F1 S11=50 Q0 V1 E1 X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble

redial:
  # dial netcom POP #
  # This number is for the San Jose, CA POP, your milage may vary.
  send ATDT 261 4700\r
  wait BUSY 5
  if $errlvl == 0 goto busy_detected
  wait CONNECT 50
  # if $errlvl != 1 goto modem_trouble
  if $errlvl != 0 goto modem_trouble

  # We are connected.  Login to the system.
login:
  sleep 2
  send \n
  wait ogin: 20
  if $errlvl != 0 goto login_error
  # replace 'username' below with your netcom username
  send username\n

  wait ord: 20
  if $errlvl != 0 goto password_error
  # replace 'password' below with your netcom password
  send password\n
loggedin:

  # We are now logged in.
  # Substitute YOUR shell prompt below (mine is ~> )
  wait ~> 15
  if $errlvl != 0 goto prompt_error

  # TIA makes 192.0.2.2 the IP of the remote machine
  get $remote 192.0.2.2

  # Make sure 'tia' and 'nntpd' are found on netcom
  # and are executable
  send exec ./tia -n -p:119 nntpd\n

  # Set up the SLIP operating parameters.
  get $mtu 1500
  # Ensure "route add -net default netcom.com" will be done
  default

  # Say hello and fire up!
done:
  print CONNECTED local: $locip ---> remote: $rmtip
  mode SLIP
  goto exit

prompt_error:
  print TIME-OUT waiting for SLIPlogin to fire up...
  goto error

login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

password:error:
  print Trouble waiting for the Password: prompt...
  goto error

modem_trouble:
  print Trouble ocurred with the modem...
error:
  print CONNECT FAILED to $remote
  quit

busy_detected:
  print BUSY detected
  send \r
  sleep 1
  goto redial

exit:
  exit

---------------- That's all folks ------------------
Good Luck

-- 
Anat Faigon	anat@netcom.com

------ End of Forwarded Article

--
Regards,
Uri.			uri@watson.ibm.com	N2RIU
------------
<Disclaimer>


-- 
Regards,
Uri         uri@watson.ibm.com      N2RIU
-----------
<Disclamer>


