XMM2 ;(WASH ISC)/THM-CERMATEK INFO MATE 212A MODEM ;7/10/89 12:46 ;
;;8.0;MailMan;;Jun 28, 2002
O ;DON'T USE "UNLISTEN COMMAND", LEAVE COMMAND CHARACTER TO BE CONTROL-N
;THIS PROTOCOL USES ONLY DIAL, END, QUERY, AND RESET COMMANDS
Q
DIAL ;
W $C(14),"Q",! R %:1 I %["O" S ER=0,Y="Already off-hook" Q
W $C(14),"D '",XMPHONE,"'",! S ER=1 R %:30 I '$T S Y="Timeout" Q
R X:30 I '$T S Y="Timeout" Q
I X["A" S Y="Connected",ER=0 Q
I X["B" S Y="Busy" Q
I X["N" S Y="No Answer" Q
I X["X" S Y="No dial tone detected" Q
S Y="Info-mate modem status: '"_X_"'" Q
HANG ; HANG UP MODEM
W $C(14),"E",!,$C(14),! R X:15 I '$T S Y="Timeout",ER=1 Q
S ER=0,Y="Successfully hung up" Q
RESET ; RESET MODEM
W $C(14),"R",!,$C(14),!
Q
STATUS ; DISPLAY INFO-MATE STATUS INFO
W $C(14),"Q ",! R X:5 I '$T S Y="Timeout-modem probably not active.",ER=1 Q
EN S Y="",%=$P(X,"/",1),J="OCHMLSARDUXZ"
S K="Offhook,connected,1200 baud,300 baud,110 baud,Self test enabled,Analog test enabled,Remote originated loop,Digital loop,Unlisten enabled,Command echos,Remote digital loop enabled"
F I=1:1 S A=$E(J,I) Q:A="" S:%[A Y=Y_$P(K,",",I)_", "
S Y=Y_$P(X,"/",2)_" errors."
Q
XMM2 ;(WASH ISC)/THM-CERMATEK INFO MATE 212A MODEM ;7/10/89 12:46 ;
+1 ;;8.0;MailMan;;Jun 28, 2002
O ;DON'T USE "UNLISTEN COMMAND", LEAVE COMMAND CHARACTER TO BE CONTROL-N
+1 ;THIS PROTOCOL USES ONLY DIAL, END, QUERY, AND RESET COMMANDS
+2 QUIT
DIAL ;
+1 WRITE $CHAR(14),"Q",!
READ %:1
IF %["O"
SET ER=0
SET Y="Already off-hook"
QUIT
+2 WRITE $CHAR(14),"D '",XMPHONE,"'",!
SET ER=1
READ %:30
IF '$TEST
SET Y="Timeout"
QUIT
+3 READ X:30
IF '$TEST
SET Y="Timeout"
QUIT
+4 IF X["A"
SET Y="Connected"
SET ER=0
QUIT
+5 IF X["B"
SET Y="Busy"
QUIT
+6 IF X["N"
SET Y="No Answer"
QUIT
+7 IF X["X"
SET Y="No dial tone detected"
QUIT
+8 SET Y="Info-mate modem status: '"_X_"'"
QUIT
HANG ; HANG UP MODEM
+1 WRITE $CHAR(14),"E",!,$CHAR(14),!
READ X:15
IF '$TEST
SET Y="Timeout"
SET ER=1
QUIT
+2 SET ER=0
SET Y="Successfully hung up"
QUIT
RESET ; RESET MODEM
+1 WRITE $CHAR(14),"R",!,$CHAR(14),!
+2 QUIT
STATUS ; DISPLAY INFO-MATE STATUS INFO
+1 WRITE $CHAR(14),"Q ",!
READ X:5
IF '$TEST
SET Y="Timeout-modem probably not active."
SET ER=1
QUIT
EN SET Y=""
SET %=$PIECE(X,"/",1)
SET J="OCHMLSARDUXZ"
+1 SET K="Offhook,connected,1200 baud,300 baud,110 baud,Self test enabled,Analog test enabled,Remote originated loop,Digital loop,Unlisten enabled,Command echos,Remote digital loop enabled"
+2 FOR I=1:1
SET A=$EXTRACT(J,I)
IF A=""
QUIT
IF %[A
SET Y=Y_$PIECE(K,",",I)_", "
+3 SET Y=Y_$PIECE(X,"/",2)_" errors."
+4 QUIT