Version 1.6 MODEM MGR VERSION 1.6 UPDATE Version 1.6 adds the following new file transfer capabilities to MODEM MGR (Pro DOS version only): XMODEM 1K and 4K YMODEM ZMODEM The TUTOR file has been moved to the ProDOS utility disk. The file transfer sup port for the Bell 202 half-duplex mode in the Novation Apple CAT II modem has been deleted. XMODEM 1K AND 4K The transfer mode ([ESC] Y command) has been revised to handle XMODEM-1K and XMODEM-4K file transfers. XMODEM-1K is sometimes incorrectly referred to as YMODEM. The ProDOS file transfer menu now shows the following: 1: Send MMGR 2: Rcv MMGR 3: Send XMODEM 4: Rcv XMODEM 5: Rcv XMODEM (mod) 6: Rcv XMODEM-Snd CKL 7: Snd XMODEM IK XMODEM Receiving - If you select item 4 on the file transfer menu (Rcv XMODEM), 128-, 1K-, and 4K-byte blocks will be automatically received in any order or sequence. You will be asked for a filename (pathname) for the file, the filetype, and if you wish to send C to request CRC error checking. To accomodate networks which transmit long pauses, you may select item 5 (Rcv XMODEM (mod)) instead. At startup, some senders require the letter K as a request to transmit 1K blocks and the letter L as a request to transmit 4K blocks. You may select item 6 on the file transfer menu (Rcv XMODEM-Snd CKL) to send the letters CKL at startup. You will be asked for a filename and filetype, but you will not be asked if you wish to send C. The CKL combination will confuse some packet-switched systems. (For Compuserve or GENIE select item 4 or 5 instead). XMODEM Sending - If you select item 3 on the file transfer menu (Send XMODEM), the program will look for the letters C, K, and L at startup and display them if received. If C is received, CRC error checking will be used. If K is received, 1K blocks will be sent. If L is received, 4K blocks will be sent. If NAK is received instead of C , K, or L, 128-byte blocks will be sent with checksum instead of CRC. Some receivers will handle 1K blocks but will not send K to request them. Select item 7 on the file transfer menu (Snd XMODEM 1K) to force your program to send 1K blocks. (Use this option 7 for Compuserve or GENIE). Other XMODEM Notes - The program will send the largest allowable block size commensurate with the amount of data remaining to be sent. The transmitted block sizes will be reduced as necessary for efficiency. For example, suppose the file size is 9232 bytes and 4K blocks are requested by the receiver. The file length when rounded off to the next multiple of 128 is 9344. Instead of sending three 4K blocks, two 4K blocks will be sent followed by one 1K block and one 128-byte block. (4096 + 4096 + 1024 + 128 = 9344). YMODEM AND ZMODEM MODULES The YMODEM and ZMODEM modules can be run from the terminal mode by using the [ESC] : command (Type the ESC key then the colon key). The following menu will be shown: SELECT MODULE A) AEXMODEM B) BINARY2 Y) YMODEM Z) ZMODEM V) VT220 Q) QUIT Type Y to run the YMODEM or Z to run the ZMODEM module. You may type the entire sequence [ESC] : Y or [ESC] : Z as fast as you wish and skip the menu. YMODEM handles batch transfers as well as single-file transfers. The YMODEM menu is shown below. 1. Send one file 2. Send files in batch list 3. Send all files in /xxx/ 4. Receive files 5. Receive files (mod) 6. Receive files (Send CKL) YMODEM Receiving - If you select item 4 on the YMODEM transfer menu (Receive files), single or multiple batched files will be received. Each file will be saved as a type TXT file using the filename received. 128-, lK-, and 4K-byte blocks will be automatically received in any order or sequence. To accomodate networks which transmit long pauses, you may select item 5 (Receive files (mod)) instead. At startup, some senders require the letter K as a request to transmit 1K blocks and the letter L as a request to transmit 4K blocks. You may select item 6 on the file transfer menu (Receive files (Send CK L)) to send the letters CKL at startup. The K and L will confuse some packet-switched systems. (Do not use item 6 on Compuserve or GENIE. Select item 4 or 5 instead.) If the sender sends with XMODEM instead of YMODEM, the program will ask for a filename and receive the file using XMODEM. YMODEM Sending -Select item 1 on the YMODEM transfer menu (Send one file) if you wish to send just one file. Select item 2 (Send files in batch list) if you wish to send multiple batched files. The format of the batch list you must prepare is described in the documentation in the manual covering BINARY II. Select item 3 (Send all files in /xxx/) if you wish to send all of the files in the current directory /xxx. After you select item 1, 2, or 3 on the file transfer menu, the program will look for the letters C, K, and L and display them if received. If C or CK is received, CRC error checking will be used 1K byte blocks will be sent. If L is received, 4K byte blocks will be sent. Other YMODEM Notes - The only file attributes transferred are the filename and size. If the file is a non-text file or is compacted, further processing will be required to make the file usable. The program will send the largest allowable block size commensurate with the amount of data remaining to be sent. The transmitted block sizes will be reduced as necessary for efficiency. See the example noted above. Example YMODEM Batch Receive YMODEM Command --> 6 RECEIVE FILES ^X to cancel Sending CKL- C000 Receiving myfile --> MYFILE Sending C- 001 002 003 004 005 Sending C- C000 Receiving mypgm --> MYPGM Sending C- 001 002 003 004 005 006 007 Sending C C000 FILES RECEIVED Example YMODEM Batch Send - The batch list MYBATCH has been prepared with two filenames (MYFILE and MYPGM). YMODEM Command --> 2 SEND FILES IN BATCH LIST Pathname? --> MYBATCH Loading batch list Checking MYFILE Checking MYPGM ^X to cancel Waiting for C/K/L CKL Sending MYFILE C000 Waiting for C/K/L C 001 002 003 004 005 Waiting for C/K/L C Sending MYPGM C000 Waiting for C/K/L C 001 002 003 004 005 006 007 FINISHING Waiting for C/K/L C Sending C000 FILES TRANSMITTED ZMODEM allows data streaming to provide faster file transfers over packet-switched networks. ZMODEM also allows resumption and completion of file transfers interrupted by disconnection or cancellation on the next connection without requiring retransmission of the entire file. This program also supports 32-bit CRC error checking. After you select ZMODEM by typing [ESC] : Z (there is a colon before the Z), th e following menu will appear: 1) Send one file 2) Send files in batch list 3) Send all files in /xxx/ 4) Receive files ZMODEM Receiving - If you select item 4 on the ZMODEM transfer menu (Receive files), single or multiple batched files will be received. Each file will be saved as a type TXT file using the filename received. If a ZMODEM file receive operation is interrupted before completion, you may re-establish and resume the transfer at the point where it was interrupted. You can do this immediately or at any later date. If receiving is disrupted for any reason (disconnection, high noise, etc), wait for the program to time out (or type [ESC]), then let the program save whatever has been received to disk. After the ZMODEM command prompt appears you may attempt the receive operation again or you may decide to resume again some other day. After you are reconnected and ready to receive the remainder of the same file, be sure the current subdirectory is the same as the one in which the initial file segment was stored. Select item 4 on the ZMODEM menu to receive the remainder of the file. After the initial receiving operation, you will see the messsage FILE EXISTS and the following menu will appear: 1) Delete 2) Rename 3) Skip 4) Append If you select 4 (Append), the file receive operation will commence from where it was previously ended. ZMODEM Sending - Select item 1 on the ZMODEM transfer menu (Send one file) if you wish to send just one file. Select item 2 (Send files in batch list) if you wish to send multiple batched files. The form at of the batch list you must prepare is described in the documentation in the manual covering BINARY II. The batch list for ZMODEM is limited to 511 characters. Select item 3 (Send all files in /xxx/) if you wish to send all of the files in a directory /xxx. ZMODEM STREAMING The principal advantage of ZMODEM is it supports data streaming. XMODEM and YMODEM send data in packets which must be verified and acknowledged by the receiver before the next one is sent. The delay on packet-switched networks causes a significant waiting period after the sender has sent the packet until he receives the go-ahead to send the next one. ZMODEM can send the packets consecutively (stream) without waiting because it does not expect any r eply from the receiver until an error occurs. This program supports segmented streaming. The amount of data streamed depends on the buffer size of the receiver and the sender, whichever is the lesser. This program can stream 24576 bytes at a time unless the program at the other end indicates it has a smaller buffer. The packets are usually 256, 512, or 1024 bytes in length and each packet has a CRC attached. Some senders will ask for acknowledgement on some or all packets but will not suspend streaming to wait for them. Some packets (like the last one before a disk save or the first one after an error recovery) may require an ack before the next one is sent. If your modem has SD and RD lights you can see how the packets and acks are flowing. ZMODEM FRAME CODES ZMODEM is quite different than XMODEM or YMODEM. It uses a large number of different frame types. To support troubleshooting, this program displays the frame types during sending and receiving. Although this shows a lot of strange information, it helps in determining where a failure is occurring. If you find these numbers are confusing, all you need to know is each "+" character represents 1K of data transferred. Frame types are shown as hexadecimal numbers from 00 to 13. Frames sent by your program are shown within ( ) and frame types received by your program are shown without them. A description of each frame type and other codes is provided below. ZMODEM FRAME TYPES 00 ZRQINIT-Sender sends this at startup. 01 ZRINIT-Receiver sends this when it is ready for a new file. 02 ZSINIT-Sender sometimes sends this for more information. 03 ZACK-Receiver se nds this to ack some headers or data packets. 04 ZFILE-Sender sends this to describe the file. 05 ZSKIP-Receiver sends this to skip the current file. 06 ZNAK-Indicates an error in receiving the last header. 07 ZABORT-Receiver sen ds this to terminate transfer. 08 ZFIN-Sent by sender and echoed by receiver after file xfer. 09 ZRPOS-Receive r sends this at start or after data error. 0A (or 0a) ZDATA-Sender sends this before data transmission. 0B ZEOF-Sender sen ds this at end of file. 0C ZFERR-Indicates a disk read/write error. 0D ZCRC-File CRC request from receiver and response from sender. 0E ZCHALLENGE- Receiver requests echo of random number. 0F ZCOMPL-Response to ZCOMMAND. 10 ZCAN-Cancel transfer. 11 ZFREECNT-Sender requests available disk space. 12 ZCOMMAND-Sends command for program or operating system. 13 ZSTDERR-Output to standard error, data follows. In addition, this program displays the following characters when appropriate: C CRC error H Header error + 1K (1024 bytes) received or transmitted If 32-bit CRC is in effect, the ZDATA header will be shown as 0a. If 16-bit CRC is in effect, it will be shown as 0A. Example ZMODEM Receive ZMODEM Command --> 4 RECEIVE FILES 00 (01) 02 (03) 04 his-file. txt 32768 --> HISFILE.TXT (09) 0a + + + + + + + + + + + + + + + + + + + + + + + + (03) 0a + + + + + + + + 0B (01) 08 (08) FINISHED After ZMODEM receiving was initiated on this program, the sending program sent ZRQINIT 00 and this program responded with a ZRINIT 01. If the other program sent the ZRQINIT 00 before this program started up, it might not be displayed. The ZRINIT 01 frame includes information on the 24K buffer size of this program and the capability to support 32-bit CRC. The other program sent ZSINIT 02 with additional information which was acknowledged by a ZACK 03 sent by this program. ZSINIT and the ZACK reply are optional and may be missing with some hosts. To start the file transfer, the other program sent ZFILE 04 with filename and other information. The filename (usually in lower case) is displayed. If the file length in bytes was sent it is displayed in decimal numbers. If the filename is not compatible with the ProDOS filename requirements it is converted and shown in upper case. This program then sends a ZRPOS 09 indicating where the data should start (usually at the beginning of the file). The other program responded with a ZDATA Oa header to precede the data transmission. The lower case 0a means 32-bit CRC will be used. The twenty four "+" characters show 24K was transmitted in streaming fashion before the receiver buffer became full and this program did a disk save. After the disk save, this program sent a ZACK 03 to have sending resumed. Another ZDATA Oa was received followed by the remaining 8K of data. A ZEOF 0B was received which indicated the file transmission was complete. A ZRINIT 01 was sent by this program to indicate it was ready to receive another file. A ZFIN 08 was received and sent and the operation was finished. If the sending program is asking for acks on some or all packets, you may see one of the following three sequences displayed instead of a continuous sequence of "+"I characters: + + (03) + + (03) + (03) + (03) + (03) + (03) (03) (03) + (03) (03) + (03) (03) + (03) (03) + If a CRC error occurs, the following sequence will appear: C (09) 0a The C indicates a CRC error detected by this program. The ZRPOS 09 frame is sent to request resending of data starting at a point defined by the frame. The ZDATA 0a frame is followed by the data. Example ZMODEM Send ZMODEM Command --> 1 SEND FILE Pathname? --> MYFILE (00) 01 (02) 03myfile 32768 (04) 09 (Oa) + + + + + + + + + + + + + + + + + + + + 03 (Oa) + + + + + + + + + + + + (OB) 01 (08) 08 FINISHED First this program sent ZRQINIT 00 and the other program replied with a ZRINIT 01. If the other program had sent ZRINIT 01 first, ZRQINIT 00 would not have been sent. The ZRINIT frame includes information on 32-bit CRC capability and any buffer size limits the other program may have. (For this example it is 20K). This program sent ZSINIT 02 with some additional information which was acknowledged by a ZACK 03. To start the file transfer, the file name (always in lower case) and length (in decimal) were displayed. This program sent ZFILE 04 with filename and length information. The other program responded with a ZRPOS 09 indicating where the data should start (usually at the beginning of the file). This program sent a ZDATA 0a header to precede the data transmission. The lower case 0a means 32-bit CRC will be used. The twenty "+" characters show 20k was transmitted before the receiver buffer in the other program was full and it did a disk save. Then it sent a ZACK 03 to have sending resumed. Another ZDATA 0a was sent followed by the remaining 12K of data. A ZEOF 0B was sent to indicate the file transmission was complete. A ZRINIT 01 wa s received which meant the other program was ready to receive another file. An ZFIN 08 was sent and received and the operation was finished.