home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / modem / protocol.arc / PROTOCOL.TXT
Encoding:
Text File  |  1988-06-12  |  9.0 KB  |  223 lines

  1.  
  2.  
  3.                          All About Protocols
  4.                        -----------------------
  5.  
  6.  
  7. A protocol is a set of rules and conventions that apply to a specific
  8. area of communications that allow participants to properly communicate
  9. regardless of the hardware brand or software package being used.  The
  10. protocol file transfer is a set of rules for transferring files which
  11. specify a set of ASCII handshaking characters and the sequence of
  12. handshaking required to perform certain file transfer functions.
  13. Protocol handshaking signals allow communication software to transfer
  14. text, data and machine code files, and to perform sophisticated
  15. error-checking.
  16.  
  17. Some protocols are faster then others and some are more foolproof in
  18. the way they detect errors.
  19.  
  20. This BBS supports eight protocols:
  21.  
  22.                            1)K Xmodem CRC
  23.                            A)SCII
  24.                            B)atch Ymodem
  25.                            C)RC Xmodem
  26.                            K)ermit
  27.                            X)modem (Checksum)
  28.                            Y)modem
  29.                            Z)modem
  30.  
  31. The following is a discussion of each.
  32.  
  33. ASCII
  34. -----
  35.  
  36. ASCII stands for American Standard for Computer Information
  37. Interchange.  Is consists of 128, 7 bit codes (0 - 127).  Many
  38. computers implement a "bit-8" set (128-255) but these will differ from
  39. system to system.  The bottom 128 are always the same.
  40.  
  41. ASCII transfer is not really error checked at all.  The only
  42. "handshaking" that takes place is the use of Xon/Xoff (ASCII codes 17
  43. and 19, decimal, or ^S/^Q).  When the sending system receives a ^S from
  44. the receiver it stops sending until the receiver transmits a ^Q.
  45.  
  46. Only plain text files should be transmitted with this protocol since
  47. they generally will not contain bit-8 characters.  You may use 7 word
  48. bits, Even parity, 1 stop bit communications parameters with ASCII.
  49. All the remaining protocols require 8-N-1.
  50.  
  51. Xmodem (Checksum)
  52. -----------------
  53.  
  54. In the early 1960's, Ward Christensen developed one of the first public
  55. domain "8-bit" error checking protocols.  He originally developed it
  56. for CP/M systems and called it MODEM-7.  The late Andrew Fluegelman
  57. popularized it as Xmodem when he implemented it in his PC-TALK III
  58. program.
  59.  
  60. Xmodem sends information in "packets" of 128 bytes.  The error checking
  61. comes about by adding up the ASCII value of these bytes, dividing by
  62. 256, and throwing away the remainder.  This is called a modulo 256
  63. checksum.  The sender calculates this checksum and transmits it along
  64. with the 128 byte packet.  Once received, the receiver calculates it
  65. again on the received packet.  If the two checksums DON'T agree, the
  66. receiver sends a NAK (Negative AcKnowledgement) which causes the sender
  67. to retransmit the packet.  If the checksums DO agree the receiver sends
  68. an ACK character.  The transfer continues in this manner until
  69. completed.
  70.  
  71. Modulo 256 checksum checking is not 100% foolproof.  Certain kinds of
  72. line noise can cause corrupted packets to be received which contain the
  73. correct checksum but incorrect data.
  74.  
  75. Most communications programs support Xmodem.  Several of them also
  76. support what is known as "relaxed" Xmodem.  Relaxed Xmodem uses the
  77. same checksum protocol, but relaxes several of the timing constraints
  78. built into Xmodem in order to work on busy time sharing systems such as
  79. CompuServe.  You need not use relaxed Xmodem when connected to a
  80. bulletin board system such as this one.
  81.  
  82. Xmodem CRC
  83. ----------
  84.  
  85. Xmodem CRC uses a complex polynomial equation to calculate a 16 bit (2
  86. bytes) Cyclical Redundancy Check (CRC) on the Xmodem 128 byte packet.
  87. The CRC value is a much more robust method of detecting transmission
  88. errors.  The remainder of the handshaking takes place in the same
  89. manner as checksum Xmodem.
  90.  
  91. CRC Xmodem is transparent to the user.  That is, if you select CRC as
  92. your protocol and your system fails to send the proper codes, CRC
  93. Xmodem will "fall back" to checksum Xmodem.  So, if you don't know if
  94. your communications program supports CRC, select it anyway.
  95.  
  96. Older comm programs such as PC-TALK III do not support CRC Xmodem.
  97.  
  98. Ymodem and Ymodem Batch
  99. -----------------------
  100.  
  101. Ymodem was developed by Chuck Forsberg of Omen Technology in Portland,
  102. OR, as the next protocol after Xmodem.
  103.  
  104. Ymodem is essentially CRC Xmodem with 1024 byte (or 1 kilobyte, or 1K)
  105. packets.  (see also 1K Xmodem, below).
  106.  
  107. However, UNLIKE Xmodem, which always starts off with its first packet
  108. being labeled #1, true Ymodem starts off with its first packet labeled
  109. as #0.  This packet contains the time and date stamp of the file being
  110. transferred along with its filesize and filespec.  In addition, true
  111. Ymodem may operate in "batch mode" which, if implemented, allows the
  112. receiver to specify more than one file to be transferred in a session.
  113.  
  114. Many comm programs and BBS's have not implemented Ymodem properly.
  115. Some, Procomm for example, have "Ymodem" and "Ymodem Batch."  Quoting
  116. Chuck Forsberg,"Ymodem Batch is redundant.  If it's Ymodem, it supports
  117. batch operations.  If it doesn't support batch operations it isn't
  118. Ymodem, but 1K Xmodem."
  119.  
  120. This system supports both Ymodem and Ymodem Batch. If you select "Y"
  121. what you will actually get is 1K Xmodem. If you select "B" (for Batch
  122. Ymodem) you will get the true Ymodem. Note, however, that multiple
  123. files transferal is not allowed on this system. QMODEM and BOYAN users
  124. should select either "1" or "Y" as your protocol. These programs do NOT
  125. properly handle true Ymodem (Batch).
  126.  
  127. 1K Xmodem
  128. ---------
  129.  
  130. 1K Xmodem is CRC Xmodem using 1024 byte (1K) packets.  The first packet
  131. sent is labeled #1.  Select this protocol if you have had problems with
  132. Ymodem Batch or if you are running Qmodem or Boyan.  Better yet, use
  133. Zmodem (see below).
  134.  
  135. Kermit
  136. ------
  137.  
  138. Kermit was developed at Columbia University in New York.  It is a
  139. public domain protocol that has several interesting features I won't
  140. bother to detail here.
  141.  
  142. Kermit is supported here via the use of PCKERMIT.  Both "classic" and
  143. "sliding windows" Kermit are supported automatically.
  144.  
  145. Zmodem
  146. ------
  147.  
  148. Zmodem (the next one after Ymodem) is a public domain protocol
  149. developed by Chuck Forsberg.
  150.  
  151. Zmodem uses a 32 bit CRC to detect transmission errors.  It also allows
  152. for batch transfer of more than one file along with time/date stamping.
  153. Unlike X/Ymodem, Zmodem doesn't wait for the receiver to acknowledge
  154. receipt of an error free packet.  Rather, it continues sending until
  155. the receiver sends a "packet NAK" which causes the sender to resend
  156. that one bad packet.  This lack of "turnaround" time delay is what
  157. greatly speeds up Zmodem transfers.
  158.  
  159. Implementing Zmodem
  160. -------------------
  161.  
  162. Chuck Forsberg has written a program called DSZ. It is available on
  163. this BBS as DSZmmdd.ARC, where mmdd is the date of his latest version.
  164. Issue a DIR;DSZ*.* to locate it.
  165.  
  166. Note: DSZ is a trademark of Chuck Forsberg and Omen Technology Inc.,
  167. P.O. Box 4681, Portland, OR. DSZ is SHAREWARE (although Chuck doesn't
  168. call it that) and you should send the $20 the author requests if you
  169. use it.
  170.  
  171. DSZ is a program which supports X/Y and Zmodem.  It must be run as a
  172. "child process" of another program such as a comm or BBS program.
  173.  
  174. If your comm program allows a "shell" or "door" or "gateway" to DOS or
  175. a DOS function, you can implement DSZ. The following is a list of some
  176. of the more popular comm programs which can do this:
  177.  
  178.                 Program           Key for SHELL to DOS
  179.                 ----------------  --------------------
  180.               * Boyan             Alt J or Ins
  181.                 GT PowerComm      Runs DSZ directly.
  182.                 Procomm 2.4.2     Alt F4
  183.               * Qmodem SST        Alt R
  184.                 Telix             Alt V
  185.  
  186. * Both Boyan and Qmodem are configurable to run DSZ via their separate
  187. configuration areas.  Refer to your documentation.
  188.  
  189. After you have told this BBS which file to transfer, SHELL out to DOS
  190. and run DSZ. DSZ expects the serial port to be connected and will use
  191. all the parameters it finds.  One exception to this is if you are
  192. running on COM2.  Consult the DSZ.DOC file which comes with
  193. DSZmmdd.ARC.
  194.  
  195. One very easy way to use DSZ is to create two small .BAT files to
  196. handle all the chores (or write two CED or PCED SYNonyms).  Here are
  197. two that are known to work well:
  198.  
  199. RZ.BAT (or CED SYN RZ)
  200.  
  201. dsz rz -y            [or, for COM2,]       dsz port 2 rz -y
  202.  
  203. SHELL to DOS and type RZ, this BBS will send the proper filename and
  204. the file. Enter "Exit" to return to your comm program when done.
  205.  
  206. SZ.BAT (or CED SYN SZ)
  207.  
  208. dsz z pL1024 sz %1   [or, for COM2,]       dsz port 2 z pL1024 sz %1
  209.  
  210. (Note the capitalization in the "pL1024" !)
  211.  
  212. To upload FOO.BAR, SHELL to DOS and enter SZ FOO.BAR and the file will
  213. be sent.  Again, enter "Exit" to return to your comm program when done.
  214.  
  215. I hope this discussion helps. The use of Zmodem will assure error free
  216. files transfer and will save you time and phone charges.
  217.  
  218.  
  219.                              Wes Meier
  220.                              WC-BBS, [415]-937-0156
  221.                              July 6, 1987
  222.  
  223.