The text of a manual · part 8 of 19
Falcon DOS Portable Data Terminals Advanced User's Guide, pages 71 to 80
Pages 71 to 80 of 184
The original document is the PDF (10 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Datalogic F330 and PSC F330
Page 71
advuser.book Page 19 Friday, September 27, 2002 4:22 PM
Using XFER Xmodem: If the F option is not included in the command line, no flow control is used. XON/XOFF cannot be used with Xmodem protocol, because Xmodem protocol sends raw binary data and cannot distinguish between the XON/XOFF characters and file data. Attempting to specify XON/XOFF with Xmodem protocol will result in an error. Zmodem: On the Falcon 33x and 34x, the default flow control for Zmodem is Xon/Xoff. For all other portables and host PCs, the default is RTS/CTS. On a Falcon portable, flow control should be used when transferring with Zmodem, especially if Zmodem is in streaming mode. In streaming mode, the Zmodem sender does not wait for acknowledgements to packets but continuously sends a stream of data. Often this can overwhelm the receiver especially if it is receiving at high data rates or receiving to the C drive or to a PCMCIA ATA card, which writes data to disk much slower than the D drive. H or ? Help: This option displays a brief description of the XFER syntax, options, and settings. Ifile Modem-Initialization File: This option specifies the file that contains modem setup and control commands. Refer to The Modem-Initialization File on page 3-29 for complete information about Ifile. Mcommand Modem Command: This option allows commands to be sent to the modem before the start of the file transfer. To use the M option, replace command with one of the following commands: A = Auto answer ATstr = Send ATstr commands D#x = Dial memory #x (0–9) Dstr = Dial phone number str Specifying XFER /MA instructs the modem to go into auto-answer mode. In this mode the modem will wait for the timeout period specified in the modeminitialization file for another modem to dial into it. On detection of a ring-in signal, XFER will answer the line and attempt to start a file transfer. Specifying XFER /MATstr allows a string of AT commands to be sent to the modem. These commands will be sent to the modem after the initialization string from the modem-initialization file and can be used to specify a different configuration. Since only one modem command can be specified on the
Advanced User’s Guide
3-19
Page 72
advuser.book Page 20 Friday, September 27, 2002 4:22 PM
Using File Transfer Programs command line, any commands to auto-answer or dial must be included in the AT string. There are two methods for dialing numbers. The first method uses the format XFER /MD#x, where x is a number from 0 through 9. This number corresponds to a directory number from the modem-initialization file, which identifies a number that should be dialed for this transfer (see the NUMBER# keyword on page 3-31). If a number is not specified, directory number 0 is used. The second dialing method is to use the XFER /MDstr format, where str is a dialing command to be sent directly to the modem. This string can be any recognizable phone number text, such as (555) 444-3333 or 5554443333. The last M option on the command line or in the environment variable is the one used for controlling the modem. All earlier modem-command settings are ignored. If the M option is used without specifying a command, the modem will be disabled for that transfer session. This is useful in the case where modem commands are specified in the XFER_ARGS environment variable (refer to page 3-26) but are transferring files without a modem for the current transfer session. N Ignore Previous Option Settings: This option causes XFER to ignore previously specified options and return to a default state. All options specified in the XFER_ARGS parameter and on the command line preceding the N are ignored. All options that XFER supports are returned to the default state, and all filenames, response files, modem-initialization files, and modem commands that are specified before the N (including the XFER_ARGS environment variable) are discarded. The N option is useful when the XFER_ARGS environment variable is used to redefine defaults for XFER. It isn’t always obvious that the XFER_ARGS parameter is controlling the behavior of XFER, and it is often the case that several parameters have been redefined. Instead of having to set each option back to its default, use the N option to return XFER to a known state. O# Overwrite Existing File(s): The O option specifies what action the receiver should take if the file being transferred already exists on the receiver’s side. When using this option, replace the # symbol with the desired setting:
3-20
Falcon® DOS Portable Terminals
Page 73
advuser.book Page 21 Friday, September 27, 2002 4:22 PM
Using XFER
1 - Overwrite if source is longer or newer 2 - Overwrite if CRCs don’t match 3 - Append to existing file 4 - Always overwrite 5 - Overwrite if source is newer 6 - Overwrite if dates or lengths don’t match 7 - Never overwrite By default, XFER operates in O7 mode - existing files are never overwritten. For Xmodem, the only valid options are O4 and O7; all other settings resolve to O7 (never overwrite). All settings for the O option are available with Zmodem protocol. To remain compatible with previous versions of XFER, the O option used without a setting resolves to the O4 setting (always overwrite). This differs from most other XFER options, where specifying the option without a setting usually resolves to the default condition for that option. To use the default condition for the O option, specify the O7 setting. An invalid setting will result in an error on the command line. XFER does not prompt to specify whether a file should be overwritten in the default mode. If no overwrite option is specified, the file will never be overwritten. Under Xmodem, the session will abort. Under Zmodem, the file will be skipped and the next file will be transferred.
For the O6 setting under Zmodem, XFER does not set the date or time of a received file to match the original date or time of the sender’s version of the file. Instead, the date and time are taken from the receiver’s operating system when the file is received and created. Because of this, it is highly unlikely that a file transferred with XFER will have the exact date of the original file. Since the resolution of times for files under DOS is in two-second increments, it is unlikely the timestamps will be the same, even if the times on the receiver and sender are calibrated frequently. Also, DOS doesn’t report the seconds field when displaying the modification time of a file during a file listing. So, two files may appear to have the same timestamp when in fact they don’t. The tendency with the O6 option is for files to be overwritten, because times usually do not match exactly.
Advanced User’s Guide
3-21
Page 74
advuser.book Page 22 Friday, September 27, 2002 4:22 PM
Using File Transfer Programs
The O3 setting is unique in that it causes the transferred file (binary or ASCII) to be appended to the end of the old file rather than overwriting it. With Zmodem, the O option can be used with the C option setting for crash recovery (refer to page 3-16). If C2 (follow sender) is specified on the command line, then the receiver will use the sender’s crash and overwrite options. Any options local to the receiver will be ignored. Q Quiet Mode: This option toggles quiet mode. When quiet mode is enabled, minimal information is displayed about the file transfer in progress. Generally, only the name of the file being transmitted is displayed. When not in quiet mode, XFER will display a copyright message, the filename, and file statistics, including a running count of bytes transferred. Running XFER in quiet mode on the Falcon can significantly improve serialtransfer performance, especially at high speeds. At 115200 baud, transfers are four times faster if quiet mode is enabled on the Falcon than if it is disabled, owing to the delay inherent to writing a running byte count to the screen. Since the Q option is a toggle switch, each occurrence of it in the command line inverts the quiet-mode state. By default, XFER has quiet mode off. The first occurrence of the Q option turns quiet mode on, the next turns it back off, and so on. This is most useful if the option is specified in the XFER_ARGS environment variable (refer to page 3-26) to activate quiet mode by default but in the current transfer session quiet mode will be deactivated. R Receive File(s): This option specifies that files are to be received. With Xmodem protocol, the option must be specified whenever receiving a file. The option can be included in the XFER_ARGS environment variable (refer to page 3-26), forcing Xmodem protocol to default to receiving instead of sending files. With Zmodem, receive is the default if no file is specified on the command line (for example, XFER /z). The name of the file is sent by the transmitting side before the file is transferred, and the file is received with that path and name. To receive a file under Zmodem with a different name from the sender’s, use the R option to force Zmodem into receive mode. Specify the new filename after the R option on the receiver’s command line (See the filename(s) option on page 3-14 for information on specifying file-names.) When Zmodem has been specified, using the R option without a filename is the same as not using the option at all - the sender’s filename (and path) is used.
3-22
Falcon® DOS Portable Terminals
Page 75
advuser.book Page 23 Friday, September 27, 2002 4:22 PM
Using XFER
The last transfer option, R or T, on the command line controls whether to transmit or receive for the session.
S Specify Sender’s Path-and-File Handling (Zmodem only): The S option controls how the sender handles the paths and filenames of the files that it sends. This option is available only with Zmodem protocol. The Z option must be specified before using the S option. Use one of the following settings described individually below: 0 - Strip paths 1 - Send paths 2 - Send new paths/filenames If the S option is not included in the command line, the default setting (0) is used. If the S option is used without specifying a setting (for example, XFER / S), it is assumed to mean S0. This is useful in the case where another option is specified in the XFER_ARGS environment variable (refer to page 3-26) but during the current transfer session, the paths will be stripped. An invalid setting will result in an error on the command line. 0 Strip Paths: In this mode (the default), the sender will remove any paths that are specified with a filename before sending the filename to the receiver. The new filename will be transmitted to the receiver without any path information. The file will be stored by the receiver in the current directory. 1 Send Paths: This option performs no processing on the filenames specified on the sender’s side. Any drive and path information that is specified is transmitted to the receiver. If a path is specified and it does not exist on the receiver’s side, the transfer will abort with a failure. 2 Send New Paths/Filenames: When the S2 setting is used, all filenames are treated as filename pairs. This provides the ability to specify dual filenames during a transfer. The first filename (optionally including a drive and path) is the one that the sender uses to open the file. The second filename is used by the sender when it transmits the filename to the receiver. This provides the ability to transfer a file and have it renamed on the receiver’s side. It also allows
Advanced User’s Guide
3-23
Page 76
advuser.book Page 24 Friday, September 27, 2002 4:22 PM
Using File Transfer Programs transfer of a file from one directory on the sender’s side to another directory on the receiver’s side. Multiple filename pairs may be specified, which may be separated by other XFER options. The following conventions must be observed when using the S2 option. Failure to conform may result in errors. z The S2 command must be specified ahead of any filenames. z When specifying dual filenames, the filenames must be separated by a single space. The first filename in the pair is what the sender uses, and the second filename is what the sender will transmit to the receiver. If more than one space is used, all spaces after the first will be included as part of the receiver’s filename. z The drive and path may be specified for components for either filename in a pair. The actual name of the file must be included in both filenames along with the drive and the path. Correct examples: C:\> xfer /zs2 file1 file2 C:\> xfer /zs2 c:\data\file1 d:\file2 C:\> xfer /zs2 c:\data\file1 d:\file1 c:\yourfile myfile C:\> xfer /zs2 file1 data1 /b115200 file2 data2
Incorrect examples: C:\> xfer /zs2 file1 /b115200 file2 C:\> xfer /zs2 file1 file2 C:\> xfer /zs2 file1[TAB]file2 C:\> xfer /z file1file2 /s2 C:\> xfer /zs2 file1d:\
In the second incorrect example, the additional spaces would be included in the receiver’s filename. This is generally wrong, but it may be correct if that is the intended result. The third incorrect example is invalid because the filenames must be separated by a single space; no other white-space character can be used. This mistake most often occurs when using response files (refer to page 3-15). If a filename is specified on the receiver’s side, that filename will override whatever filename the sender transmits to the receiver.
T Transmit File(s): This option specifies that files are to be sent. For Xmodem protocol, this is the default; that is, typing XFER foo on the command line would send the file foo. 3-24
Falcon® DOS Portable Terminals
Page 77
advuser.book Page 25 Friday, September 27, 2002 4:22 PM
Using XFER
For Zmodem protocol, transmit is the default when specifying a file on the command line. So, for example, the command XFER /Z foo is equivalent to the command XFER /Z /T foo. The T option is most useful if the XFER_ARGS environment variable (refer to page 3-26) includes the R command and a file is also being sent.
The last transfer option, R or T, on the command line controls whether to transmit or receive for the session.
W Window Size (Zmodem only): This option controls the use of windowing with Zmodem protocol. By default, Zmodem is a streaming protocol, and windowing is disabled. “Streaming” refers to the method by which Zmodem transfers data. In streaming mode, the sender forms 1K data packets and sends one packet after another in a continuous stream. The sender does not wait, and does not expect, to get acknowledgments from the receiver for any of the packets it sends. Instead, the sender assumes the file transfer is going normally unless it gets an error indication from the receiver. This works fine in robust, error-free environments. But the receiver can get lost or disconnected without the sender realizing it. Windowing provides a way in noisy environments to give some level of packet acknowledgment to Zmodem protocol. With windowing, the sender will send up to the number of bytes specified by the size of the window and then stop transmitting data until the receiver acknowledges that it has received all of the packets that have been sent. The sender then sends more packets, up to the size of the window, and so on. Waiting for acknowledgments slows down transfer speeds, but XFER allows a dynamic compromise between speed and robustness. XFER allows specifying the window size with any value from 0 to 65535. Use W0 for streaming mode. For a 1K window, use W1024. Values below 1024 are used exactly as specified and should be the size of the transmitted packets. Values above 1024 should be multiples of 1024 (1024, 2048, 4096, etc.). Values above 1024 that are not multiples of 1024 are rounded up to the nearest multiple of 1024. If the W option is not included on the command line, streaming is used. If the option is used without specifying a setting, W0 (streaming) is used by default. This is useful in the case where a window size is specified in the XFER_ARGS environment variable refer to page 3-26) but streaming will be used for the current transfer session.
Advanced User’s Guide
3-25
Page 78
advuser.book Page 26 Friday, September 27, 2002 4:22 PM
Using File Transfer Programs
Always place the W option after the Z option, or a parsing error will occur. See the information about the Z option on page 3-26 for more details.
X Xmodem Transfer: The X option instructs XFER to transfer all files in that session using Xmodem protocol. Because this is the default file-transfer protocol, it does not normally need to be specified. Z Zmodem Transfer: The Z option instructs XFER to transfer all files in that session using Zmodem protocol. The Z option should come before all other options that are valid for Zmodem only (such as the C option). This is required because Xmodem is the default protocol for XFER, and option parsing will fail if an illegal setting is specified under Xmodem. In addition, specifying the Z option resets the Zmodem window size for that session, making it necessary for the Z option to come before any use of the W option. The last protocol option in the command line specifies the protocol that will be used for the file transfer; that is, Xmodem would be used for the transfer ordered by XFER /Z /X foo, and Zmodem would be used for the transfer ordered by XFER /X /Z foo.
The XFER_ARGS Environment Variable XFER recognizes the environment variable XFER_ARGS. This variable can be used to set option settings for most transfer sessions. Even files can be specified in the XFER_ARGS environment variable. Parsing of the XFER command line starts with the XFER_ARGS variable and then continues through any other specified options or filenames. A slash or hyphen can be used for each option or the options can be merged into one block following a single slash or hyphen:‘ C:\> set XFER_ARGS = /ZROB57600 C:\> set XFER_ARGS = /Z /R /O /B57600
For each command line in the example, files will be received (option R) using Zmodem protocol (Z) and a baud rate (B) of 57600 baud, and existing files will always be overwritten (O).
3-26
Falcon® DOS Portable Terminals
Page 79
advuser.book Page 27 Friday, September 27, 2002 4:22 PM
Using XFER
Up to ten slashes or hyphens can be used for options in the environment variable. Refer to section, Multiple-Option Blocks, on page 3-27 for more information.
Any of the parameters used in the example could be overwritten on the command line. For example, with following command: C:\> xfer /x foo
XFER would use Xmodem for the file transfer instead of Zmodem, while still using the other option settings specified in the XFER_ARGS variable. There are two precautions for mixing options in the environment variable with options on the command line. The first is about options that are supported by Zmodem protocol only. In the following example: C:\> set XFER_ARGS = /z /w4096 /c3 C:\> xfer /x foo the environment variable is set up to use Zmodem with a 4K window and crash recovery turned on. In the XFER command line, Xmodem protocol is specified. Since Xmodem doesn’t support windows or crash recovery, both those options are ignored. Another, more troublesome scenario is the following: C:\> set XFER_ARGS = /z /o5 C:\> xfer /x foo
Here, XFER is set to Zmodem in the environment variable, with an overwrite setting of 5 (overwrite if source is newer). However, in the XFER command line, Xmodem protocol is specified. The only overwrite settings that Xmodem supports are O4 (always overwrite) and O7 (never overwrite); all other O options resolve to O7 for Xmodem. If the file foo exists, the transfer will abort. In this case, specify O4 on the command line or do not use the X option. If a filename is included in the XFER_ARGS environment variable, that file will always be the first file sent or received. Negate it only by specifying the N option on the command line (refer to page 3-20). For this reason, exercise extreme caution when including filenames in the environment variable.
Multiple-Option Blocks XFER supports multiple options after a single slash (/) or hyphen (-) on the command line and in the XFER_ARGS environment variable. Each of the following examples is a valid command line:
Advanced User’s Guide
3-27
Page 80
advuser.book Page 28 Friday, September 27, 2002 4:22 PM
Using File Transfer Programs C:\> xfer /zrob115200 foo C:\> xfer /zro /d30 /b115200 foo C:\> xfer /zrw2 /o5c3f2 foo
Any option can immediately follow another without a separate delimiter (/ or -) unless the preceding option has a multicharacter setting. The following options have multicharacter settings: z B (baud rate) z D (timeout) z E (error count) z I (modem-initialization file) z M (modem command) The setting for each of these options must be followed by a space. Except for the I and M options, the option is ignored during parsing if there is no space following its setting. For the I option, any extra characters directly following the initialization-file filename will be treated as part of the filename. Any extra characters following the M option will be treated as part of the modem command; this may produce modem-command syntax errors. Correct examples: C:\> xfer /zrob115200 foo C:\> xfer /zo5c3f2b115200 foo C:\> xfer /z /mA foo
The first two command lines above are valid because the /b115200 setting is always at the end of the multiple-option block. Also in the second example, the O, C, and F options all have single-digit settings. Incorrect examples: C:\> xfer /zb115200ro foo C:\> xfer /z /mAro6 foo
In the first command line above, XFER would load and run. However, the R and O options would not be detected, because the b115200 setting is not followed by a space. Therefore, XFER would try to send the file foo, not receive it. The second example is wrong because the R and O6 parameters would be included as part of the modem command A. Be careful when specifying the COM port in a multiple-option block. For example, the following command: C:\> xfer /zo2 foo
3-28
Falcon® DOS Portable Terminals