1200 BPS DCM-212 Modems (260-1385A) Hayes Protocol Faxback Doc. # 5957 In Hayes protocol mode, commands instruct the DCM-212's operation, and register values determine how the commands are executed. The command structure is patterned from the industry standard AT-string command interface, thus making the DCM-212 Hayes-software compatible. COMMAND CODES All command lines in Hayes protocol mode begin with the AT (attention code) string and end with a carriage return (ENTER). AT must be entered in uppercase letters, but the commands following can be entered in either upper or lowercase. When the AT command is received, the modem automatically sets the operation speed and parity. You can store a sequence of commands in the command buffer memory, provided the command line does not exceed the 40-character buffer capacity. These commands, however, must be entered in a "logical" order to be executed. If the command line exceeds the buffer-character limit, the modem does not execute the commands and instead sends the ERROR result code (Table 7). The attention code (AT), control characters, and spaces do not take up space in the command buffer. But, the punctuation used in the telephone number to make it easier to read does take up space. The command buffer is cleared when you input the attention code AT, input the reset command Z, or turn off the power supply of the modem. The basic commands needed for programming the modem in Hayes protocol mode are provided in Table 3. Table 5 lists the dialing and answering commands. For a detailed explanation of each command, refer to Appendix B, Hayes Protocol Reference. TABLE 3. BASIC COMMAND CODES CODE DESCRIPTION FUNCTION ─────────────────────────────────────────────────────────────────────────── AT Attention Code Wakes up the modem to command receptive state. Starts the command line. ─────────────────────────────────────────────────────────────────────────── ENTER Carriage Return Closes the command line and executes commands. S3 defines the carriage return character. ─────────────────────────────────────────────────────────────────────────── BS Backspace Edits the command line by deleting characters one by one. S5 defines the backspace character. ─────────────────────────────────────────────────────────────────────────── +++ Escape Code Returns the modem to command mode form on-line mode. S2 defines the escape code character. S12 defines the escape code guard time. ─────────────────────────────────────────────────────────────────────────── O ON-LINE Returns the modem to on-line mode from command mode. ─────────────────────────────────────────────────────────────────────────── Z Reset Resets the modem to default condition. ─────────────────────────────────────────────────────────────────────────── COMMANDS WITH PARAMETERS Some of the commands have parameters (Table 4). The parameter value, usually 0,1, or 2, follows the command. When the command parameter is not used, the modem assumes a value of 0. For example, the echo command E does not echo when parameter 0 is supported. It does echo when parameter 1 is supported. E used alone is the same as E0. TABLE 4. COMMANDS WITH PARAMETER ─────────────────────────────────────────────────────────────────────────── COMMAND PARAMETERS FUNCTION DEFAULT Q 0 Result codes on Defined by DIP Switch 8 1 Result codes off ─────────────────────────────────────────────────────────────────────────── V 0 Numeric result codes Defined by DIP Switch 6 1 Verbal result codes ─────────────────────────────────────────────────────────────────────────── X 0 Result code set 0 X0 1 Result code set 1 2 Result code set 2 3 Result code set 3 4 Result code set 4 ─────────────────────────────────────────────────────────────────────────── E 0 Commands are not echoed Defined by DIP Switch 5 1 Echo commands ─────────────────────────────────────────────────────────────────────────── F 0 Half duplex F1 1 Full duplex ─────────────────────────────────────────────────────────────────────────── M 0 Monitor speaker always off M1 1 Monitor speaker on until carrier detect 2 Monitor speaker always on ─────────────────────────────────────────────────────────────────────────── C 0 Transmitter off C1 1 Transmitter on ─────────────────────────────────────────────────────────────────────────── H 0 On hook (phone line is NONE disconnected when not in use) 1 Off hook (phone line is connected regardless of its condition) ─────────────────────────────────────────────────────────────────────────── I 0 Product code 1 ROM checksum 2 Internal memory test ─────────────────────────────────────────────────────────────────────────── TABLE 5. DIALING AND ANSWERING COMMANDS COMMAND DESCRIPTION FUNCTION D Dialing Sets the modem to originate a telephone call. D command parameters include: 0-9, (), -, space, *, #, A, B, C, and D. P Pulse Dialing Sets the modem to pulse dialing mode. T Touch-Tone Sets the modem to touch-tone dialing mode. Dialing R Reverse Mode Changes the mode to answer mode automatically after a call is originated. , Pause Causes the modem to pause when dialing. Place it after the access code. Length of pause time is set by S8. / Delay for 0.125 seconds (a short pause). @ Delay until no sound is heard (see the N command in Tandy mode). ! Flash the switch hook for 0.7 seconds. ; Returns the modem to command mode after dialing. A/ Repeat Repeats the command line. Neither AT not Command is necessary for this command. A Answer Mode Sets the modem to answer mode immediately without waiting for a ringing signal. REGISTERS Registers are used to store the parameters that control communications. Each register has variables that determine how the modem operates or supplies information on the modem's current condition. The DCM-212's 15 registers and the default values are shown in Table 6. Register S0 defines the ringing signals before a call is answered, register S1 counts the rings, registers S2-S5 define the function key characters, registers S-6-S12 are used to control function time, and register S16 is for the self-test. S13 is the bit-mapped register. With the exception of the last bit register, you can read the current value of a register or assign a new value to match the registers to your particular environment by using the command syntax. COMMAND SYNTAX Sx? Check the register value Use this syntax to check register values. The value of each register is displayed on the screen in decimal numbers in the range 0-255. For example, to check the value of register S0, type: AT S0? On the screen, you will see: 000 OK You can also check the values of more than one register in the same command line. To check the values of register S0 and register S7, type: AT S0? The screen might show: 000 030 OK Sx=n Change the register value Use this syntax to assign or change register values. To assign the value 3 to register S0, type: AT S0=3 After changing the value, the modem signals OK. Another syntax for changing a register value is: AT S0 Set the pointer to register S0. AT ? Read the value of S0 AT=3 Assign the new value 3 to S0. For more information on the registers, refer to Appendix B, Hayes Protocol Reference. TABLE 6. REGISTERS REGISTER RANGE UNIT FUNCTION DEFAULT S0 0-255 Ring Defines the rings in answer mode 0* S1 0-255 Ring Ring counter 0 S2 0-127 ASCII code Defines escape code character 43 S3 0-127 ASCII code Defines CR code character 13 S4 0-127 ASCII code Defines LF code character 10 S5 0-32,127 ASCII code Defines BS code character 8 S6 2-255 Seconds Defines dial tone wait time 2 S7 1-255 Seconds Defines carrier wait time 30 S8 0-255 Seconds Defines pause duration for comma 2 (Although you can input a value up to 255, the actual maximum value is 54) S9 1-255 1/10 sec. Defines carrier detect response time 6 S10 1-255 1/10 sec. Defines carrier loss time for hang up 7 S11 50-255 Millisec. Defines touch-tone dialing speed 70 S12 20-255 1/50 sec. Defines escape code guard time 50 S13 Bit-mapped register S14─┐ Not Used S15─┘ S16 0 Self-test mode off 0 1 Self-test mode on * When DIP Switch 4 is on, the modem powers up in auto-answer mode with S0=1. NOTE: The ASCII code values are expressed in decimal. LOGONS IN MS-DOS OPERATING SYSTEMS With DeskMate's Telecom application program and your Tandy personal computer, you can easily program your DCM-212 to log onto a host computer, information service, or another terminal either manually or automatically. Follow the instructions in your DeskMate Tutorial and Reference manual for setting parameters and using the functions available. Depending on the computer you are using, the procedures might differ slightly from those shown. A Tandy 1000 personal computer (with an RS-232C option board) is used for the examples following. 1. Power up the computer, and load your communications software. Before turning on the mode , set DIP switches on the DCM-212 as follows: ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │ │ │ ├─┤ ├─┤ ├─┤ ├─┤ │ │ ├─┤ ├─┤ │ OFF │ ├─┤ │ │ │ │ │ │ │ │ ├─┤ │ │ │ │ │ │ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘ │ │ 1 2 3 4 5 6 7 8 │ │ │ ON └─────────────────────────────────┘ 2. At the main menu, select Telecom and change the TELECOM STATUS screen to show: Autodial Modem Yes BAUD Rate 1200 Data Word Length 8 BITS Parity NONE Number of Stop Bits 1 BIT XON/XOFF Flow Control OFF ASCII Character Filter OFF Line Feed Filter OFF Echo (Half Duplex) OFF Redial (# of Retries) 3 3. When the DEFINE MODEM FOR COMPUTER DIALING screen appears (after you select Yes for the Autodial Modem status setting) and you press , change the dialing sequence to show: PAUSE:2 Pause for 2 seconds. SEND: ATDT Wake up and originate a call using touch-tone dialing NUMBER Send the number which will be input at terminal mode SEND: ^M Send ^M to force the DCM-212 to execute the commands. WAITC Wait for carrier detect before continuing. NOTE: If your telephone system requires pulse rather than tone dialing, substitute "ATDP" for the "ATDT" in the SEND line above. 4. Press twice to save the dialing sequence and return to the TELECOM-STATUS screen. MANUAL LOGON 1. Enter terminal mode from the TELECOM-STATUS screen (). 2. Press (CALL). Type the telephone number of the information service, and press . 3. After the connection has been made successfully, proceed with the logon procedures, step by step. AUTOMATIC LOGON 1. At the TELECOM-STATUS screen, press to create an autolog file and enter your log filename, then press . Press to create the STATUS line. After selecting the parameters, press to return to the original screen and complete the rest of the file. When completed, the screen for your autolog file might show: STATUS: Y,12,8,N,1,OFF,OFF,OFF,OFF,3 CALL: 555-1212 (Use your local information access number) PAUSE: 5 SEND: ^M^M RECV: TERMINAL= SEND: DI^M RECV: @ SEND: C 60942^M RECV: ???? SEND: DJNS^M 2. Press to save the autolog file and return to the TELECOM-STATUS screen. 3. Input filename to execute your autolog file. When the logon sequence is entered correctly, the DCM-212 will dial your local access number, connect to the service, and then automatically execute the rest of the autolog file. RESULT CODES Result codes (Table 7) are displayed either numerically or verbally after the command line is executed. Command Q determines whether the result codes will appear. When Q1 is supported, the result codes are not displayed. When Q0 is supported, you can see the codes on the screen. Command V determines whether the result codes are displayed as numeric (V0) or verbal (V1) codes. The default value of these controls is fixed by DIP switches. For example, when DIP Switch 8 is set to ON, these result codes do not appear on the screen unless you enter Q0 from the keyboard. (Refer to Chapter 1, DIP Switches.) Another command related to thee result code is the X command. Depending on the selected value of this command, the result code that appears will vary. Refer to Appendix B, X Command. TABLE 7. RESULT CODES NUMERIC VERBAL MEANING ─────────────────────────────────────────────────────────────────────────── 0 OK Executed the command line without errors. ─────────────────────────────────────────────────────────────────────────── 1 CONNECT Basic code set. Detected carrier at 300 bps. Extended and Advanced code set. Detected carrier at 300 bps. ─────────────────────────────────────────────────────────────────────────── 2 RING Detected an incoming phone line ring signal. ─────────────────────────────────────────────────────────────────────────── 3 NO CARRIER Carrier was lost or never heard. ─────────────────────────────────────────────────────────────────────────── 4 ERROR Error in command line, or command not valid, or command line exceeds 40 characters. ─────────────────────────────────────────────────────────────────────────── 5 CONNECT 1200 Detected carrier at 1200 bps. ─────────────────────────────────────────────────────────────────────────── 6 NO DIAL TONE No dial tone detected. ─────────────────────────────────────────────────────────────────────────── 7 BUSY Busy signal detected. ─────────────────────────────────────────────────────────────────────────── (dkh-08/04/93)