V.34 Faxmodem  (250-3037)      Modem Programming       Faxback Doc. # 14479

The AT commands are used to control modem operation and functions.

A command line is a string of characters sent from a PC to the modem while
the modem is in a command state to change the modem behaviors and
functions.  A command line has a prefix, a body, and a terminator.  Each
command line (with the exception of the A/ command) must begin with the
character sequence AT and must be terminated by a carriage return.
Characters that precede the AT prefix are ignored.  Commands entered in
upper case or lower case are accepted, but both the A and T must be of the
same case, i.e., "AT" = ASCII 065, 084 or "at"= ASCII 097, 116.  The body
is a string of commands restricted to printable ASCII characters (032-126).
Space characters (ASCII 032) and control characters other than CR (ASCII
013) and BS (ASCII 010) in the command string are ignored.  The default
terminator is the ASCII <CR> character.

The modem supports the editing of command lines by recognizing a backspace
character.  When modem echo is enabled, the modem responds to receipt of a
backspace or delete by echoing a backspace character, a space character,
and another backspace.  The hex value to be used for the backspace
character is programmable through register S5.  Values equal to 0 or
greater than 127, or the value which corresponds to the carriage return 
character, cannot be used for the backspace character.  This editing is not
applicable to the AT header of a command. A command line may be aborted at
any time by entering <cntrl-x> (18h).

The AT sequence may be followed by any number of commands in sequence,
except for commands such as Z, D, or A.  Commands following commands Z, D,
or A on the same command line will be ignored.  The maximum number of
characters on any command line is 39 (including "A" and "T"). If a syntax
error is found anywhere in a command line command, the remainder of the
line will be ignored and the ERROR result code will be returned. 

Most commands entered with parameters out of range will not be accepted and
the ERROR response will be returned lo the PC.

Commands will only be accepted by the modem once the previous command has
been fully executed, which is normally indicated by the return of an
appropriate result code.  Execution of commands D and A, either as a result
of a direct command or a re-execute command, will be aborted if another
character is entered before completion of the handshake.

ESCAPE CODE SEQUENCE (+++)

When the modem has established a connection and has entered online data
mode, it is possible to break into the data transmission in order to issue
further commands to the modem in an on-line command mode.  This is achieved
by sending lo the modem a sequence of three ASCII characters specified by
register S2.  The default character is '+'.  The timing of the three
characters must comply with specific time constraints.  There is a guard
time before the first character (the pre-sequence lime), a guard time
following the third character (the post-sequence time), and a guard time-
out between the first and second characters and between the second and
third characters (the inter-character time).  These times are controlled by
the value recorded in register S12.

BASIC DIALING COMMANDS AND 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.

    Example:  AT D 555-8900   ENTER

    NOTE:  Your modem ignores the spaces and the dash (-).  Your modem
           dials the number and waits 30 seconds (default) for a response
           from the called modem.  If the remote modem answers, your modem
           sends the CONNECT, CONNECT 14,400, or CONNECT 9600 result code,
           depending on the other modem's speed.  Your modem then enters
           the communication mode and begins communicating with the remote
           modem.  If your modem does not hear another modem, it returns a
           NO CARRIER or BUSY result code.

Pause (,)

    A comma in the dial sequence tells your 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.

    Example:  ATD9, 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 your 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 telephone system that requires an access code for a long-
    distance number:

    Example:  ATD23W555-1893   ENTER   Dial 23 (long distance code), wait
              for a dial tone, dial 555- 1893.

You can use the ATXn command (See AT Command Set) and the contents of
Register S7 determine how long the modem waits for the dial tone. If you
set X2 or X4, your modem wails for 5 seconds.  Otherwise, your modem waits
for the time set by Register S7.  If your modem does not hear a dial tone
within the specified time, it returns NO DIALTONE. 

Wait for Silence (@)

    An @ in the dial sequence causes your 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.  Your
    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.

    Example:  ATDT 555-2323@23   ENTER   Dial 555-2323, 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 your telephone).  Some phone systems use this function
    to transfer calls.

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

Touch Tone Dialing (T) and Optional Pulse Dialing (P)

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

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

    Your 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.

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

Return to Command Mode (;)

    A ; in the dial sequence tells your 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.

    Example:  ATD 555-8373   ENTER   Dial 555-8373.

Auto-Dialing Voice Calls

    You can have your modem dial any telephone number, even if a computer
    is not connected to the other phone. Lift your 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 your
    modem.

    Example:  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 "Modem S-Registers" for complete information about these
    registers. 

Auto Answer Operation

    You can set your modem to automatically answer calls. This can be a 
    useful feature if you need to access your 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 your 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).

    Example:  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 your computer.

    If your 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 your telephone rings when auto answer is disabled, your modem
    returns a RING result code and does not answer.  You can use the
    Immediate Answer command (A) to have your modem pick up the phone line.

Immediate Answer (A)

    You can force your 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 your telephone rings, and you want your 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

Registers S0, S7, and S9 control the answer mode timing.

(ALL/tmc-04/08/95)