-----------------

The   way   calls   were  made  with  older  telephone  systems
illustrates  how  modems  make  connections.  By  talking   the
receiver  off  the  hook,  then  turning  a  crank,  you got an
operator to come on the line. You told the operator the  number
you wanted, and waited for the call to be placed for you. Until
the  person on the other end picked up the receiver, you stayed
connected to the operator. The operator generally reported  the
progress of the call, then gave the line to you to wait for the
person  on  the  other  end  to  answer.  Your  modem, like the
operator, responds to your commands to dial a number or  answer
a  call,  then  gives  the  line to your computer to begin data
communications when the connection is made.


        ------------------------------------

Like telephones that store the  numbers  you  frequently  dial,
communications  software  automates  your connections. This can
range from saving numbers in a "telephone book"  so  you  don't
have  to look them up and enter them each time, to handling the
complete process from dialing through file transfer.

You can use what is called  "terminal  emulation"  software  to
issue  modem  commands that set up the modem and dial a number,
but just as you make selections from within your word processor
or spreadsheet software to use  a  printer,  the  easiest  most
effective  way  to  use  your  modem  is through communications
software. Once you've made the connections to your computer and
the telephone lines, you can almost forget the modem is  there,
and  access  its features through the software. In the same way
you don't have to issue commands directly to the  printer,  you
can  simply  reach  for the printout, knowing that the software
has taken care of everything. Your new  modem  will  work  with
nearly   any  communications  software  designed  for  personal
computers. Regardless of its level of sophistication,  software
is  required  to  provide  the  link between your modem and the
computer's keyboard.

If your software has a problem communicating  with  the  modem,
you'll  know  when  you  start  the program or when you run the
software's installation procedure. A message  like  "modem  not
responding",  means  the software is not recognizing the modem.
If you've made the port selection with the software  and  still
can't  make  a  connection,  you'll need to use the software to
manually change some of the settings that control how the modem
operates.

Most  programs   have   an   option   for   setting   a   modem
"initialization"  or  "command"  string  to set the modem up to
talk to the computer the way the software expects. The  changes
will  probably  involve  the way the modem and the computer use
the signals to  talk  to  each  other  across  the  cable  that
connects  them. Most programs that do not work with the modem's
factory settings will operate properly if you  change  the  way
the modem uses the signal on the DCD and DTR line. For example,
at  the  command  line  or  window  in  which  you adjust these
settings, simply type AT&C1&D2, or add &D2&C1 to the string. If
the  string  contains  &K3,  &F,  or  &W  remove  them.  (These
ampersand-letternumber combinations are modem AT commands.) The
software  will  use the AT commands you put in this string each
time it sets up the modem.

For software that requires additional modem setup, refer to the
software manual for specific descriptions of the settings  that
frequently   need  to  be  adjusted  are  result  code  display
(messages the modem send in response to  commands),  and  local
character  echo  (the  way  your  commands are displayed on the
screen). These and other options are easily specified  with  an
initialization  string, or with the AT Command Set described in
the following pages. If your software requires more settings to
be changed, check your software's user's guide, then  refer  to
the  sections  that  follow  for the particular command option.
With the setup string in place, you will be able  to  use  your
software  to  place and answer calls to go on-line with another
computer without issuing the commands to setup the  modem  each
time you start the program.


        --------------------------

If  you  find it necessary to communicate directly to the modem
to set it up or to  initiate  calls,  you  are  probably  using
terminal  emulation software. This means that the only function
the software provides is linking your keyboard  input  directly
to  the  modem.  This  would  be  like  connecting your printer
directly to your keyboard; what you type would  appear  on  the
screen, and be sent out to the printer.

Unless  you  have  selected  the option that some programs call
"local mode" or "go local", communications  software  does  not
operate in this way. For certain uses, like determining whether
there  is a problem with your modem, the software, the line, or
the other modem, this is a helpful way of talking to the modem.
The next sections explain in detail how to setup your modem and
initiate and answer calls using AT Commands once your  software
has linked your keyboard to the modem.


        -------------------

The Hayes Standard AT Command Set for intelligent modems is the
language   understood   by   most  modems  used  with  personal
computers. AT commands can be used to set up the modem to  suit
the   way   your  software  and/or  computer  wants  it  to  be
configured. They can be used for dialing or answering. However,
AT commands are not used to perform  communications  activities
like  sending  a  file.  Once  on-line,  you'll be talking with
another computer.  The  command  to  break  the  connection  is
probably  the  only instruction you would issue after going on-
line.


        -----------------

Modem commands begin with an AT prefix that  gets  the  modem's
attention  (also tells the modem the speed and character format
of the data  coming  from  the  computer).  The  AT  prefix  is
followed by the command(s). The modem executes the command line
when  you  press the key on your keyboard that you normally use
to send commands. The command descriptions here show  this  key
as  ,  although  it  may  be  labeled  on  your keyboard as
carriage return, Enter, or Return.  For  example,  the  command
line  ATV0  gets  the  modem's  attention  and  uses the V0
command option to tell the modem to display  the  responses  to
commands (result codes) as numbers rather than as words (the V1
option  is  the factory setting). The  sends the command to
the modem.

Many commands are used to select between two or  more  options.
Numeric parameters indicate the form of the command you want to
be  in  effect.  If  you  issue  a command without specifying a
numeric parameter, the modem assumes the 0 command option.  For
example,  Q  tell  the modem to respond to commands with result
codes. Issuing Q1 tells the modem  not  to  respond  to  result
codes (some software programs call this "quiet mode"). Q and Q0
are equivalent.

A  command  line  can contain as many as 40 characters (the AT,
spaces, and the  are not counted). The command  prefix  can
be  entered in either all upper case or all lower case letters,
but not in a combination (e.g., AT or at, but not At or aT).

If you need to change something in the line before entering the
, use the backspace key. To abort the  command  line,  hold
down the key your computer recognizes as the control key (ctrl)
and  press  "x". The modem will return OK without executing the
command(s) on the line.

    Moving Between Command and On-line States.

----------------------------------------- Before beginning communications or after "hanging up," the modem is in command state, ready to accept configuration commands or to go on-line when you instruct it to dial the number of a remote modem. You may also place the modem in command state from the on-line state without breaking the connection.

    Escape Sequence -- +++.

---------------------- Not actually a command, the escape sequence tells the modem to "escape" or leave the on-line state and enter the command state. The sequence consists of a single character issued three times in succession. A one second "guard time" interval prevents the modem from mistaking a ramdom occurrence of of the same three characters as the escape sequence. The character used in the sequence and the duration of the guard time can be changed by writing values to the modem's S-Registers (special memory locations described later in this guide). To issue the escape sequence simply hold down the shift key and press the plus key three times (+++). Be sure to pause at least a second before and after issuing the three characters. If operating properly, the modem will return the OK result code as an indication it is ready to accept commands.

    On-Line Command -- O (letter, not the number 0).

-------------------- This command returns the modem from command state to on-line state when a connection has been "escaped" but not broken. If you have placed the modem in command state and are still connected to the remote system, issue ATO to go back on- line. What you type will then be transmitted to the modem attached to computer on the other end of the line. If the connection is broken, to go on-line again you must instruct the modem to re-dial the telephone number.

    Getting On-Line.

--------------- In the same way voice telephone calls are made, one of the modems must originate the call, and the other must be set up to answer the incoming call. Either modem may originate or answer the call. The following examples illustrate how to use the modem to place and answer calls from your computer.

    Originating a Call.

------------------ To originate a call with another system, issue the D command to "dial" the number. This command instructs the modem to go off hook, claim the telephone line, and originate a call. When you issue dialing commands to the modem, the data is communicated to the modem, but does not pass across the telephone line. The following dial modifiers specify the number and method the modem uses to dial. T Specifies Tone method for subsequent dialing; follows the D command and precedes telephone number; can be issued as a command separate from dialing string. P Specifies Pulse method for subsequent dialings; follows the D command and precedes telephone number; can be issued as a command separate from dialing string. (factory setting). , Pause 2 seconds before continuing to process the characters in the dialing string. ; Return to command state after dialing and maintain connection. This modifier is useful in situations like electronic banking where the modem needs to stay in command state to receive other connection instructions. 0-9 Numbers and characters for the modem to dial. *,# A typical dial command such as as ATD,T5552368 gets the modem's attention (AT), instructs it to go off hook to originate a call (D), pause 2 seconds (,), and use the tone method (T) to dial the telephone number (5552368). The sends the commands to the modem. Answering a Call. ---------------- Incoming calls to your modem can be answered in either of two ways: you can issue a command to the modem when you hear the telephone ring, or can also set up the modem to answer automatically when it detects a number of rings. Answering Manually - A. ---------------------- To manually answer a call from a remote system, issue the A command. ATA instructs the modem to go off hook, take control of the line, issue an answer tone, and connect with the incoming call. This command is used when the phone is ringing and you are expecting a modem call (rather than a voice call). Answering Automatically - S0=n. ------------------------------ One of the modem's S-Registers provides the capability for automatic answer. The S0=n command ("0" is the number of the register or memory location; "n" is the number of rings to wait before answering) lets you specify the number of rings. Setting S0 to a number other than its factory setting of 0 configures the modem for auto-answer. The modem will then operate the same way as a telephone answering machine, picking up the phone after it detects the specified number of rings. For example, ATS0=3 sets up the modem to go off hook and issue answer tone (no ATA is necessary) when the modem detects the third ring. Communicating While On-Line. --------------------------- When you are connected (on-line), data is passed across the line between the two computers. Either party can type information to the other. Characters received by the modem on the other end of the connection will be displayed to the screen. The user on the other end can also type characters to your screen. Sentences and words will mix on the screen, however, if you both type at the same time. If you cannot see what you are typing, you will need to change the local character echo setting (see Configuration Options later in this guide). Terminating a Call. ------------------ Whenever you are ready to end communications, you must issue the escape sequence (+++) to place the modem in the command state. Then use the H command to hang up: ATH. This command puts the modem on hook and releases control of the line, so it can be used by a telephone. Unexpected interruptions to communication occur with modem connections just as with telephone calls. Line noise, equipment malfunction, and user error can all contribute to disruptions in communication. The modem indicates a loss of connection with the NO CARRIER result code. To re-establish the connection, simply re-dial the number. To interrupt call placement during the handshaking process, you can press any key before the two modems connect. Monitoring Operation and Call Progress. -------------------------------------- When you send a command or issue the escape sequence, the modem responds with a "result code." If it understands the instructions, the modem will return the OK result code; if it does not understand, the modem will return the ERROR result code. The modem also provides call progress messages to let you know how your connection attempt is going: Result Code Explanation. ------------------------------------------- 0 OK Command reconized and accepted. 1 CONNECT Connection established at 0-300 if X1, X2, X3, or X4 is selected (no speed indicated if X0 is selected). 2 RING Incoming Call 3 NO CARRIER Carrier signal lost or not detected. 4 ERROR Command not recognized; command line exceeds 40 characters or in an improper format; modem checksum incorrect. 5 CONNECT 1200 Connection established at 1200bps if X1, X2, X3, or X4 is selected. 6 NO DIAL TONE Dial tone not detected when expected. 7 BUSY Number dialed is use. 10 CONNECT 2400 Connection established at 2400bps if X1, X2, X3, or X4 selected (for modems that support 2400bps) The X command allows you to set up the modem for a variety of call progress monitoring options and corresponding result codes. Regardless of the option selected, the modem will report the OK, CONNECT, RING, NO CARRIER, and ERROR result codes. Other call progress monitoring feature combinations, like reporting 1200bps and 2400bps connections, detection of busy signal, and no dial tone can be selected with the various command oprions. ------------------------------------------------------------------- Result Code... X0 X1 X2 X3 X4. ------------------------------------------------------------------- OK Y Y Y Y Y CONNECT Y Y Y Y Y RING Y Y Y Y Y NO CARRIER Y Y Y Y Y BUSY Y Y NO DIAL TONE Y Y ERROR Y Y Y Y Y CONNECT 1200 Y Y Y Y CONNECT 2400 Y Y Y Y ------------------------------------------------------------------- If you want the modem to wait for a dial tone before dialing, you should select either the X2 or X4 command options. Either of these configures the modem to wait until it detects a dial tone before proceeding; if it does not, it returns the NO DIAL TONE result code. The same is true for configuring the modem's response to a busy signal; if X1 or X4 is selected, the modem recognizes a busy signal from the other end and returns the BUSY result code. The X4 option provides full call progress monitoring. However, X0 is the factory setting because many software programs expect 1200bps modems to be configured initially with the basic call progress capabilities and corresponding result codes. Managing Modem Configuration. ---------------------------- When your modem is first installed and powered up, it is configured with the settings selected at the factory. The options specified for each command and the value is each of the modem's S-Registers determine how the modem operates. The modem's factory settings suit a wide range of user applications, while taking advantage of the modem's full capabilities. Creating a Special Configuration. -------------------------------- If your software or the system with which you are attempting to connect requires that you set up the modem to operate other than with factory settings for commands and S-Registers, you can create a special configuration, or profile, by issuing AT commands. The configuration you create will be used until you issue commands to change the settings, or reset the modem (either with the Z command or by unplugging/replugging it). Resetting the Modem. -------------------- If the modem ever seems to be set in a way that makes it not communicate as it should, or if you simply want to restore the factory settings, you can reset it with the Z command. ATZ performs a "soft reset," replacing values currently in S- Registers and AT command options to factory settings. The modem's factory configuration is also recalled when the modem is unplugged and plugged back in, or if power is lost to the wall plug. If you are experiencing any difficulty with the modem, you may wish to issue the Z command before unplugging the modem or issuing the test commands. Adjusting Modem Speed. --------------------- Modem speed is measured in bits per second(bps). For example, if Hayes Personal Modem 1200 is operating at its highest rate, data will be transmitted at 1200bps. This speed is not set by an AT command; it is the speed at which the software sends the AT prefix (within the range supported by the modem) that determines the speed at which the modem attempts to make the next connection. Some programs offer an option for transmission speed, often called "baud rate," to specify the speed of the connection. The software sends the AT prefix at the desired speed. In addition, the transmission rate of the connection will be determined by the highest common speed supported by the two connecting modems. For example, if the modem at the other end is capable of a maximum speed of 300bps, the connection and data transmission will be at 300bps, even if your modem can communicate at 1200bps or 2400bps. Choosing a Communication Standard. --------------------------------- Communication standards are protocols that determine how the modems perform their connection handshake and the format and speed used to transmit data. For example, connections at 300bps use the domestic 103 standard; connections at 1200bps use the domestic 212A standard. Because standards are closely linked to speed, the modem selects the appropriate standard as it adjusts to the speed. Testing the Modem. ----------------- In addition to the diagnostics the modem automatically performs each time it is powered up, the I command can be used to gain information about the modem. I0 Modem reports Hayes product code. I1 Modem calculates and reports ROM Checksum (3- digit number). The results of these tests are primarily used by Hayes Customer Service and certain software programs to determine the manufacturer/model of the modem you are using, and its feature set. Refer to the descriptions in the Personal Modem Installation Guide for troubleshooting suggestions. If you are able to issue commands to the modem and it returns an OK result code, the modem is probably operating correctly. If the modem does not seem to be responding, try resetting the modem (see above). Setting Local Character Echo. ---------------------------- Your computer and software combination may require that you adjust the character echo feature of your modem to provide display of characters as you type commands, or to prevent double characters. Two options are available: E0 Modem does not return (echo) characters from the keyboards to the screen when in command state. E1 Modem returns (echoes) characters typed from the keyboard to the screen when in command state (factory setting). This command is effective only if you are entering instructions from a command line. The settings for this command do not affect the display of characters while you are on-line with another system. The software or remote system must provide on- line character echo, if desired. Adjusting Result Code Display. ----------------------------- The two commands below configure the modem's use of result codes. Q0 Modem responds to commands with result codes (factory setting). Q1 Modem does not respond to commands with result codes. V0 Modem reports result codes as numbers. V1 Modem reports result codes as words (factory setting). Some software requires that result codes not be displayed, or that they be numbered rather than as words. Configuring Modem Signals. ------------------------- Some computers or software expects settings for signalling between modems and between the modem and the computer to be configured in ways other than that set at the factory. Any special modem-to-computer signalling requirements should be described by your software's user's guide or your computer's owner's manual. The C command controls the modem's response to an incoming carrier signal over the line from the remote modem. C0 Modem ignores an incoming carrier signal; the transmitter carrier is always off. C1 Modem turns the transmit carrier signal on and off to reflect the presence of and incoming carrier signal. When the modem originates a call, answers a call, or is connected to another system, the signal is on, and is off when the modem is not in one of these situations (factory setting). The &C command determines the way the modem uses the carrier signal when controlling the Data Carrier Detect (DCD) line (pin 2 on modem-to-computer cable; pin 8 with 25-pin adapter): &C0 Modem presumes the presence of the carrier signal and maintains the DCD signal on at all times. &C1 Modem turns the DCD signal on when it detects a carrier signal from the modem on the other end of the telephone line, and off when it does not (factory setting). The &D command selects the modem's response to signal sent from the computer on the Data Terminal Ready(DTR) signal (pin 1 on the modem-to-computer cable; pin 20 with 25-pin adapter): &D0 Modem presumes presence of DTR signal and ignores the actual status of the signal (factory setting). &D1 Modem monitors DTR signal. When communications software is used to cause an on-to-off transition of DTR signal, the modem enters command state and ignores AT commands. When the software causes an off-to-on transition of DTR, the modem will again respond to AT commands and can be returned to the on-line state (if the connection has not been broken) with the AT0. &D2 Modem monitors DTR signal. When communications software is used to cause an on-to-off transition of DTR, the modem will again respond to AT commands. Writing to the Modem's S-Registers. ---------------------------------- S-Registers provide special access to settings that determine modem operation. The factory-set values stored in these registers are recalled and used to control the modem each time it is powered up or reset. Aside from using S0 to store the number of rings for automatic answer (described earlier), you will have little need to change an S-Register value. However, if your use of the modem requires that one or more of these be changed, you can do so by using the Sr command: Sr? Modem reads and responds with the value of register "r" (r=number of register; "?" requests the value). Sr=n Modem sets the value of register "r" to "n" (n=value within the range of the register). Writing to the modem's S-Registers is not recommended unless your use of the modem requires that one or more of these settings be changed. For your reference, the modem's S-Registers, their function, ranges in units, and factory settings are provided in the chart below. ------------------------------------------------------------------- S-Register Number & Units Range Factory Function Setting ------------------------------------------------------------------- S0 Ring to answer on Rings 0-255 0 S1 Rings received Rings 0-255 0 S2 Escape sequence ASCII 0-127 43 (+) character S3 Carriage return ASCII 0-127 13 (CR) character S4 Linefeed character ASCII 0-127 10 (LF) S5 Backspace character ASCII fixed at 8 (BS) S6 Wait time for dial seconds fixed at 4 tone S7 Wait time for carrier seconds fixed at 45 S8 Duration of comma seconds fixed at 2 S9 Carrier detect 1/10 sec 1-255 6 response time S10 Delay between loss 1/10 sec 1-255 7 of carrier signal and modem hang up S11 Duration of DTMF msec fixed at 95 tones for dialing S12 Escape sequence 1/50 sec 20-255 50 guard time S25 Delay between loss 10 mec 1-255 5 of DTR signal and modem hangup S30 Delay time from no 10 sec 0-255 60 modem activity until auto hangup ------------------------------------------------------------------- Cable Connections. ----------------- The table below describes the pin number on the modem's cable, the direction the signal pass, and the name of the signal used by the modem. --------------------------------------------------------- Pin HOST_Direction_Equip Signal --------------------------------------------------------- 1 ------------> DTR - data terminal ready 2 <----------- DCD - data carrier detect 3 ------------> TxD - transmit data 4 Not applicable ground - signal ground 5 <----------- RxD - receive data 6 <----------- DSR/CTS - data set ready/clear to send 7 <----------- RI - ring indicator 8 Not applicable ground - signal ground --------------------------------------------------------- The housing of the connector provides a shield that reduces noise and interference. The actual pin number on which a signal is carried will vary depending on the adapter used. The table below cross-refrences the pin numbers used for signals on the 8-pin DIN with those for the adapters provided with your modem. Data Data Terminal Comunication Equip Equipment DB-9 DB-25 Signal ----------------------------------------------------- 1 <--- 8 DCD Data Carrier Detect "Модем: соединен" 2 <--- 3 RxD Receive Data 3 ---> 2 TxD Transmit Data 4 ---> 20 DTR Data Terminal Ready "Host включен" 5 7 signal ground 6 <--- 5 DSR Data Set Ready "Модем включен" 7 ---> 4 RTS Request To Send "Host: я готов" 8 <--- 5 CTS Clear To Send "Модем:я готов" 9 <--- 22 RI Ring Indicator NOTE: If you construct an adapter for use with the modem, consult your computer's owner's manual for the signals supported and the appropriate pin numbering.

Популярность: 41, Last-modified: Sat, 22 Oct 1994 01:05:17 GMT