home *** CD-ROM | disk | FTP | other *** search
- #
- # initialize modem
- #
- output atz\13
- input 10 OK\n
- #
- # set modem to indicate DCD
- #
- output at&c1&d2\13
- input 10 OK\n
-
- #
- # send phone number
- %tries = 0
- %connect = 0
- repeat
- %tries = %tries +1
- $result = "Initialize"
- display "Try #:" %tries \r
- # Edit the xxx-xxx-xxxx to be the access number assigned to you by slip.net
- # *** ENTER PHONE NUMBER HERE***
- output atdt1-217-792-2777\13
- #
- %timeout = [read 45 $result]
- %timeout = [read 45 $result]
- # check if timed out
- # this could be modem failure , or service
- # took more than a minute to respond etc.
- if %timeout = 0
- display \n
- display "ERROR Timed-out. Hangup line." \n
- output +++\r
- output ath0\r
- %connect = 0
- # abort
- end
-
- # Retries Expired
- # Make this number as large as you want
- if %tries = 50
- display "VHT ( Very High Traffic)." \7\n
- display "Trying some other time." \n
- output +++\r
- output ath0\r
- display "Aborting." \n
- abort
- end
-
- # Check if Modem Returns BUSY
- # does not work with $result = "CONNECT" ??
- # but since usually the only two conditions
- # are busy and not busy , this will work
- # NO CARRIER for example will pass through but
- # will be traped in the wait 30 dcd command below
- if $result = "BUSY"
- # display "This number is Busy." \n
- %connect = 0
- display "Waiting for a while." \n
- sleep 10
- else
- display "Trying to Connect."\7\n
- %connect = 1
- end
- until %connect = 1
-
- # now we are connected.
- # # commented out next 2 lines - TED 11/05/94
- #input 60 CONNECT
- #display connected
- #
- # wait till it's safe to send because some modem's hang up
- # if you transmit during the connection phase
- #
- wait 30 dcd
- #
- # wait for the username prompt
- #
- input 30 login:
- #
- # Edit "user_name" to be your slip login id assigned to you by slip.net
- # (Be sure to put a 'S' first!)
- # ***ENTER USERNAME HERE***
- output Suser_name\13
- #
- # and the password
- #
- input 30 Password:
- #
- # edit "your_password" to be your slip login password.
- # ***ENTER PASSWORD HERE***
- output your_password\13
- #
- # we are now logged in
- #
- # wait for the address string
- #
- input 30 to
- #
- # parse address
- #
- address 30
- #
- # we are now connected, logged in and in slip mode.
- #
- display \n
- display Connected. Your IP address is \i.\n
- online
-