14,400 Modem & Fax  (250-3036)        Operation        Faxback Doc. # 3251

DIALING & ANSWERING WITH THE AT COMMAND SET

This chapter describes the modem's command and communications modes and
the guidelines you need to follow to manually give the modem commands.

To send commands to the modem, you must be running a communications
program.

SWITCHING FROM THE COMMUNICATIONS TO THE COMMAND MODE

Escape Code

The escape code is a code you send to the modem to make it switch from the
command mode.  When you switch modes, the modem does not disconnect from
the phone line.  It merely suspends the transfer of information.

The default escape code sequence is:

Wait at least 1 second without typing a character.
Type:+++
Wait at least 1 second for the modem to acknowledge.

The modem acknowledges by sending OK (or 0 if you turn off word
request codes).

The reason for the 1 second wait before and after sending the escape code
is to prevent accidentally switching modes.  If you type anything within 1
second (the escape code guard time) of escape code, the modem ignores
the escape code.

You can change the default values of the escape code and the escape code
guard time.  The escape code is a single character you enter three times, 
surrounded by a designated period of time.  Refer to "Internal Modem
Registers," Registers S2 and S12, to change the default values.


COMMAND SYNTAX

This section describes the various elements that make up all modem
commands.

Attention

All commands must begin with the letters AT.  AT is short for "ATTENTION"
and the modem uses these letters to automatically set the speed and the 
parity.  You can enter AT and all other commands in either upper or lower
case.

Line Length Limits

You can type one or more commands after the AT.  The modem performs the 
commands in the order given.  The number of commands you can give at one 
time is limited by the line length, which cannot exceed 42 characters.  
The modem does not count control characters and spaces, but it does count
punctuation marks such as dashes or commas.

Carriage Return

ENTER denotes a carriage return.  This ends the command; the modem does 
not process the command until it sees the ENTER.

Line Editing

After you enter a command (before you press ENTER), you can edit the 
command using the backspace key, which deletes the last character you 
entered.

NOTE:  If you backspace over a space, the modem ignores the space and
       erases the next character.  In this case, the computer does not
       display the command properly.

Parameters

Most commands consist of a single letter followed by a single-digit 
parameter, or option.  If you do not follow the command with a parameter,
the modem assumes a parameter of 0.

Repeat (A/) Repeats the command line.  Neither AT nor ENTER is necessary 
with this command.

Example Command

The following are two examples of valid modem commands.

AT X4 V1 DT (408) 555-3438 ENTER
ATXVDT4085553438 ENTER

Note that you do not need to enter any spaces.  But spaces make the 
command easier to read (although, usually harder to edit).

DIALING COMMAND AND OPTIONS

This section describes the dialing command and its options.

Dial Command (D)

D is the dial command.  You can enter several other associated 
commands as part of a dial command.  In its simplest form, follow the dial 
command with the number you want the modem to dial.

AT D 555-8900 ENTER

NOTE:  The modem ignores the spaces and the dash (-).

The modem dials the number and waits 30 seconds (default) for a response
from the called modem.  If the other modem answers, the modem sends the 
CONNECT, CONNECT 1200, or CONNECT 2400 result code, depending on the other 
modem's speed.  The modem then enters the communication mode and begins 
communicating with the other system.  If the modem does not hear another 
modem, it returns a NO CARRIER or BUSY result code.

Pause (,)

A comma in the dial sequence tells the modem to pause two seconds, then 
continue.  You might want to use this if you dial from a system where you 
have to access an outside line, then dial the outside number.

ATD 9, 555-8912 ENTER    Dial 9, pause for 2 seconds, then
                         dial 555-8912.

NOTE:  You can use more than one comma to increase the pause time, or
       change the time by setting Register S8.

Wait for Dial Tone (W)

A W in the dial sequence tells the modem to wait for a dial tone.  You 
could use this if you use an alternate long-distance carrier, or if you 
dial from a system that requires an access code for a long-distance number:

ATD23W555-1893 ENTER     Dial 23, wait for a dial tone, dial 555-1893.

The X command and the contents of Register S7 determine how long the modem 
waits for the dial tone.  If you set X2 or X4, the modem waits for 5 
seconds.  Otherwise, the modem waits for the time set by Register S7.  If 
the modem does not hear a dial tone within the specified time, it returns 
NO DIALTONE.

Wait for Silence (@)

An @ in the dial sequence causes the modem to wait for 5 seconds of silence
after one or more rings.  You could use this if you dial a long-distance 
service that does not produce a second dial tone.  The modem waits the 
length of time specified in Register S7 (default 30 seconds) for the 5 
seconds of silence.  If the modem does not detect silence, it returns the 
NO ANSWER or BUSY result code.

ATDT 555-2323@23 ENTER      Dial 555-3439, wait for silence, dial 23.

Switch hook Flash (!)

An ! causes the modem to perform a flash.  This makes the modem hang-up
the phone line for about 0.5 second (like pressing and releasing the 
switch hook on the telephone).  Some phone systems use this function to
transfer calls.

ATDT555-3439! ENTER     Dial 555-3439, flash.

Touch Tone Dialing (T)
Pulse Dialing (P)

The T and P dial modifiers select the dialing method the modem uses.  The 
modem defaults to using pulse dialing.  You could use this to use alternate
long-distance services from a pulse dial line.

ATD9WT 555-2322 ENTER   Dial 9 pulse mode, wait for a 
                        dial tone dial 555-2322 in
                        tone mode.

The modem dials using the last method used, so, in the above example, any 
additional dial commands use touch tone unless you specify pulse.

Memory Dial Number (S=n)

S=n (where n is 0-3) in the dial sequence makes the modem dial one of four 
telephone numbers you previously stored using the &Zn command.

ATDS=1 ENTER      Dial the number stored in redial memory 1.

Return to Command Mode (;)

A ; in the dial sequence tells the modem to return to the command mode as 
soon as it finishes dialing.  The modem does not try to detect a carrier.  
You would use this command when you use the modem to dial a voice call.

ATD 555-8373; ENTER       Dial 555-8373.

Auto-Dialing Voice Calls

You can have the modem dial any telephone number, even if a computer is not
connected to the other phone.  Lift the telephone handset, send the dialing 
command, and listen for the other party to answer.  At any time after the 
dialing stops, you can press any key to disconnect the modem.

ATDT 555-1281; ENTER    Dial 555-1281.  When the person answers, press
                        any key to disconnect the modem.

Dialing Timing Parameters

Registers S6 through S11 control the timing of the dialing commands.  Refer
to "Internal Modem Registers" for complete information about these 
registers.

AUTO ANSWER OPERATION

You can set the modem to automatically answer calls.  This can be a useful 
feature if you need to access the computer from another computer.  As set 
at the factory, the modem does not automatically answer incoming calls.  
You control the auto answer feature using Register S0 which determines the 
number of rings before the modem answers.  If you set the register to 0 
(default) the modem does not automatically answer the phone.  Otherwise, 
the modem waits for the number of rings you specify (1-255).

AT S0=1 ENTER        The modem answers after one ring.
AT S0=5 ENTER        The modem answers after five rings.
AT S0=23 ENTER       The modem answers after 23 rings.

After the modem answers, it sends an answer tone and waits for an originate
tone.  If the modem hears an originate tone, it returns the appropriate 
CONNECT result code to the computer.

If the modem does not detect the carrier within 30 seconds after answering,
it returns a NO CARRIER result code, hangs up, and returns to the command 
state.

If the telephone rings when auto answer is disabled, the modem returns a 
RING result code and does not answer.  You can use the Immediate Answer 
command (A) to have the modem pick up the phone line.

IMMEDIATE ANSWER (A)

You can force the modem to pick up the phone line, even if the phone does 
not ring.  You might use this feature if you called someone on a voice 
line, then wanted to switch to communicate with their computer or if the 
telephone rings, and you want the modem to answer.  If you are switching 
from a voice call to a data call, the other party must send AT D ENTER to 
their modem.

AT A ENTER       The modem immediately picks up the
                 phone line and sends an answer tone.

Auto Answer Timing Parameters

Register S0, S7, and S9 control the answer mode timing.  For more 
information on register settings, refer to "Advanced Programming Commands".

Common Configuration Setup Strings (For class II Fax Modem only)

1.  Force V.42bis data compression with LAP-M error correction 
       AT\N4%C2

2.  Force V.42bis data compression with MNP error correction.
       AT\N5%C2

3.  Force MNP 5 data compression with MNP error correction.
       ATn5%C1

NOTE:  With the setup strings in examples 1-3, if the remote is unable to
       negotiate the desired rate mode, the modem will disconnect and
       respond with No carrier.

4.  Auto negotiate data compression and error correction.
       AT&F (factory defaults) or
       AT\N3%C3

In this mode, the mode prefers V.42bis over MNP.  If error correction
is not negotiated, the modem will connect in normal mode.

(br/all-10/17/94)