home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-11 | 4.2 KB | 222 lines | [mlts/slnk] |
- ! 11/8/92 Modified GVC TelePort Serial ARA Script
- ! for use with Stalker's CCL Modem Tool.
- !
- ! 12/3/92 Improved disconnect logic
- ! Removed login logic (Eudora now does it)
- ! Added Manual dial logic
- !
- ! 12/6/92 Changed disconnect logic to Inline
- ! (There's only one Settries var, and its used for redialing)
- !
- ! 12/18/92 Added ATZ to disconnect logic
- !
- @ANSWER
- exit -6019
- @ORIGINATE
- !
- ! Talk to the modem at 19,200 bps.
- !
- serreset 19200, 0, 8, 1
- !
- ! &f - recall factory settings
- ! &d0 - ignore DTR from DTE
- ! &k3 - Enable Hardware flow control
- ! w2 - Connect result code reports modem speed
- ! \q3 - Use RTS/CTS flow control in full-duplex mode
- ! \k0 - Enter command state but do not send break
- ! \j0 - Disable port rate adjust
- ! s7=60 - To allow for an international call
- !
- HSReset 0 0 0 0 0 0
- matchclr
- @LABEL 1
- note "Initializing the modem..." 3
- matchstr 1 4 "OK\13\10"
- write "AT&F&D2\\N3\\Q1\\J0\\G1W2\13"
- matchread 30
- note "Modem initialization failed, setting factory defaults." 3
- matchstr 1 4 "OK\13\10"
- write "AT&F&C1&D1\13"
- matchread 30
- ! Modem is not responding, abort
- jump 59
- !
- @LABEL 4
- matchclr
- ! If speaker on flag is true, turn on the speaker
- !
- pause 5
- matchstr 1 8 "OK\13\10"
- ifstr 2 6 "1"
- !Speaker Off
- write "ATM0\13"
- jump 7
- @LABEL 6
- !Speaker on low during connection after dialing
- write "ATM3L1\13"
- @LABEL 7
- matchread 30
- jump 59
- !
- ! The modem is ready so originate a call
- !
- !Initialize Retry counter
- settries 0
- @LABEL 8
- pause 5
- ! Check if Phone Number is empty
- ifstr 1 40 ""
- jump 41
- !@LABEL 40
- !ask 0 "Please enter Phone Number"
- !note "Dialing ^*" 3
- !write "ATDT^*\13"
- !jump 42
- @LABEL 40
- ask 1 "No Phone Number specified!\13Dial call manually and click OK."
- write "ATS7=120X1D\13"
- note "Listening for remote modem..."
- jump 42
- @LABEL 41
- note "CCL Script Rev .74\13Dialing ^1" 3
- write "ATDT^1\13"
- @LABEL 42
- !
- @LABEL 9
- matchstr 1 11 "CONNECT 1200\13\10"
- matchstr 2 12 "CONNECT 2400\13\10"
- matchstr 3 13 "CONNECT 4800\13\10"
- matchstr 4 14 "CONNECT 7200\13\10"
- matchstr 5 17 "CONNECT 9600\13\10"
- matchstr 6 18 "CONNECT 12000\13\10"
- matchstr 7 19 "CONNECT 14400\13\10"
- matchstr 8 51 "NO CARRIER\13\10"
- matchstr 9 50 "ERROR\13\10"
- matchstr 10 52 "NO DIAL TONE\13\10"
- matchstr 11 53 "BUSY\13\10"
- matchstr 12 54 "NO ANSWER\13\10"
- matchread 600
- note "No Connection, Retrying..."
- !
- @LABEL 10
- pause 30
- !Hangup first
- jsr 60
- ! Dial the number again
- inctries
- iftries 3 59
- jump 8
- !
- !
- ! Notice that all we do for different connect speeds is issue a
- ! "Communicating at" message. Remember, we locked the interface speed
- ! to 19,200 bps so we don't want to reset the serial speed after we connect.
- !
- @LABEL 11
- note "Communicating at 1200 bps." 2
- jump 15
- @LABEL 12
- note "Communicating at 2400 bps." 2
- jump 15
- @LABEL 13
- note "Communicating at 4800 bps." 2
- jump 15
- @LABEL 14
- note "Communicating at 7200 bps." 2
- jump 15
- @LABEL 17
- note "Communicating at 9600 bps." 2
- jump 15
- @LABEL 18
- note "Communicating at 12000 bps." 2
- jump 15
- @LABEL 19
- note "Communicating at 14400 bps." 2
- jump 15
- !
- ! Set CTS handshaking ON in the serial port (that's the 1 in the HSReset
- ! command below )
- !
- @LABEL 15
- HSReset 0 1 0 0 0 1
- pause 15
- exit 0
- !
- !
- ! 50: error messages
- !
- @LABEL 50
- ! Modem returned Error
- exit -6021
- !
- @LABEL 51
- ! Modem returned No Carrier
- note "No Carrier, Retrying..."
- jump 10
- @LABEL 52
- ! Modem returned No Dial Tone
- exit -6020
- !
- @LABEL 53
- ! Modem returned Busy
- note "Busy, Retrying..."
- jump 10
- exit -6022
- !
- @LABEL 54
- ! Modem returned No Answer
- note "No Answer, Retrying..."
- jump 10
- exit -6023
- !
- @LABEL 59
- ! General Abort
- exit -6019
- !
- ! Hang up the modem
- !
- @HANGUP
- jsr 60
- serreset 19200, 0, 8, 1
- HSReset 0 0 0 0 0 0
- exit 0
- ! Disconnect subroutine
- @LABEL 60
- note "Hanging up..."
- matchclr
- matchstr 1 63 "OK\13\10"
- matchstr 2 63 "NO CARRIER\13\10"
- !There's only one Settries variable! (Yuck) and its used for Redialing
- !So we just have to put the hangup retires Inline instead of looping.
- pause 12
- write "+++"
- pause 12
- Flush
- write "ATH\13"
- matchread 20
- write "+++"
- pause 12
- Flush
- write "ATH\13"
- matchread 20
- write "+++"
- pause 12
- Flush
- write "ATH\13"
- matchread 20
- write "+++"
- pause 12
- Flush
- write "ATH\13"
- matchread 20
- write "+++"
- pause 12
- Flush
- write "ATH\13"
- matchread 20
- note "Error: Make sure modem disconnected properly!"
- pause 100
- !
- @LABEL 63
- write "ATZ\13"
- return