Microsoft KB Archive/80261

= PC Gen: Contents of Modem Script File NULLMODM.MDM =

Article ID: 80261

Article Last Modified on 10/30/2006

-

APPLIES TO


 * Microsoft Mail for PC Networks 2.1e

-



This article was previously published under Q80261



The following is the contents of the Microsoft Mail version 2.1e modem script file NULLMODM.MDM, which can be compiled with SCRCOMP.EXE: ;*********************************************************************      Script  : Standard script file for null-modems
 * Microsoft Mail Script File
 * Filename: nullmodm.mdm
 * Date   : March 21, 1990
 * Filename: nullmodm.mdm
 * Date   : March 21, 1990
 * This script file contains the strings used in the calling
 * sequence for null modem connections. Note that this used to be
 * accomplished in version 1.0 and version 2.0 via the -Z option.
 * Note that a &quot;proper&quot; null modem is wired in the following way:
 * 1_____1
 * 2__ __2
 * 3__X__3
 * 4__ __4
 * 5__X__5
 * 7_____7
 * 6_____20
 * 8_/
 * 20_____6
 * \_8
 * If your null modem is not wired in this way then you could
 * experience flow control problems and &quot;lost carrier&quot;.
 * If your null modem connection is via a device which requires
 * some setup strings to be issued to initialized the device then
 * insert the appropriate &quot;send&quot; commands in the INITIALIZE procedure.
 * If the device must be reset after a connection the insert the
 * appropriate &quot;send&quot; commands in the RESET procedure.
 * Script procedures defined:
 * INITIALIZE
 * RESET
 * CALL
 * ANSWER
 * DISCONNECT
 * Return codes for External, Transmit, Listen:
 * 0 - OK
 * 1 - CONNECT 300
 * 2 - not defined
 * 3 - NO CARRIER
 * 4 - ERROR
 * 5 - CONNECT 1200
 * 6 - not defined
 * 7 - BUSY
 * 8 - NO ANSWER
 * 9 - not defined
 * 10 - CONNECT 2400
 * 11 - not defined
 * 12 - CONNECT 9600 (high speed connection)
 * 6 - not defined
 * 7 - BUSY
 * 8 - NO ANSWER
 * 9 - not defined
 * 10 - CONNECT 2400
 * 11 - not defined
 * 12 - CONNECT 9600 (high speed connection)

INITIALIZE: title &quot;Null Modem Script&quot;

return 0

RESET: return 0

CALL: $ret = 8              ; set default ret code to &quot;no answer&quot;


 * If you previously used the -Z option with an optional setup string
 * then uncomment the following line and insert your setup string
 * between the double quote characters.
 * eg. send &quot;\17&quot;        ; send XON


 * send &quot;&quot;

sendln &quot;9&quot;            ; send call signal to remote site

waitrsp 1             ; wait until the modem responds

if (response = &quot;8^M&quot;) ; has other side answered? {         sendln &quot;8&quot;           ; if he has then send display &quot;>>> CONNECT - NULL MODEM <<<&quot; $ret = 12 }       else {         display &quot;>>> NO ANSWER <<<&quot; $ret = 8 }

return $ret           ; return connect baud rate to                               ;    application

ANSWER: $ret = 8              ; set default ret code to &quot;no answer&quot;

waitrsp 1             ; see if phone is ringing

if (response = &quot;9^M&quot;) ; 9 means &quot;RING&quot; for nullmodems {           sendln &quot;8&quot;         ; answer the phone

waitrsp 20         ; wait for return code from modem

if (response = &quot;8^M&quot;) {             display &quot;>>> CONNECT - NULL MODEM <<<&quot; $ret = 12 }           }

return $ret           ; return connect baud rate to                               ;    application

DISCONNECT: dtr 0                 ; drop DTR signal for a few seconds

clearrsp              ; clear the response buffer

wait 4                ; give other side time to recognize ;   lost carrier dtr 1                 ; raise it back again return 0

Additional query words: 2.10 2.1 2.10e

Keywords: KB80261

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.