home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-02-16 | 4.8 KB | 260 lines | [mlts/slnk] |
- ! "Codex 3260 V.32bis Modem - 2/4/92 trl-1.3"
- !
- ! This driver was developed by Tom Lafleur, Qualcomm Inc.
- ! lafleur@qualcomm.com or applelinks: d0507
- !
- ! Note: This Codex modem returns a connect message at the DTE speed. ie:
- ! If the DTE speed is 19200, Connect 19200 will be returned at all modem
- ! rates in the NORMAL mode. Most other modem return the real connected rate.
- ! This is a BUG. Most of the speed setting stuff below is therefore not
- ! needed as the modem will allways connect at 19200. ...trl...
- !
- ! Note: Make sure that your modem cable supports CTS from the MAC to the modem.
- ! Some older cables donot and flow-control will fail. If you need a new cable
- ! order one from Celstin Co. (510) 835-0702. It called a High-Speed Mac Modem
- ! Cable.
- !
- @ORIGINATE
- @ANSWER
- !
- @LABEL 1
- serreset 19200, 0, 8, 1
- !
- ! Flow control handshaking:
- ! output xon/xoff = off; output hardware handshaking CTS = on; xon char = 17;
- ! xoff char = 19; input xon/xoff = off; input DTR handshaking off;
- !
- HSReset 0 1 17 19 0 0
- !
- ! first recall the factory configuration, and get the modem in enhanced command state
- !
- matchclr
- matchstr 1 3 "OK\13\10"
- write "AT&F\13"
- matchread 30
- jump 59
- !
- ! Next, Set up the configuration: first reset modem after losing DTR
- ! Turn off auto answer and echo
- !
- @LABEL 3
- pause 5
- matchstr 1 4 "OK\13\10"
- write "AT&D3S0=0E0\13"
- matchread 30
- jump 59
- !
- ! Next, turn on CTS/DTS flow control, disable MNP and error control,
- ! disable modem flow control.
- ! Set CD to normal mode.
- !
- @LABEL 4
- pause 5
- matchstr 1 5 "OK\13\10"
- write "AT*FL2*MF0*SM1&C2\13"
- matchread 30
- jump 59
- !
- ! If speaker on flag is true, jump to label 8.
- ! Else turn off the speaker
- !
- @LABEL 5
- ifstr 2 8 "1"
- matchstr 1 8 "OK\13\10"
- write "ATM0\13"
- matchread 30
- jump 59
- !
- ! The modem is ready so enable answering, or originate a call.
- !
- @LABEL 8
- pause 5
- ifANSWER 30
- note "Dialing ^1" 3
- write "ATDT^1\13"
- !
- @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 4 15 "CONNECT 9600\13\10"
- matchstr 5 16 "CONNECT 12000\13\10"
- matchstr 6 17 "CONNECT 14400\13\10"
- matchstr 7 18 "CONNECT 19200\13\10"
- matchstr 8 50 "NO CARRIER\13\10"
- matchstr 9 50 "ERROR\13\10"
- matchstr 10 52 "NO DIALTONE\13\10"
- matchstr 11 53 "BUSY\13\10"
- matchstr 12 54 "NO ANSWER\13\10"
- matchread 700
- jump 59
- !
- @LABEL 11
- note "Modem connection established at 1200 bps." 2
- !serreset 1200, 0, 8, 1
- CommunicatingAt 1200
- jump 25
- !
- @LABEL 12
- note "Modem connection established at 2400 bps." 2
- !serreset 2400, 0, 8, 1
- CommunicatingAt 2400
- jump 25
- !
- @LABEL 13
- note "Modem connection established at 4800 bps." 2
- !serreset 4800, 0, 8, 1
- CommunicatingAt 4800
- jump 25
- !
- @LABEL 14
- note "Modem connection established at 7200 bps." 2
- !serreset 7200, 0, 8, 1
- CommunicatingAt 7200
- jump 25
- !
- @LABEL 15
- note "Modem connection established at 9600 bps." 2
- !serreset 9600, 0, 8, 1
- CommunicatingAt 9600
- jump 25
- !
- @LABEL 16
- note "Modem connection established at 12000 bps." 2
- !serreset 12200, 0, 8, 1
- CommunicatingAt 12000
- jump 25
- !
- @LABEL 17
- note "Modem connection established at 14400 bps." 2
- !serreset 14400, 0, 8, 1
- CommunicatingAt 14400
- !
- @LABEL 18
- note "Modem connection established at 19200 bps." 2
- !serreset 19200, 0, 8, 1
- CommunicatingAt 19200
- !
- !
- @LABEL 25
- ifANSWER 26
- pause 50
- !
- @LABEL 26
- ! note "Exit to MAC" 2
- exit 0
- !
- ! @ANSWER
- !
- ! Set up the modem to answer a call.
- !
- @LABEL 30
- write "ATS0=1\13"
- matchstr 1 31 "OK\13\10"
- matchread 30
- jump 59
- !
- @LABEL 31
- matchstr 1 32 "RING\13\10"
- matchstr 2 11 "CONNECT 1200\13\10"
- matchstr 3 12 "CONNECT 2400\13\10"
- matchstr 4 13 "CONNECT 4800\13\10"
- matchstr 5 14 "CONNECT 7200\13\10"
- matchstr 5 15 "CONNECT 9600\13\10"
- matchstr 6 16 "CONNECT 12000\13\10"
- matchstr 7 17 "CONNECT 14400\13\10"
- matchstr 8 18 "CONNECT 19200\13\10"
- matchstr 9 50 "NO CARRIER\13\10"
- matchstr 10 50 "ERROR\13\10"
- matchstr 11 52 "NO DIALTONE\13\10"
- matchstr 12 53 "BUSY\13\10"
- matchstr 13 54 "NO ANSWER\13\10"
- matchread 700
- jump 31
- !
- @LABEL 32
- userhook 1
- note "Answering phone…" 2
- jump 31
- !
- ! Error messages.
- !
- ! No Carrier.
- @LABEL 50
- exit -6021
- !
- ! No Dial Tone.
- @LABEL 52
- exit -6020
- !
- ! Number Busy.
- @LABEL 53
- exit -6022
- !
- ! No Answer.
- @LABEL 54
- exit -6023
- !
- ! Modem Error, not responding.
- @LABEL 59
- exit -6019
- !
- ! Hang up the modem.
- !
- @HANGUP
- !
- @LABEL 60
- settries 0
- !
- ! Force a Hang up.
- !
- @LABEL 61
- write "ATH\13"
- matchclr
- matchstr 1 62 "NO CARRIER\13\10"
- matchstr 2 62 "OK\13\10"
- matchstr 3 62 "ERROR\13\10"
- matchread 30
- inctries
- iftries 3 62
- !
- ! No response from modem, try escape sequence.
- !
- write "+++"
- matchclr
- matchstr 1 61 "OK\13\10"
- matchread 15
- !
- ! Try dropping DTR.
- !
- DTRClear
- pause 15
- DTRSet
- pause 15
- jump 61
- !
- @LABEL 62
- !
- ! Recall the factory settings on exit.
- !
- pause 15
- write "AT&F\13"
- matchclr
- matchstr 1 63 "OK\13\10"
- matchread 30
- !
- ! Set to no answer.
- !
- @LABEL 63
- pause 5
- matchstr 1 64 "OK\13\10"
- write "ATS0=0\13"
- matchread 20
- !
- ! The End.
- !
- @LABEL 64
- exit 0
-
-