4. S-Registers
Example: Writing to an S-Register
Bit-Mapped Options S-Registers
Example: Setting an S-Register
Example: Interpreting an S-Register
Alphanumeric List of S-Registers
1.Using AT Commands
Communications programs control your modem by issuing modem instructions
called AT commands. While it is usually easiest to let the communication
software handle the task of issuing AT commands, there may be occasions
when you will want to control a series of commands yourself. The information
that follows is included to allow you to tailor your modem for specific needs.
If you want to send AT commands to your modem directly, you must be running
a data communication program. (You cannot send AT commands from your
operating system prompt.) Once the communication program is started, you
must put it into terminal mode. Many programs do this automatically. Your
modem must also be in command mode (see Some Notes About AT Commands) to
accept AT command strings. To verify whether your modem is in the proper
mode, type AT <Enter>. If the modem responds with an OK message, you are all
set.
AT commands must:
1. Start with the command string AT
2. Contain one or more of the commands listed in this chapter
3. End with a carriage return (shown in this book as <Enter>).
The following notation conventions are used in this chapter:
•AT commands and messages are shown in italics, like so:
AT &F0 <Enter>.
•Factory default settings for commands are shown in bold. These settings are
in effect until you issue a command altering the setting. For instance, the
default setting for Bn is B1. To return the modem to its factory default
settings at any time, type AT &F0 <Enter>.
•S-registers affected by, or related to, particular AT commands are listed in
brackets at the end of the command descriptions. Similarly, the AT
commands that affect, or are related to, the contents of an S-register are
listed at the end of each S-register description.
Refer to Table 1-1 for a summary of the basic AT commands. Refer to ATCommands for the complete list of AT commands.
Commands preceded by AT and followed by <Enter>:
DDial the following number using the default or previous method (tone
or pulse).
DTDial the following number using tones.
DPDial the following number using pulses.
DS= n Dial stored number n.
WWait for dial tone before dialing.
HHang up the phone.
OGo on-line (switch from command mode to data mode). Used to resume
interrupted communications when the remote modem is still on-line.
Sr?Read S-register r.
Sr=n Write value n to S-register r.
ZnReset and recall saved profile n.
&FnRecall factory configuration n.
&VDisplay current configuration and stored profiles.
&Wn Save current configuration as profile n.
&Zn=xSave x as stored telephone number n.
•Some AT commands override other AT commands. For example, issuing AT
&K3 &K4 <Enter> will not enable both hardware flow control (&K3) and
software flow control (&K4), it will only enable software flow control. The
latter command overrides the former.
•If you do not specify a number on commands that end in a number, the
modem will take the number to be 0. So, for example, AT B and AT B0
achieve the same effect: setting communications to the CCITT standard. This
feature can be useful if you wish to save space when issuing commands.
•If your modem is on-line and you want to issue an AT command string to
your modem without disrupting your connection, you can bring your
modem into command mode by typing a special escape sequence. To issue
the escape sequence you must first not transmit any data for a period equal
to the guard time, which by default is one second. Then type +++ quickly. Do
NOT press <Enter>. Instead, wait for another second. The modem will respond
to this step with an OK message. Now your modem is ready to accept AT
command strings. When you want to resume your on-line connection, type
ATO <Enter>.
Configuring the Modem
By default, your modem is set up to automatically detect the appropriate line
speed, use hardware flow control, and connect using error correction and data
compression protocols, if possible. These settings are stored in read-only
memory (ROM) at the factory and can be recovered at any time by issuing the
&F0 command, described later in the chapter. If the factory settings do not
meet your needs, (say for instance, your software does not support hardware
flow control), you can define and store your own configurations into
nonvolatile memory using the &Wn command. You can then recover these
configurations at any time with the Zn command. Both &Wn and Zn are
described more fully later in the chapter.
These stored configurations are called profiles. Not all AT command settings
and S-registers can be stored as a part of a profile. The ones that can be stored
are so noted. Several sample modem configurations are shown below. These are
examples of profiles you might store in memory as your user-definable
profiles. You can store two user-defined profiles.
Sample Configuration 1
One useful configuration is obtained by typing AT &F0 &C1 &D2 &W0 <Enter>.
These commands have the following effect:
•&F0 restores the factory default configuration, turning on line speed
detection, hardware flow control, error correction, and data compression.
In other words, if the remote modem will allow it, your modem will use all
of its most advanced features.
•&C1 forces the carrier detect (CD) signal to follow the state of the carrier.
This allows your communications software to properly determine whether
the modem is on-line or off-line.
•&D2 instructs your modem to hang up when the data terminal ready (DTR)
signal drops. This will speed up the hang-up process for most
communications software packages.
•&W0 stores this configuration as profile 0. Now whenever you type ATZ
<Enter>, you will restore this profile.
NOTE: Since your modem will be using hardware flow control,
your communications software must also be set for hardware
flow control. In addition, to take advantage of the possible 4:1
data compression provided by V.42bis, you should set your
communications package to lock the DTE rate to the highest
speed possible: up to 115200 bps.
Sample Configuration 2
If you are using software that does not support hardware flow control, then
you might use the following configuration: AT &F0 &C1 &D2 &K4 <Enter>.
This configuration is identical to that of the previous example, except that &K4
is used to enable software flow control rather than hardware flow control.
Note that software flow control must be used with caution. Do NOT use software
flow control when you are transferring files that might naturally contain XON
and XOFF characters, such as binary files. Also, do not use software flow control
when you are transferring files using protocols like XMODEM or ZMODEM.
NOTE: If your modem is configured to use software flow control,
then you must also set your communications software to use
software flow control.
Sample Configuration 3
If your software does not support hardware flow control, but you would like to
transfer files with a protocol like XMODEM or ZMODEM, you should try
configuring your modem as follows: AT &F0 &C1 &D2 &K0 &Q0 \J1 <Enter>.
The first three commands are the same as described in the first example. &K0
turns off all flow control. &Q0 specifies a direct connection, which is a
connection without flow control, data compression, or error correction. \J1
forces the data terminal equipment (DTE) rate to match the data
communication equipment (DCE) rate, which is required when all flow control
is disabled. In this case, you must set your terminal speed to match the line
speed, e.g., 14.4 Kbps.
This configuration is not reliable for high-speed connections unless
transferring files with newer XMODEM or ZMODEM protocols: XMODEM and
ZMODEM protocols have error correction built into them. Also, to ensure that
file transfer is reliable, make sure that the protocol does not use packet sizes
that are too large.
AT Commands
This section lists the AT commands which the modem uses. This listing is
organized by the nonalphabetic first character after “AT” (i.e., no letter, &, %,
\, ), @, *, :, and -), and then in alphanumeric order. The default settings are
listed in bold.
AAnswer Command. This command causes the modem to attempt to answer an
incoming call. The modem will make its attempt regardless of whether the
modem is in auto-answer mode or not. This command should be issued after
the RING result code is seen (when another modem is attempting to
connect).
A/ Re-executes the previous command line. This command is NOT preceded by
AT or followed by <Enter>.
Bn CCITT/Bell Setting. This command selects either the CCITT standard or the
Bell standard for 300 and 1200 bps communications. (See S27.)
B0 CCITT V.22 for 1200bps, CCITT V.21 for 300bps.
B1 BELL 212A FOR 1200BPS, BELL 103 FOR 300BPS.
C1 Carrier Control Command. This command is included for compatibility only
and performs no function other than to return an OK message.
Dn Dial Command. This command directs the modem to go off-hook, wait for a
dialtone, and dial the number indicated in the dial string, n. The dial string
may contain the characters 0-9 for pulse-mode dialing or 0-9, A-D, *, and #
for touch-tone dialing. Spaces, hyphens, and parentheses can be included
in the command to improve readability. For example, D (123) 456-7890 and
D1234567890 are equivalent.
In addition, the dial string may contain these dial command modifiers:
LRedial the last valid number entered.
PPulse-mode dialing. (See S14.)
TTouch-tone dialing. (See S14.)
S=nDial 1 of 4 stored telephone number, where n is 0, 1, 2, or 3. (See &Zn)
W Wait for a dialtone. (See S7.)
,Pause before dialing the digits that follow. (See S8.)
@ Wait for quiet answer. Wait for one or more rings followed by at least
five seconds of silence before continuing with execution of the dial
string. This is useful for transferring calls on some PBX systems.
;Return the modem to command state. When placed at the end of the dial
string, this puts the modem into command mode. While in command
mode, the modem will not attempt to connect with the remote modem.
!Put the modem briefly on-hook. This can be useful for transferring
calls on some telephone systems. (See S29.)
^Toggles calling tone for this call only.
JPerform MNP10 link negotiation at 1200 bps for this call only (see *H).
KEnable power level adjustment during MNP 10 link negotiation for this
call only (see “)Mn”).
& Wait for credit card bong before continuing with the dial string. If the
bong is not detected within the time specified in S7, the dial string will
be aborted, dialing terminated, and an error message generated.
RAccepted but causes no action.
En Local Echo Setting. This command determines whether the commands you
type are echoed to the screen. (See S14.)
E0 Disable command echo.
E1 ENABLE COMMAND ECHO.
NOTE: If you see duplicate characters, then both your modem
local echo and your application software local echo are enabled.
Fn Line Connection Speed Setting. This command is not supported in V.34
modems but reports OK for compatability. N0 or +MS, and S37 may be used to
force a particular connect mode.
Loading...
+ 10 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.