home *** CD-ROM | disk | FTP | other *** search
- ;**************************************************************************
- ; Microsoft Mail Script File
- ;
- ; Filename: AM56IN56
- ; Date : 08/05/97
- ; Script : For NetComm Roadster56/InModem56
- ;
- ; This script file contains the standard modem setup strings used by
- ; the External, Transmit and Listen programs. There are five procedures
- ; defined in this script file for setting up the modem and for connecting
- ; to a remote External machine.
- ;
- ; The modem setup strings used here will be adequate for most people
- ; but there may be some changes required if you are dialing overseas and
- ; require a longer wait for Carrier Detect (S7 register) or if you wish
- ; to change the speaker volume. Note that if you used the -Innn option
- ; in version 1.0 or 2.0 that you will have to modify the S7 register and
- ; recompile this script file.
- ;
- ; Consult your modem manual for more information on setup options.
- ;
- ; Script procedures defined:
- ; INITIALIZE
- ; RESET
- ; CALL
- ; ANSWER
- ; DISCONNECT
- ;
- ; Return codes for External, Transmit, Listen:
- ; 0 - OK
- ; 1 - CONNECT 300
- ; 3 - NO CARRIER
- ; 4 - ERROR
- ; 5 - CONNECT 1200
- ; 6 - NO DIAL TONE
- ; 7 - BUSY
- ; 8 - NO ANSWER
- ; 10 - CONNECT 2400
- ; 11 - CONNECT 4800
- ; 12 - CONNECT 9600 (high speed connection)
- ; 14 - CONNECT 19200 (Very high speed connection)
- ;
- ;**************************************************************************
-
- INITIALIZE:
-
- title "NetComm Roadster56/InModem56"
- baud 57600
- display "Baud Rate set to 57600"
- display " "
- $attempts = 5
-
- init_retry:
- echo 0
- sendln "ATV0" ; single digit responses
- wait 1
- clearrsp
- sendln "ATE0" ; no local echo
- wait 1
- clearrsp
- sendln "AT" ; Are you alive
- wait 2
- waitrsp 2
- echo 1
- if ("0^M" isin response)
- goto reset_okay
- if ("OK^M" isin response)
- {
- reset_okay:
- echo 0
- sendln "AT&FB0E0V0"
- wait 1
- waitrsp 3
- echo 1
- sendln "AT&A1&B1&H1&K1&N0&R2&S1E0M1L0Q0V0X4"
-
- ; &A1 - Return ARQ result codes
- ; &B1 - set fixed serial port rate
- ; &H1 - use hardware CTS transmit flow control
- ; &K1 - auto-enable data compression
- ; &N0 - variable bps rate -modem to modem speed
- ; &R2 - activate RTS -data is passed only when RTS is high
- ; &S1 - activate DSR
- ; E0 - local echo OFF
- ; M1 - speaker on until carrier established
- ; L0 - shhhhh
- ; Q0 - result codes displayed
- ; V0 - single digit responses
- ; X4 - set responses to most
-
- waitrsp 4
- if ("0^M" isin response)
- {
- echo 0
- sendln "ATS0=0S10=5S11=50"
-
- ; S0 - don't answer the phone
- ; S10 - half-second before hangup
- ; S11 - speed dial
-
- echo 1
- waitrsp 3
- if (response = "0^M")
- return 0
- }
- }
- dec $attempts
- if ($attempts > 0)
- goto init_retry
- return 4
-
- RESET:
-
- baud 38400
- display "Resetting Roadster56/InModem56 "
- display "Answer Baud Rate: 57600"
- clearrsp
- echo 0
- sendln "ATV0"
- wait 1
- sendln "ATE0"
- wait 1
- clearrsp
- sendln "AT"
- waitrsp 3
- sendln "ATE0V0"
- echo 1
- return 0
-
- reset_modem:
- sendln "AT&F"
- wait 1
- waitrsp 3
- sendln "AT&A1&B1&H1&K1&N0&R2&S1E0M1L0Q0V0X4"
- ; &A1 - Return ARQ result codes
- ; &B1 - set fixed serial port rate
- ; &H1 - use hardware CTS
- ; &K1 - auto-enable data compression
- ; &N0 - variable bps rate
- ; &R2 - activate RTS
- ; &S1 - activate DSR
- ; E0 - local echo OFF
- ; M1 - speaker on until carrier established
- ; L0 - shhhhh
- ; Q0 - result codes displayed
- ; V0 - single digit responses
- ; X4 - set responses to most verbose
-
- waitrsp 4
- if ("0^M" isin response)
- {
- sendln "ATS0=0S10=5S11=50"
- ; S0 - don't answer the phone
- ; S10 - half-second before hangup after loss of carrier
- ; S11 - speed dial
- waitrsp 3
- if (response = "0^M")
- return 0
- }
-
- return 4
-
- CALL:
-
- $ret = 8
- waitrsp 2
- if (response = "2^M") {
- display "Incoming Call Detected"
- return $ret
- }
- clearrsp
- baud 38400
- display "Dialing..."
- echo 0
- sendln "ATD" + dial_mode + phone_number
- echo 1
- waitrsp 90
- if (response = "1^M")
- {
- display ">>> CONNECT 300 <<<"
- $ret = 1
- }
- else if (response = "3^M")
- {
- display ">>> NO CARRIER <<<"
- }
- else if(response = "4^M")
- {
- display ">>> ERROR <<<"
- }
- else if (response = "5^M")
- {
- display ">>> CONNECT 1200 <<<"
- $ret = 5
- }
- else if (response = "6^M")
- {
- display ">>> NO DIALTONE <<<"
- }
- else if (response = "7^M")
- {
- display ">>> BUSY <<<"
- $ret = 7
- }
- else if(response = "8^M")
- {
- display ">>> NO ANSWER <<<"
- }
- else if (response = "10^M")
- {
- display ">>> CONNECT 2400 <<<"
- $ret = 10
- }
- else if (response = "13^M")
- {
- display ">>> CONNECT 9600 <<<"
- $ret = 12
- }
- else if (response = "14^M")
- {
- display ">>> CONNECT unknown/ARQ <<<"
- $ret = 12
- }
- else if (response = "15^M")
- {
- display ">>> CONNECT 1200/ARQ <<<"
- $ret = 12
- }
- else if (response = "16^M")
- {
- display ">>> CONNECT 2400/ARQ <<<"
- $ret = 12
- }
- else if (response = "17^M")
- {
- display ">>> CONNECT 9600/ARQ <<<"
- $ret = 12
- }
- else if (response = "18^M")
- {
- display ">>> CONNECT 4800 <<<"
- $ret = 12
- }
- else if (response = "19^M")
- {
- display ">>> CONNECT 4800/ARQ <<<"
- $ret = 12
- }
- else if(response = "20^M")
- {
- display ">>> CONNECT 7200 <<<"
- $ret = 12
- }
- else if(response = "21^M")
- {
- display ">>> CONNECT 12000 <<<"
- $ret = 12
- }
- else if (response = "22^M")
- {
- display ">>> CONNECT 12000/ARQ <<<"
- $ret = 12
- }
- else if (response = "24^M")
- {
- display ">>> CONNECT 7200/ARQ <<<"
- $ret = 12
- }
- else if(response = "25^M")
- {
- display ">>> CONNECT 14400 <<<"
- $ret = 12
- }
- else if (response = "26^M")
- {
- display ">>> CONNECT 14400/ARQ <<<"
- $ret = 12
- }
- else if (response = "47^M")
- {
- display ">>> CONNECT 16800 <<<"
- $ret = 12
- }
- else if (response = "57^M")
- {
- display ">>> CONNECT 16800/ARQ <<<"
- $ret = 12
- }
- else if (response = "85^M")
- {
- display ">>> CONNECT 19200 <<<"
- $ret = 14
- }
- else if (response = "88^M")
- {
- display ">>> CONNECT 19200/ARQ <<<"
- $ret = 14
- }
- else if (response = "91^M")
- {
- display ">>> CONNECT 21600 <<<"
- $ret = 14
- }
- else if (response = "94^M")
- {
- display ">>> CONNECT 21600/ARQ <<<"
- $ret = 14
- }
- else if (response = "99^M")
- {
- display ">>> CONNECT 24000 <<<"
- $ret = 14
- }
- else if (response = "100^M")
- {
- display ">>> CONNECT 24000/ARQ <<<"
- $ret = 14
- }
- else if (response = "103^M")
- {
- display ">>> CONNECT 26400 <<<"
- $ret = 14
- }
- else if (response = "104^M")
- {
- display ">>> CONNECT 26400/ARQ <<<"
- $ret = 14
- }
- else if (response = "107^M")
- {
- display ">>> CONNECT 28800 <<<"
- $ret = 14
- }
- else if (response = "108^M")
- {
- display ">>> CONNECT 28800/ARQ <<<"
- $ret = 14
- }
- else if (response = "151^M")
- {
- display ">>> CONNECT 31200 <<<"
- $ret = 14
- }
- else if (response = "152^M")
- {
- display ">>> CONNECT 31200/ARQ <<<"
- $ret = 14
- }
- else if (response = "155^M")
- {
- display ">>> CONNECT 33600 <<<"
- $ret = 14
- }
- else if (response = "156^M")
- {
- display ">>> CONNECT 33600/ARQ <<<"
- $ret = 14
- }
- else if (response = "168^M")
- {
- display ">>> CONNECT 56000/V120 <<<"
- $ret = 14
- }
- else if (response = "169^M")
- {
- display ">>> CONNECT 64000/V120 <<<"
- $ret = 14
- }
- else if (response = "162^M")
- {
- display ">>> CONNECT 56000 <<<"
- $ret = 14
- }
- else if (response = "165^M")
- {
- display ">>> CONNECT 64000 <<<"
- $ret = 14
- }
- else
- {
- display ">>> CONNECT FAILED <<<"
- }
- return $ret
-
- ANSWER:
-
- $ret = 8
- waitrsp 1
- baud 38400
- if (response = "2^M")
- {
-
-
- echo 0
- if (listen = 1)
- sendln "ATD"
- else
- sendln "ATA"
- echo 1
- waitrsp 90
- if (response = "1^M")
- {
- display ">>> CONNECT 300 <<<"
- $ret = 1
- }
- else if (response = "3^M")
- {
- display ">>> NO CARRIER <<<"
- }
- else if(response = "4^M")
- {
- display ">>> ERROR <<<"
- }
- else if (response = "5^M")
- {
- display ">>> CONNECT 1200 <<<"
- $ret = 5
- }
- else if (response = "6^M")
- {
- display ">>> NO DIALTONE <<<"
- }
- else if (response = "7^M")
- {
- display ">>> BUSY <<<"
- $ret = 7
- }
- else if(response = "8^M")
- {
- display ">>> NO ANSWER <<<"
- }
- else if (response = "10^M")
- {
- display ">>> CONNECT 2400 <<<"
- $ret = 10
- }
- else if (response = "13^M")
- {
- display ">>> CONNECT 9600 <<<"
- $ret = 12
- }
- else if (response = "14^M")
- {
- display ">>> CONNECT unknown/ARQ <<<"
- $ret = 12
- }
- else if (response = "15^M")
- {
- display ">>> CONNECT 1200/ARQ <<<"
- $ret = 12
- }
- else if (response = "16^M")
- {
- display ">>> CONNECT 2400/ARQ <<<"
- $ret = 12
- }
- else if (response = "17^M")
- {
- display ">>> CONNECT 9600/ARQ <<<"
- $ret = 12
- }
- else if (response = "18^M")
- {
- display ">>> CONNECT 4800 <<<"
- $ret = 12
- }
- else if (response = "19^M")
- {
- display ">>> CONNECT 4800/ARQ <<<"
- $ret = 12
- }
- else if(response = "20^M")
- {
- display ">>> CONNECT 7200 <<<"
- $ret = 12
- }
- else if(response = "21^M")
- {
- display ">>> CONNECT 12000 <<<"
- $ret = 12
- }
- else if (response = "22^M")
- {
- display ">>> CONNECT 12000/ARQ <<<"
- $ret = 12
- }
- else if (response = "24^M")
- {
- display ">>> CONNECT 7200/ARQ <<<"
- $ret = 12
- }
- else if(response = "25^M")
- {
- display ">>> CONNECT 14400 <<<"
- $ret = 12
- }
- else if (response = "26^M")
- {
- display ">>> CONNECT 14400/ARQ <<<"
- $ret = 12
- }
- else if (response = "47^M")
- {
- display ">>> CONNECT 16800 <<<"
- $ret = 12
- }
- else if (response = "57^M")
- {
- display ">>> CONNECT 16800/ARQ <<<"
- $ret = 12
- }
- else if (response = "85^M")
- {
- display ">>> CONNECT 19200 <<<"
- $ret = 14
- }
- else if (response = "88^M")
- {
- display ">>> CONNECT 19200/ARQ <<<"
- $ret = 14
- }
- else if (response = "91^M")
- {
- display ">>> CONNECT 21600 <<<"
- $ret = 14
- }
- else if (response = "94^M")
- {
- display ">>> CONNECT 21600/ARQ <<<"
- $ret = 14
- }
- else if (response = "99^M")
- {
- display ">>> CONNECT 24000 <<<"
- $ret = 14
- }
- else if (response = "100^M")
- {
- display ">>> CONNECT 24000/ARQ <<<"
- $ret = 14
- }
- else if (response = "103^M")
- {
- display ">>> CONNECT 26400 <<<"
- $ret = 14
- }
- else if (response = "104^M")
- {
- display ">>> CONNECT 26400/ARQ <<<"
- $ret = 14
- }
- else if (response = "107^M")
- {
- display ">>> CONNECT 28800 <<<"
- $ret = 14
- }
- else if (response = "108^M")
- {
- display ">>> CONNECT 28800/ARQ <<<"
- $ret = 14
- }
- else if (response = "151^M")
- {
- display ">>> CONNECT 31200 <<<"
- $ret = 14
- }
- else if (response = "152^M")
- {
- display ">>> CONNECT 31200/ARQ <<<"
- $ret = 14
- }
- else if (response = "155^M")
- {
- display ">>> CONNECT 33600 <<<"
- $ret = 14
- }
- else if (response = "156^M")
- {
- display ">>> CONNECT 33600/ARQ <<<"
- $ret = 14
- }
- else if (response = "168^M")
- {
- display ">>> CONNECT 56000/V120 <<<"
- $ret = 14
- }
- else if (response = "169^M")
- {
- display ">>> CONNECT 64000/V120 <<<"
- $ret = 14
- }
- else if (response = "162^M")
- {
- display ">>> CONNECT 56000 <<<"
- $ret = 14
- }
- else if (response = "165^M")
- {
- display ">>> CONNECT 64000 <<<"
- $ret = 14
- }
- else
- {
- display ">>> CONNECT FAILED <<<"
- }
- }
- return $ret
-
- DISCONNECT:
-
- display "Disconnecting..."
- echo 0
- wait 5
- send "+++"
- wait 5
- clearrsp
- sendln "ATH0"
- waitrsp 5
- DTR 0
- wait 3
- DTR 1
- echo 1
- if (response != "0^M")
- {
- DTR 0
- wait 2
- DTR 1
- clearrsp
- }
- return 0
-
-