   APPENDIX A.  LINK NEGOTIATION (HANDSHAKING)
                             AND ERROR CONTROL

      

      This appendix includes detailed
      information on how USRobotics HST and
      V.32 bis modems negotiate with remote
      modems for the rate and other
      characteristics of each connection.  You
      may find it helpful if you are having
      difficulty connecting with another
      modem.

      In addition, you'll find information on
      error control and, especially useful,
      some statistics and guidelines on using
      the modem for the best throughput.

      The following text relies on familiarity
      with two terms used in this manual, ARQ
      and DTE.  ARQ (automatic repeat request)
      designates a connection under error
      control.  DTE (data terminating
      equipment) means the computer or
      terminal to which the modem is attached.
      DTE rate is the same as serial port
      rate.


LINK NEGOTIATION (HANDSHAKING)

      During high-speed link negotiation,
      timing and procedures differ for HST or
      V.32 bis modulation, as follows.



HST Mode

      Serial port rate:
        57.6K/38.4K/19.2K/9600 bps (57.6K,
        38.4K, or 19.2K required for 16.8K or
        14.4K connections)
      Modem settings:  B1, &B1, &H1/&H2/&H3,
        &M4/&M5, &N0

      1. The modems begin handshaking by
         training (synchronizing) at 2400 bps
         and exchanging information on their
         error control, data compression, and
         speed capabilities.

      2. Once the modems enable error control,
         handshaking proceeds as follows.  If
         the remote modem is operating at 2400
         bps or lower, the Courier stays at
         2400 bps or falls back to match the
         remote modem's slower rate.

         If the remote modem is HST-compatible
         and operating at a higher speed, both
         modems shift up and train at 9600
         bps.  From there, depending on the
         speed of the remote modem,
         they shift up again to 12K bps, 14.4K
         bps, and again to 16.8K bps; or they
         fall back to 7200 bps and again to
         4800 bps, if the remote modem is
         operating at one of those lower
         speeds.

         Initially, the high-speed channel is
         allocated to the answering modem, the
         450-bps channel to the calling modem.
         This allocation reverses if the
         calling modem has more data to
         transmit than the answering modem.


Specialized High-Speed Connect

      It's possible for two modems in HST mode
      to connect directly at 9600, 12K, 14.4K
      or 16.8K bps, without 2400-bps hand-
      shaking.  However, this is only
      recommended for faster connections in
      specialized installations where the
      computer and software manage error
      control.  The reason is that there can
      be no error control because HST modems
      negotiate error control during 2400 bps
      handshaking.

      Both modems must be set as follows.
      High speed handshaking requires a fixed
      link rate:  the modem only connects if
      the remote modem is operating at the
      same link rate9600 (&N6), 12K (&N7),
      14.4K bps (&N8), or 16.8K bps (&N9).

      Serial port rate:
        57.6K/38.4K/19.2K/9600 bps (57.6K,
        38.4K, or 19.2K required for 16.8K or
        14.4K connections)
      Modem settings:  B1, &B1, &H1/&H2/&H3,
        &M0, &N6/&N7/&N8/&N9


HST Mode, Error Control Disabled

      If error control is disabledthat is,
      the Courier HST is set to &M0 or the
      remote modem isn't set for error control
      and the Courier HST reverts to &M0the
      Courier operates in one of the following
      ways.

      1. If set to &N0, it only connects at
         2400 bps or lower.  This ensures that
         there will not be data transfer at
         high speeds unless the call is
         protected by error control.

         Courier HST modems negotiate error
         control during 2400 bps handshaking.
         If they cannot connect under error
         control, they stay at 2400 bps.  Or,
         if the remote modem is operating at a
         lower rate, the Courier HST switches
         to the lower rate.

      2. If set to &N6, &N7, &N8 or &N9, the
         Courier will handshake at the higher
         speed, 9600, 12K, 14.4K or 16.8K bps,
         as shown in the previous
         configuration example, Specialized
         High-Speed Connect.  However, that
         configuration example should only be
         used in the special situation
         described, where the system takes
         care of error control.

      NOTE:  Without error control, there are
      no high speed line reversals.  The high
      speed channel is always allocated to the
      answering modem.  Also, there is no
      online fallback to protect the
      connection on impaired lines.

V.32 bis Mode

      The handshaking described immediately
      following this paragraph adheres
      precisely to the CCITT recommendation.
      In addition, USRobotics V.32 bis modems,
      when connecting with each other, use an
      enhanced proprietary handshaking
      procedure which allows them to connect
      faster and to retrain faster during
      calls.  They must, however, establish a
      V.42 error control connection.  This
      proprietary handshaking is described
      after the next section, under USRobotics
      V.32 bis to V.32 bis.


V.32 bis

      NOTE:  High speed calls are highly
      vulnerable to errors unless the data is
      protected by error control.  The opera-
      tions described below take place even if
      one of the modems is not set for error
      control, thereby prohibiting error
      control for the call.

      Serial port rate:  57.6K/38.4K/19.2K bps
      Modem settings:  B0, &B1, &H1/&H2/&H3,
        &M4/&M5, &N0
      
      WARNING: Answering V.32 bis modems
      shift their serial port rate up to
      19.2K bps (for 14.4K bps connections)
      if the calling V.32 bis modem dials at
      14.4K or 12K bps.  The answering V.32
      bis modem then sends data to its
      computer at 19.2K bps.  If your
      computer is limited to a rate of 9600
      bps, disable high-speed modulation by
      setting Register S34 to a value of 3
      (ATS34=3).  The calling modem will then
      shift down to 9600 bps for a V.32, not
      V.32 bis, connection.
      

      1. The answering modem first sends out a
         2100 Hz answer tone identifying it as
         a V.32 or V.32 bis modem.  If the
         calling modem recognizes the tone,
         the modems connect at the highest
         possible speed, usually 14.4K bps.
         (If the calling modem is a V.32
         modem, its maximum speed is 9600 bps,
         and the modems may connect at that
         rate.  But see paragraph 3.)

      2. If the calling modem doesn't
         recognize the answer tone, the
         answering modem then sends a 2250 Hz
         answer tone used by 2400, 1200 or 300
         bps modems.  If the calling modem is
         operating at one of those rates, the
         modems connect at the calling modem's
         rate.

      3. If the modems don't connect as in
         paragraph 1 or 2, the answering V.32
         bis modem then sends extra V.32
         answer tones.  If the calling modem
         is a V.32 modem, the answering V.32
         bis modem shifts its speed down to
         9600 bps and the modems connect at
         that speed.  This extended V.32
         handshaking ensures connections with
         V.32 modems if they did not connect
         as in paragraph 1.

         It may even be necessary to extend
         the length of these tones if the
         modem is to answer older, "dumb" V.32
         modems.  Register S28 is used to
         modify the duration of these extra
         V.32 tones.  See S28 in Appendix B.


USRobotics V.32 bis to V.32 bis

      1. The modems first negotiate a V.42
         error control connection.  Speed
         negotiation is part of the V.42
         detection/LAPM sequence.  If they
         fail to make a V.42 connection, these
         modems follow the procedures
         described under V.32 bis, above.

      2. The Receiver of each modem dictates
         its modem's highest speed, with
         negotiation beginning at 7200 bps and
         proceeding upward to the 14.4K bps
         maximum.  This means that your
         modem's receiver may be operating at
         a different speed from your modem's
         transmitter, which operates at the
         same rate as the remote modem's
         receiver.  In other words, the rate
         at your modem's Originate frequency
         may be different from the rate at
         your modem's Answer frequency.

         Because of this asymmetrical design,
         one frequency may suffer line hits or
         other impairments, and fall back to a
         slower speed, while the other does
         not.  The result is more efficient
         line operation.  If the impairments
         are severe, the modems use normal
         retraining.


Dual Standard Handshaking

      Dual Standard modems always connect with
      each other, either in HST mode or in
      V.32 bis mode.  However, we  recommend
      that Dual Standard modems be set to B0
      and to &N0, so that they can connect
      with V.32 bis, HST and lower-speed
      modems, in both Originate and Answer
      modes.

      A Dual Standard modem set to B1 (HST)
      does not send out any V.32 bis or V.32
      answer tones, and therefore cannot
      answer calls in those modes.  When it is
      calling, however, and set to B1, it
      switches to V.32 bis mode if it detects
      the V.32 bis/V.32 answer tone.  It
      attempts to connect at 14.4K bps (V.32
      bis) or drops to 9600 bps (V.32).  The
      mode shift is for that call only.
      Similarly, a Dual Standard modem set to
      B0 will switch to HST mode for that call
      only if the other modem is operating in
      HST mode.


ERROR CONTROL AND THROUGHPUT

      

   Overview

      Error control is available for calls at
      1200 bps and above.  It can be disabled,
      although high speed calls (above 2400
      bps) should always be under error
      control. The operations defined in an
      error control protocol include the
      following:

          Establishment of compatibility
          Data frame formatting
          Error detection through Cyclic
           Redundancy Checking (CRC)
          Retransmission of corrupt data
           frames

      The Courier is set at the factory to
      &M4, causing it to try for an error
      control connection and, if that isn't
      possible, to proceed with the call in
      Normal mode.  The modem first tries for
      a V.42 connection, then an MNP
      connection.  The following information
      is based on the Courier's setting of
      &M4.
CCITT V.42 Handshaking

      This international standard includes a
      two-stage handshaking process:

          A Detection phase that is based on
           an exchange of predefined
           characters.
          LAPM (Link Access Procedures for
           Modems) Negotiation.  In this
           phase, the modems identify their
           capabilities concerning maximum
           data block size and the number of
           outstanding data blocks allowed
           before an acknowledgment is
           required.


MNP Handshaking

      This protocol is supported by the CCITT
      V.42 Recommendation.  It was originally
      developed by Microcom, Inc. and is now
      in the public domain.

      MNP is based on special protocol frames.
      If the remote modem doesn't recognize an
      MNP Link Request, error control isn't
      possible. (In HST asymmetrical mode,
      USRobotics modems use a proprietary
      scheme similar to MNP.)


Data Compression

      If the modems successfully establish a
      V.42 connection, they also negotiate for
      V.42 bis data compression.  If they
      successfully establish an MNP
      connection, they negotiate for MNP5 data
      compression.  The type of compression
      for a call, if any, is reported in the
      ATI6 display.
      Modems using V.42 bis compression
      negotiate the following options and
      report them in the ATI6 display.

          Dictionary size, that is, the
           amount of memory available for
           compression table entries.
           (Entries are codes devised for
           redundant data.  The data is packed
           into shorter data units, called
           code words, and unpacked by the
           receiving modem.)

           Possible sizes are as follows.
           USRobotics modems use 11-bit, or
           2048-entry dictionaries, but drop
           down if the
           remote modem uses a 512- or 1024-
           entry dictionary.  The size of the
           dictionary for a call is reported
           in the ATI6 display.

           Bits Entries
            9     512
            10    1024
            11    2048

          Maximum string length of each
           entry.  As the dictionary fills,
           the modem deletes the oldest unused
           strings.

      V.42 bis compression is more efficient
      than MNP5 compression in part because it
      dynamically deletes unusable strings.
      In addition, it works better with files
      that are already compressed.  These
      include .ARC files downloaded from many
      Bulletin Boards and 8-bit binary files,
      which seem to the modem to be
      compressed.

      MNP5 compression should not be used with
      such files because it adds data to them,
      which lessens throughput.  (The
      additional data is stripped when the
      file is decompressed by the remote
      modem.)  When transferring such files,
      it's best to set the modem to &K3:  this
      allows V.42 bis compression to work
      dynamically with the compressed data,
      but disables MNP5.


Flow Control

      Flow control of data from the computer
      is required under error control for two
      reasons:
      1. The transmitting modem buffers a copy
         of each frame it transmits to the
         remote end until it is acknowledged
         by the receiving modem.

      2. If errors are encountered,
         retransmission activity can cause a
         steady stream of data from the
         computer to overflow the buffer.


Throughput Guidelines

      The following guidelines should help to
      make the most of the modem's advanced
      performance features.  In many
      instances, experimentation and
      experience will indicate what works best
      for your applications.

      1. Optimal throughput is attained under
         the following conditions:

          The communications software allows
           fixing the DTE rate higher than the
           link rate, e.g., setting the soft-
           ware to 38.4K or 19.2K bps and
           setting the modem to &B1.

           If the software automatically
           switches bit rates to follow the
           link rate, the modem's DTE rate
           must be also set to follow the link
           rate for each call, &B0, and
           throughput will be limited.

           Installations with specialized
           software may want to enable a fixed
           DTE rate for ARQ calls and a
           variable DTE rate for non-ARQ
           calls.  See the &B2 command in
           Chapter 4.
          The call is under data compression.
          The data is comprised of text files
           rather than binary files such as
           .EXE or .COM files.  See the table
           at the end of this appendix.

      2. MNP5 compression is disabled for
         files that are already compressed and
         8-bit binary files, that appear to
         the modem to be already compressed.
         MNP5 is disabled by setting the modem
         to &K3.

      3. The file transfer is not slowed down
         by a file-transfer protocol.  Many
         non-text files require a file
         transfer protocol, but the results
         vary.  For example, certain public
         domain file transfer protocols have
         the following effects:

         Kermit  Throughput is severely
                 reduced due to Kermit's short
                 block lengths (under 128
                 bytes) and acknowledgment
                 turn-around time.

         Xmodem  Throughput may be reduced if
                 your version uses short block
                 lengths (128 bytes).  Some
                 versions user larger blocks
                 (1K blocks).  Throughput is
                 also reduced by overhead
                 (error control protocol
                 information).

         Ymodem  There is an improvement over
                 Xmodem, due to larger block
                 lengths (1K bytes), but
                 throughput is still reduced
                 by the protocol's error
                 control overhead.
         The above protocols further reduce
         throughput when an error control
         connection is established.  The
         accuracy of the data is checked
         twice, by the file transfer protocol
         and the modem.  To avoid redundancy,
         use the above protocols only for non-
         ARQ connections, and only at speeds
         of 2400 bps and below.

         For the best throughput, but on
         error-controlled connections only and
         with hardware flow control, we recom-
         mend the most current version of
         Zmodem.  Overhead is minimal with
         this protocol, with throughput almost
         equal to that obtained with no file-
         transfer protocol.  Leave the modem
         at its &M4 and &K1 settings for both
         error control and data compression.
         Ymodem-G is another good choice, but
         never without both the local and
         remote modems using error control:
         if Ymodem-G detects an error, it
         aborts the connection.  Do not use
         either protocol with software flow
         control (XON/XOFF signaling).


Achievable Throughput

      The table below indicates the maximum
      throughput, in characters per second
      (cps), that can normally be expected
      under the following conditions.
          Connection (link) rate of 14.4K bps
              DTE rate set at 57.6K bps;
           modem set to &B1
          V.42 bis compression negotiated for
           the call, and the default size 11-
           bit, 2048-entry dictionary
          Straight data (e.g., not already
           compressed, no file-transfer
           protocol)
          Transmission from a fast (e.g.,
           286) computer
                         Throughput (cps) when
      set to 14.4K bps
      File Type          MNP5      V.42 bis
      
      Assembler or Compiler listing     28
      80                 3840      
      Text file          2325-2625 3400-5760
      Binary file:  .EXE 2175-2400 2030-2600
      Binary file:  .COM 2100-2250 2050-2300
      .ARC files (common on BBS's)*     1500-
      1650               1700
      Random binary 8-bit*         1460-1575 1
      700
      * These files are already compressed
      or appear to the modem to be com-
      pressed.  Additional MNP5 compression
      causes throughput lower than what can
      be expected using MNP without
      compression.  We recommend setting
      the modem to &K3 when transferring
      these files, to allow V.42 bis but
      disable MNP5.
      The following table indicates the
      maximum throughput, in characters per
      second (cps), that can normally be
      expected under the same conditions as
      the previous table, but with a
      connection rate of 16.8K bps.

                         Throughput (cps) when
      set to 16.8K bps
      File Type          MNP5      V.42 bis
      
      Assembler or Compiler listing     33
      60                 4480-5760 
      Text file          2713-3063 3967-5760
      Binary file:  .EXE 2538-2800 2368-3033
      Binary file:  .COM 2450-2625 2392-2683
      .ARC files (common on BBS's)*     1750-
      1925               1983
      Random binary 8-bit*         1703-1838 1
      983
      * We recommend setting the modem to
      &K3 when transferring these types of
      files.  See the note attached to the
      previous table.
