home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / xmodem 3.10 / xmodem.1 < prev    next >
Encoding:
Text File  |  1994-05-10  |  11.2 KB  |  312 lines  |  [TEXT/MPS ]

  1. .TH XMODEM LOCAL "December 14, 1990"
  2. .UC 4.2
  3. .SH NAME
  4. xmodem \- Christensen protocol file transfer utility \- Version 3.10, December 1990
  5. .SH SYNOPSIS
  6. .B xmodem
  7. [\fBst|sb|sa|rt|rb|ra\fR][\fBygmkctdlxpwen\fR]
  8. [file...]
  9. .br
  10. .SH DESCRIPTION
  11. The
  12. .I xmodem
  13. program implements the Christensen (XMODEM) file transfer
  14. protocol for moving files between 4.2/4.3BSD Unix systems (and successors,
  15. including Suns) and microcomputers.
  16. The XMODEM/CRC protocol, the MODEM7 batch protocol, the XMODEM-1K
  17. block protocol, the YMODEM batch protocol and the YMODEM-G streaming protocol
  18. are all supported by 
  19. .IR xmodem .
  20. The ZMODEM protocol is not supported.
  21. For details of the XMODEM/YMODEM protocols,
  22. see the document edited by Chuck Forsberg titled
  23. .I
  24. XMODEM/YMODEM Protocol Reference.
  25. .sp
  26. Option Flags are case insensitive; the cluster of flags 
  27. may be preceded by an optional "-"
  28. character.
  29. .PP
  30. .SH PARAMETERS
  31. Exactly one of the following must be selected:
  32. .TP
  33. .B rb  
  34. Receive Binary - files are placed on the Unix disk without conversion.
  35. .I Xmodem
  36. will silently destroy existing files of the same name.
  37. .TP
  38. .B rt  
  39. Receive Text - files are converted from the CP/M and MS-DOS
  40. format of CR-LF pairs to the Unix convention of newline 
  41. characters only between lines.  
  42. Null bytes are ignored and bit 8 of each character is stripped (which makes 
  43. Wordstar files much more readable).
  44. A CTRL-Z character is deemed to indicate the EOF location in the incoming
  45. file.
  46. The resulting file
  47. is acceptable to the Unix editors and compilers, and is usually slightly
  48. smaller than the original file.
  49. .I Xmodem
  50. will silently destroy existing files of the same name.
  51. .TP
  52. .B ra
  53. Receive Apple - same as rt save CR characters in the incoming file are 
  54. translated into Unix newline characters.
  55. .TP
  56. .B sb  
  57. Send Binary - files are sent without conversion as they exist on the Unix disk.
  58. .TP
  59. .B st  
  60. Send Text - newline characters in the file are converted to CR-LF pairs
  61. in accord with the CP/M and MS-DOS conventions for text files.  The file
  62. "grows" in this process.
  63. .TP
  64. .B sa  
  65. Send Apple - same as st save newline characters are converted into CR
  66. characters in accord with Apple Macintosh conventions for text files.
  67. .PP
  68. .SH OPTIONS
  69. .TP
  70. .B y
  71. Select the YMODEM batch protocol for sending files; a list of files specified
  72. on the command line will be sent in sequence.  The YMODEM batch protocol is 
  73. used automatically for file reception if the sending program requests it.
  74. If this flag is specified for a batch receive, (\fIxmodem rty\fR, for example),
  75. the transfer will never attempt to switch from CRC to checksum mode.
  76. .TP
  77. .B g
  78. Select the YMODEM-G variant of YMODEM when receiving files.  YMODEM-G is
  79. automatically invoked on transmit if the receiving program requests it.
  80. YMODEM-G is designed for "error-free" connections with proper flow control;
  81. the transmitting program blasts packets to the receiver as fast as it can
  82. without waiting for acknowledgements.  Any errors cause the entire file
  83. transfer to be aborted.
  84. .TP
  85. .B m
  86. Select the MODEM7 batch protocol for sending files; a list of files specified
  87. on the command line will be sent in sequence.  The MODEM7 batch protocol is 
  88. used automatically for file reception if the sending program requests it.
  89. If this flag is specified for a batch receive, (\fIxmodem rbm\fR, for example),
  90. the transfer starts in checksum mode rather than CRC mode.  If both "m" and
  91. "c" are specified on a receive command, the initial "file-name" negotiations
  92. are done using checksums while the file transfers are done using CRC-16.
  93. .TP
  94. .B k
  95. Select the XMODEM-1K file transfer mode for sending files. Use of 1K packets on
  96. low-error lines increases throughput.  
  97. However, over direct connections at 9600 bps to a busy host, 1K packets may
  98. cause data overflows generating excessive retries.
  99. 1K packets are automatically
  100. used for file reception if the sending program requests it.
  101. If this flag is specified with the YMODEM flag in a batch receive (\fIxmodem
  102. rbyk\fR, for example), the program will attempt to use the "KMD/IMP" convention
  103. to invoke 1K file transfers.
  104. .TP
  105. .B c   
  106. Select the CRC-16 error-checking protocol on receive.  CRC mode is better at catching
  107. transmission errors that occur than the alternative checksum protocol.  
  108. CRC mode is automatically selected for file
  109. transmission if the receiving modem program requests it.
  110. .TP
  111. .B t
  112. Indicates the Unix system is Too Busy and 
  113. .I xmodem
  114. should fall back to a simpler I/O strategy than normal.
  115. .TP
  116. .B d   
  117. Delete the 
  118. .I xmodem.log
  119. file before file transfer is begun.
  120. .TP
  121. .B l   
  122. Do NOT write to the log file.  If logging is selected, a file
  123. .I xmodem.log 
  124. will be created (or appended to), with entries for significant events, errors
  125. and retries.  This can be useful to see why things went wrong
  126. when they do.
  127. .TP
  128. .B x
  129. Toggle on debug mode.  If debug mode is selected, copious and possibly
  130. useful debugging information will be placed in 
  131. .IR xmodem.log .
  132. A second "x" will place even more information in the log.
  133. .TP
  134. .B p
  135. Assume that
  136. .I xmodem
  137. is being invoked through SunOS tip (via the ~C command).  Status and error
  138. messages will be sent to stderr, and hence to your screen, while the transfer
  139. is in progress.  
  140. .B Do
  141. .B not
  142. use this option unless you are using tip!
  143. .TP
  144. .B w
  145. Wait 15 seconds before initiating the startup handshake.  Useful if handshake
  146. characters are trashing things you need to type.
  147. .TP
  148. .B e
  149. Suppress EOT verification.
  150. Normally,
  151. .I xmodem
  152. tries to verify an EOT character (used to signify the end of file) by
  153. NAKing it and waiting for the EOT to be resent.  This reliability feature
  154. can generate harmless error messages in some microcomputer file transfer
  155. programs; other programs refuse to work at all.  To accomodate the latter
  156. brain-damaged programs, use the "e" option. 
  157. .TP
  158. .B n
  159. Allow CAN-CAN aborts during mid-transfer.  Normally, as a reliability feature,
  160. CAN-CAN aborts are only allowed at the beginning of a file transfer.  If you
  161. don't like this feature, use the "n" flag.
  162. .SH "FILE NAMES"
  163. Files transmitted using one of the batch modes
  164. will be stored on the remote machine under a CP/M-ified name (path names
  165. stripped, limited
  166. to eight characters plus a three character extension; ":" characters will
  167. be turned into "/" characters; all characters will be in monocase).  
  168. Files received using one of the batch modes
  169. will be stored under their transmitted names (except that any "/" characters
  170. in the file name will be converted into ":" characters, all upper-case
  171. characters will be translated into lower case and trailing dots will be
  172. expunged).
  173. .PP
  174. When a batch receive is requested,
  175. .I xmodem
  176. takes a wait and see attitude and can adapt to either batch protocol or even
  177. a classic XMODEM transfer (note that CRC-16 mode is automatically set under
  178. these circumstances unless the b flag is specified).
  179. If a classic, "non-batch" XMODEM file reception takes place, 
  180. the received file is stored as
  181. .IR xmodem.in .
  182. File names present on the command line for a batch receive are ignored.
  183. .SH NOTES
  184. Remember, CRC-16 error detection and YMODEM-G streaming must be invoked by
  185. the
  186. .B receiving
  187. program while 1K blocksize must be invoked by the
  188. .B sending
  189. program.
  190. .PP
  191. While waiting for the beginning of a file transfer, 
  192. .I xmodem
  193. treats two CAN (CTRL-X) characters that are received within 3 seconds
  194. as a request to abort.  CAN characters will not cause an abort if received
  195. in the midst of a file transfer (unless the "n" option was invoked).
  196. .PP
  197. If 10 or more errors are detected during the transmission or reception of any
  198. one packet, the transfer is aborted.
  199. .PP
  200. Squeezed, compressed, ZIPed or ARCed files must be transferred in binary mode, 
  201. even if they contain text.
  202. .PP
  203. If you use 
  204. .I xmodem
  205. over a 
  206. .I rlogin
  207. link, you may have to use the form
  208. .IR "rlogin machine -8" .
  209. This insures a full 8-bit wide datapath.
  210. .PP
  211. If there is any "magic box" between your Unix box and PC (such as a terminal
  212. server or a telnet box), make sure that the magic box provides a fully
  213. transparent 8-bit path and does not intercept ^S characters or listen for an
  214. "escape" sequence to get the magic box's attention.
  215. .PP
  216. MIPS's RISC/os version of Unix handles ^S characters and strips the high-order 
  217. bit on input even in raw mode. 
  218. Try the command
  219. .IR "/bin/stty -istrip -ixon"
  220. before running
  221. .I xmodem
  222. on MIPS machines if you are having trouble uploading.
  223. .PP
  224. If an unexpected error occurs before a file is completely received, the
  225. incomplete file is deleted.
  226. .PP
  227. Files received using both binary and text mode in a YMODEM batch transfer 
  228. will be truncated
  229. to the file size specified in the YMODEM header (extra CR characters in the
  230. incoming file are correctly handled).  File sizes are included in
  231. the YMODEM header when sending both binary and text files.  Thus files
  232. transferred via YMODEM should preserve their exact length.
  233. File modification times are set for received files if present in the YMODEM
  234. header; they are included in the headers for transmitted files (watch for
  235. timezone problems, however).
  236. .PP
  237. The "KMD/IMP" record count field in the YMODEM header is both set and read.
  238. .PP
  239. .I xmodem
  240. can be used through the SunOS 
  241. .I tip
  242. program to transfer files.  Use
  243. .I tip
  244. to establish a session on a remote computer.  Enter the file transfer
  245. command on the remote computer to send or receive files, then use the ~C
  246. command which causes
  247. .I tip
  248. to request a local command string and enter the appropriate
  249. .I xmodem
  250. command.  Use the "p" option on the local
  251. .I xmodem
  252. command so you will see status reports on your screen.
  253. If the
  254. .I xmodem
  255. is running on the remote machine, use the "w" option there to halt the
  256. initiation of file-transfer handshaking for a bit to allow you to enter the ~C
  257. command line without interference.
  258. .PP
  259. The MODEM7 batch protocol is archaic and should only be used if YMODEM batch
  260. protocols are not available in your PC's communication program.  If you must
  261. use MODEM7, you may have to specify the "m" option or, preferably, "cm"
  262. when receiving files with 
  263. .IR xmodem .
  264. .SH EXAMPLES
  265. .PP
  266. To receive a text file transmitted from a micro (using CRC-16
  267. error-checking) and store it under the
  268. name 
  269. .IR file.name ,
  270. use the command line
  271. .RS
  272. .B "xmodem rtc file.name"
  273. .RE
  274. Note that if the transmitting program on the micro uses the 1K packet
  275. protocol and/or the YMODEM batch protocol,
  276. .I xmodem
  277. detects this automatically and takes appropriate action.  Further
  278. note that if one of the batch protocols is used, the received file(s)
  279. will be stored under their own names and the name on the command line
  280. (if any) will be ignored.  Finally, note that CRC-16 error checking is the
  281. default.  Thus, a generic command to receive files would be
  282. .RS
  283. .B "xmodem rt"
  284. .RE
  285. .PP
  286. To send a set of text files to a microcomputer using 1K packets and the
  287. YMODEM batch protocol, use the command line
  288. .RS
  289. .B "xmodem styk *.txt"
  290. .RE
  291. .SH FILES
  292. xmodem.log (if logging is enabled)
  293. .SH BUGS
  294. Batch mode could be smarter about bad file-names in the midst of a
  295. batch transmit/receive.
  296. .PP
  297. Batch mode could allow a mixture of binary and text files.
  298. .PP
  299. Bare Carriage Return characters (i.e., those not immediately followed by a
  300. Line Feed character) are mishandled in a received file when using text mode.
  301. A file with "overstruck" lines will thus come out looking funny.
  302. .SH SEE ALSO
  303. kermit(1), rz(1), sz(1)
  304. .SH AUTHOR
  305. Steve Grandi, National Optical Astronomy Observatories (grandi@noao.edu).  
  306. Based on
  307. .I xmodem
  308. by Brian Kantor, University of California at San Diego.
  309. This, in turn, was based on
  310. .I umodem
  311. by Lauren Weinstein, Richard Conn and others.
  312.