home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / decus / RB136 / microcom.lzh / MICROCOM.DOC
Text File  |  1989-11-12  |  20KB  |  359 lines

  1.  
  2.                             Microcomputer Communications
  3.  
  4.                                  By David P. Maroun
  5.  
  6.          Communication is the transfer of information.  The purpose of my
  7.          discussion is to describe the transfer of information from a
  8.          computer of desktop size or smaller to another computer, whether
  9.          small or not.
  10.  
  11.          Diskette And Tape Transfers
  12.          ---------------------------
  13.  
  14.          One way to communicate is to exchange diskettes or tapes.  To
  15.          transfer a file from one computer to another, one simply records
  16.          the file on a diskette, say, and then puts the diskette into the
  17.          receiving computer to be read.
  18.  
  19.          Of course, complications can arise in this procedure.  For
  20.          example, the two computers involved may use different diskette
  21.          formats.  The solution may sometimes be to find a format that both
  22.          machines can understand.  For example, operators of IBM PCs are
  23.          accustomed to using double-sided, 40-track diskettes while those
  24.          with DEC Rainbows use 80-track single-sided diskettes.  Luckily,
  25.          both machines can read and write to 40-track, single-sided
  26.          diskettes.  The main precaution is not to write to the same
  27.          diskette on both machines.  You use one diskette to go from the
  28.          Rainbow to the IBM, and another to go from the IBM to the Rainbow.
  29.  
  30.          Direct Connection
  31.          -----------------
  32.  
  33.          But what if one machine has only 3.5-inch diskettes while the
  34.          other has just 5.25-inch drives?  Or, what if one computer uses
  35.          only cassettes for storage, while the other has disk drives but no
  36.          tape drive?  If the two computers are reasonably close to each
  37.          other, and if both have serial ports, then you can use a cable to
  38.          connect one port to the other.  The job is sometimes easier said
  39.          than done.  You can expect to spend time trying to decide which
  40.          pin on one end to connect to which pin on the other, and may have
  41.          to build the cable yourself.  If both ports accept standard 25-pin
  42.          connectors, it may suffice to connect pin number two on each end
  43.          to number three on the other, and also to connect the two pins
  44.          number 7 to each other.  This is the arrangement to use if each
  45.          machine sends information from pin 2, receives on 3, and uses 7
  46.          for a ground.  To make the connection, you can use a straight-
  47.          through 25-wire cable and a null modem adapter to switch between
  48.          pins 2 and 3.
  49.  
  50.          However, some ports send on pin 3 and receive on 2.  And some may
  51.          use 9-pin connectors or 4-pin DIN connectors.  Furthermore, a port
  52.          may be male or female.  So, you must check your particular
  53.          arrangement before you buy a cable.
  54.  
  55.          You will also need software that allows the transfer.  That
  56.          software can be as simple and common as CP/M's PIP utility along
  57.          with whatever is necessary to set the rate of transfer and other
  58.          characteristics required for successful communications.
  59.  
  60.          Note that you should not use a modem for direct connection of one
  61.          computer to another.  A modem introduces unnecessary complication
  62.          and unnecessary chances of error.  In many cases, a modem limits
  63.          the transfer to a slower rate than the computers themselves can
  64.          handle.
  65.  
  66.          Transfer Over Telephone Lines
  67.          -----------------------------
  68.  
  69.          But what if the computers are far from each other?  Suppose, for
  70.          example, one is in San Francisco and the other in Chilliwack.
  71.          Then you can communicate over telephone lines.  For that, you need
  72.          a modem.
  73.  
  74.          The name 'modem' is supposed to be short for 'modulator-
  75.          demodulator'.  Whatever the truth may be in that regard, modems
  76.          convert computer signals into forms that telephone lines can
  77.          handle, and then convert them back.
  78.  
  79.          To use a modem, you must connect it to a computer and to a
  80.          telephone.  The connections may be made in various ways.  Some
  81.          modems are designed to fit inside computers.  This arrangement
  82.          reduces the price of the modem and the clutter on a desktop but at
  83.          the expense of versatility.  Making mechanical adjustments to the
  84.          modem requires opening up the computer, and using the modem with a
  85.          different computer involves all the complication of removing the
  86.          modem from one computer and installing it in the other.  An
  87.          internal modem is also one more drain on the computer power
  88.          supply, and an extra source of heat inside the computer.
  89.  
  90.          A modem may be manual, in which case the user must take care of
  91.          dialing or responding to the call of another computer.  Automatic
  92.          modems are specialized computers that can be programmed, and can
  93.          dial or reply to telephone calls.  Various sets of commands may be
  94.          used, but those for Hayes modems has become more or less the
  95.          standard, though it is an unofficial one.  Most Hayes commands
  96.          begin with 'AT', which is taken from the word 'ATTENTION'.  For
  97.          example, if a telephone line uses pulses rather than touch tones,
  98.          'ATDP 1-555-1212' is the Hayes command to dial the number
  99.          1-555-1212.
  100.  
  101.          Note that various Hayes modems use somewhat different commands.
  102.  
  103.          Hayes brand modems are generally considered to be of high quality,
  104.          but their high prices make many people avoid them.  Hence, you are
  105.          likely to find many "Hayes compatible" modems rather than modems
  106.          actually made by Hayes.  Being Hayes compatible is no guarantee of
  107.          quality; it means only that a Hayes command set (or a similar set)
  108.          is used.
  109.  
  110.          Modems may be capable of transferring at different rates.  Typical
  111.          rates are 300 bits per second, 1200 bits per second, or 2400 bits
  112.          per second.  These correspond respectively to about 30, 120, and
  113.          240 characters per second.  I am allowing ten bits per character,
  114.          not eight, because each character is preceded by a start bit and
  115.          followed by at least one stop bit for typical modem transfers.
  116.          The term 'baud' is often taken as equivalent to 'bits per second',
  117.          so that one hears of "1200 baud modems", but to people in the
  118.          field, 'baud' refers to a rate of change of state rather than a
  119.          transfer rate.  The two are often, but not always, the same.
  120.  
  121.          Modems designed for the three rates I just mentioned are
  122.          sufficiently standardized that any two late-model modems operating
  123.          at one of these speeds can be expected to communicate with each
  124.          other.  The situation is different with those very expensive
  125.          modems functioning at 9600 bits per second or more.  The owner of
  126.          such a fast modem may find himself able to collaborate only with
  127.          someone who has the same brand of modem.
  128.  
  129.          Some modems are designed to compress information before transfer
  130.          and de-compress it at the other end of the line.  The procedure
  131.          effectively increases the rate of transfer.  However, there is no
  132.          need to buy a special modem to get this effect.  There are plenty
  133.          of programs that will compress files at much less cost.  The
  134.          MS-DOS archiving utility LHARC typically reduces files to half or
  135.          a quarter of their original sizes, and LHARC is available free of
  136.          charge.
  137.  
  138.          Communications Programs
  139.          -----------------------
  140.  
  141.          Once you get the required hardware for communications, you need
  142.          software; that is, you need programs which will allow exchanging
  143.          information with other computers.  Some computers--the DEC Robin
  144.          and Rainbow, for example--have built-in terminal modes.  These are
  145.          adequate for contacting other machines and leaving messages.  To
  146.          transfer files, more elaborate software is needed.  A great many
  147.          communications software packages are available in the public
  148.          domain, or at moderate cost as shareware.  The popular CP/M-80
  149.          program MEX (Modem EXecutive) is available for the price of a
  150.          diskette.  Perhaps the standard for MS-DOS is ProComm, which
  151.          (except for the commercial ProComm Plus version) is distributed
  152.          free of charge with the condition that regular users should pay a
  153.          fee directly to the authors.  That fee is as little as $25 in US
  154.          funds.
  155.  
  156.          Any communications package must allow deciding what characters can
  157.          be transmitted.  Computers use up to eight binary digits (bits) to
  158.          represent characters.  However, the numerals '0' through '9' and
  159.          the letters of the alphabet can be encoded in seven bits.  Some
  160.          systems are set up to handle only seven-bit information--that is,
  161.          ordinary text without special characters like line drawing
  162.          symbols.  Such a system cannot handle an executable file
  163.          transmitted as such.  Your communications package should allow
  164.          setting up a transfer for seven or eight data bits, and allow
  165.          deciding whether to use a so-called parity bit for error checking.
  166.          Finally, the program should allow deciding whether to use one or
  167.          two bits to indicate the end of a character.
  168.  
  169.          ASCII Transfers
  170.          ---------------
  171.  
  172.          Typically, a communication program allows various methods (or
  173.          "protocols") of exchanging information.  Usually, you can expect
  174.          the ASCII method, which involves sending information character by
  175.          character with no error checking.  This is the simplest kind of
  176.          transfer over a telephone line, or over a cable connecting two
  177.          computers.  The ASCII method is also the worst I know of.  Any
  178.          disturbance in the connection is likely to introduce changes in
  179.          the information transferred.  Besides, if the receiver cannot keep
  180.          up with the sender--perhaps because the receiver must pause to
  181.          save to disk--then characters will be lost.  This last problem can
  182.          be eliminated by using flow control.  The receiver can supply a
  183.          control-S character which makes the sender stop sending, and
  184.          supply a control-Q when it (the receiver) is ready for more.
  185.  
  186.          XMODEM And Its Offshoots
  187.          ------------------------
  188.  
  189.          A step up from the ASCII method is XMODEM, which we can take as
  190.          the basic error-checking transfer method for desktop computers.
  191.          An XMODEM transfer begins with the receiver sending control-U or
  192.          capital 'C' characters until the sender begins to transmit.  Then
  193.          the sender sends a file in blocks of 128 characters.  Each packet
  194.          of 128 characters is preceded by three characters:  A control-A,
  195.          then a sequence number ranging from 1 to 255, and then the
  196.          complement of the sequence number.  After the 128-character
  197.          packet, a checksum (that is, the sum of the 128 characters) or
  198.          cyclic redundancy check is sent.  The receiver also calculates the
  199.          checksum or cyclic redundancy check.  A checksum is made if the
  200.          communication began with a control-U; initial capital 'C's
  201.          determine the use of cyclic redundancy checks.  If the receiver's
  202.          calculation agrees with the sender's, the receiver sends a
  203.          control-F, and the sender transmits another packet.  If the two
  204.          calculations do not agree, then the receiver sends a control-U,
  205.          and the sender resends the last packet.  A control-D character
  206.          indicates the end of the transmission.
  207.  
  208.          The structure of XMODEM shows its origin under the CP/M operating
  209.          system.  That operating system allots file sizes in blocks of 128
  210.          characters.  If a file is set up with, say, 130 characters,
  211.          another 126 are added as fillers.  If that file is a text file, a
  212.          control-Z is used to indicate the actual end after the 130th
  213.          character.  MS-DOS uses exact file sizes and does not necessarily
  214.          put a control-Z at the end of a text file.  So, files sent by
  215.          XMODEM may pick up as many as 127 garbage characters at the end,
  216.          and these may be very evident in a text file.
  217.  
  218.          XMODEM also does not transmit the file name nor the creation time
  219.          and date that MS-DOS stores.  These problems are overcome in the
  220.          TELINK method, which is a variation on XMODEM that allows sending
  221.          the exact file size and file name.  TELINK also eliminates another
  222.          restriction of XMODEM by permitting transferring many files with
  223.          one command.
  224.  
  225.          Another variation on XMODEM is YMODEM, which uses packets of 1024
  226.          characters rather than 128.  That speeds up the transfer by
  227.          reducing the time spent on error checking--provided there are no
  228.          disturbances on the connecting line.  If there are disturbances,
  229.          then resending long packets can make YMODEM slower than XMODEM.
  230.  
  231.          Some versions of YMODEM allow transfers of several files, and will
  232.          transfer filenames, exact sizes, and creation times.
  233.  
  234.          The time taken for error checking with XMODEM, TELINK, or YMODEM
  235.          is the same at 300 bits per second as at 2400.  Furthermore, the
  236.          programs make pauses in transmissions to check for errors.  That
  237.          partly reduces the benefit of switching to a faster modem.  This
  238.          problem and others are addressed by ZMODEM, which has the sender
  239.          transmit continuously while inserting from time to time special
  240.          error-checking packets.  Error checking is done even on the error-
  241.          checking packets.  If the receiver finds an error, it tells the
  242.          sender to resend beginning at a specific position in the file.
  243.          Thus, ZMODEM permits sending part of a file.  ZMODEM also allows
  244.          coding special characters, so that for example, control characters
  245.          as such may not appear in the information transferred.  These
  246.          features promise to make ZMODEM fast, versatile, and reliable.
  247.  
  248.          KERMIT
  249.          ------
  250.  
  251.          A quite different communications protocol is KERMIT.  KERMIT is
  252.          designed to allow transferring to systems that put severe
  253.          restrictions on communicated information.  For example, only
  254.          seven-bit information may be allowed, and the length of a packet
  255.          may be just 32 characters.  KERMIT permits encoding eight-bit
  256.          information to be transferred to seven-bit systems.  A KERMIT
  257.          transfer begins with an extensive dialogue to decide the precise
  258.          nature of the transfer, and the transfer itself includes extensive
  259.          error-checking.  That makes KERMIT transfers somewhat (or even
  260.          very) slow, especially over networks.  However, KERMIT may be the
  261.          only error-checking method available for dealing with a large
  262.          mainframe.
  263.  
  264.          To give you an idea of what a communications package can do, here
  265.          are the characteristics of Columbia University's MS-DOS KERMIT
  266.          version 2.32, as reported in the documentation for that program:
  267.  
  268.               KERMIT-MS Capabilities At A Glance:
  269.  
  270.               Local operation:                Yes
  271.               Remote operation:               Yes
  272.               Transfers text files:           Yes
  273.               Transfers binary files:         Yes
  274.               Wildcard send:                  Yes
  275.               File transfer interruption:     Yes
  276.               Filename collision avoidance:   Yes
  277.               Can time out:                   Yes
  278.               8th-bit prefixing:              Yes
  279.               Repeat count compression:       Yes
  280.               Alternate block check types:    Yes
  281.               Terminal emulation:             VT102, H19, VT52, Tektronix 4010
  282.               Communication settings:         Speed, Parity, Flow Control, Echo
  283.               Transmit BREAK:                 Yes (and Long BREAK)
  284.               IBM mainframe communication:    Yes
  285.               Transaction logging:            Yes
  286.               Session logging (raw download): Yes
  287.               Raw upload:                     Yes
  288.               Act as server:                  Yes
  289.               Talk to server:                 Yes
  290.               Advanced server functions:      Yes
  291.               Advanced commands for servers:  Yes
  292.               Local file management:          Yes
  293.               Command/init files:             Yes
  294.               Command macros:                 Yes
  295.               Extended-length packets:        Yes
  296.               Local area networks:            Yes (NetBIOS and other support)
  297.               MS-Windows compatibility:       Yes
  298.               Attribute packets:              Yes
  299.               Sliding windows:                No
  300.  
  301.  
  302.          Compression Utilities
  303.          ---------------------
  304.  
  305.          A very significant role is played in microcomputer communications
  306.          by compression utilities.  I mentioned previously that LHARC (to
  307.          name just one) can reduce file sizes significantly, and so
  308.          effectively reduce transfer time.  For this reason, microcomputer
  309.          bulletin boards typically allow only compressed files, with
  310.          perhaps a few exceptions made for text files that provide
  311.          information to people who dial in.  As an example of what a
  312.          compression utility can do, examine the contents of an archive
  313.          created by LHARC:
  314.  
  315.          Listing of archive : 'A:MICROCOM.LZH'
  316.  
  317.            Name          Original    Packed  Ratio   Date     Time   Attr Type  CRC
  318.          --------------  --------  -------- ------ -------- -------- ---- ----- ----
  319.          \MICROCOM.CTX
  320.                               801        54   6.7% 89-11-06 23:55:02 a--w -lh1- 1754
  321.          \MICROCOM.DOC
  322.                             14414      5608  38.9% 89-11-06 23:55:00 a--w -lh1- 6AA5
  323.          --------------  --------  -------- ------ -------- --------
  324.               2 files       15215      5662  37.2% 89-11-06 23:58:48
  325.  
  326.          Not only does the compression utility reduce the overall file
  327.          sizes, but it combines several files into one, thus allowing
  328.          keeping related files together.
  329.  
  330.          Of course, the archiving utility introduces a bit of overhead.
  331.          The total file size is a bit larger than the 5662 characters
  332.          indicated in the archive directory listing.  In fact, the MS-DOS
  333.          listing is
  334.  
  335.               MICROCOM LZH     5737  89-11-06  23:58
  336.  
  337.          Still, 5737 characters are much less than 15215.
  338.  
  339.          LHARC is by no means the only compression utility.  Under MS-DOS,
  340.          two others especially, PAK and PKZIP, vie with it for top honors
  341.          at compression.  And, these utilities are not only used for
  342.          preparing files for communications.  Archivers make good back-up
  343.          utilities, and using archives is an efficient way of storing files
  344.          in a library.
  345.  
  346.          Using archives avoids certain problems of transferring files.  For
  347.          example, if you transferred MICROCOM.LZH by XMODEM, 23 garbage
  348.          characters would be added to make the archive's size a whole
  349.          number multiple of 128.  But these characters would be added to
  350.          the archive, not to its component files.  The receiver would be
  351.          able to extract MICROCOM.DOC to its original size.  Furthermore,
  352.          MICROCOM.DOC's name and creation time would be preserved.
  353.  
  354.          For Further Study
  355.          -----------------
  356.  
  357.          If you are would like more information, you can consult the
  358.          documentation included with your equipment and software.
  359.