home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / lptoo212.zip / lptool.doc < prev    next >
Text File  |  2000-01-31  |  37KB  |  856 lines

  1.  
  2.   LPTool filetransfer ++; version 2.12 31-01-2000 (c) 1996-2000; Jan van Wijk
  3.  ════════════════════════════[ www.fsys.demon.nl ]═════════════════════════════
  4.  
  5.  
  6. CONTENTS
  7. --------
  8.  Introduction, purpose of the program                                   1
  9.  Status of the program                                                  1
  10.  Installation                                                           2
  11.  Quick setup and verification                                           3
  12.  Summary of commands                                                    4
  13.  Command reference                                                      5
  14.  Examples of LPT usage                                                  9
  15.  Laplink cable layout                                                   9
  16.  Known limitations                                                     10
  17.  Considered improvements                                               10
  18.  
  19.  
  20. Introduction, purpose of the program
  21. ------------------------------------
  22.  LPTool enables file transfer and remote execution via a "laplink" cable
  23.  connection between parallel ports of two machines running OS/2 3.0 or
  24.  greater.
  25.  
  26.  Features include the ability to create directories on the remote
  27.  machine, copy of complete directory-trees including EAs (S option), and
  28.  replace locked (in use) OS/2 DLLs or EXEs at the receiver side.
  29.  
  30.  LPTool works using a daemon in a text-window, accessible either directly or
  31.  through other programs with the help of LPTQ.EXE, enabling REXX and batchfile
  32.  automation and integration with file-managers.
  33.  
  34.  Two warnings!  LPTool will overwrite directories and files without
  35.  warning, so make very certain you know where your files are headed
  36.  before you begin a transfer.  And, LPTool comes with no guarantee of any
  37.  nature.  But so far it seems to work quite well.
  38.  
  39.  
  40. Availability
  41. ------------
  42.  
  43.  1) My Homepage:  http://www.fsys.demon.nl       look for lptool
  44.  
  45.  2) HOBBES (WWW): http://hobbes.nmsu.edu         search for "LPTOOL"
  46.  
  47.  3) Several other WEB and FTP sites, bulletin boards (often outdated!)
  48.  
  49. Status of the program
  50. ---------------------
  51.  
  52.  This version of the program is free for anyone to use, it was written
  53.  in my own time using my own equipment. However, I would very much
  54.  appreciate any feedback by e-mail.
  55.  
  56.  
  57.  Further development depends on my own needs and feedback I receive from
  58.  other users, al work has to be done on spare time...
  59.  
  60.  You can reach me through the Internet: lpt@fsys.demon.nl
  61.                                                                               
  62. Change History
  63. --------------
  64. 1.00  27-01-96     Initial version, communicate with the device-driver
  65. 1.16  22-02-96     First BETA; with some known bugs
  66. 1.26  06-03-96     GAMMA version, including REXEC and performance statistics
  67. 1.30  14-03-96     First production version, including REXX; no internal trace
  68.                    CRC-32 checking is being done on file-transfer
  69. 1.34  10-04-96     Added extra file-spec evaluation for include/exclude [x]
  70. 1.35  14-04-96     Auto exit feature; Replace of locked EXE's or DLL's
  71. 1.42  12-05-96     Command-queueing, other programs can supply cmds (LPTQ.EXE)
  72. 1.50  27-05-96     Final version using command-queueing, WARP EXEPACK:2
  73. 1.56  16-06-96     First version using multi-threaded read/write port/disk
  74. 1.65  27-01-97     Dynamic loading of REXX support; fixed thread priorities
  75. 1.69  06-02-97     filetree and drivemap commands added for GUI interface
  76. 1.70  08-02-97     -c option (clean) and daemon command added for LPTGUI
  77. 1.71  12-02-97     P option on send, no peer-prompting and stat; *cmd pilot
  78. 1.75  17-02-97     *send reliable (but slow); lpts.cmd for synchronizing dirs
  79. 1.76  23-02-97     New cmd "qscreen" on/off, new cmd "say"; @ for no echo
  80. 1.81  13-07-97     New filetree / tstree commands; bug-fixes
  81. 1.83  26-04-98     Multiple-cmd using # separators; cosmetic fixes; WEB info
  82. 1.84  04-05-98     Accept \pipe\xxx as source and \pipe\ as destination stream
  83. 1.86  09-05-98     Fixed 'sound asleep' priority problem for daemon thread
  84. 1.87  15-05-98     Fixed some more dead-lock possibilities in agent thread
  85. 1.90  07-06-98     Made size-param obsolete on \pipe\, prepare for LZW compres
  86. 1.92  15-06-98     First release with LZW compression on file-transfer
  87. 1.95  21-06-98     Rename to LPTool, display changes + fixes for compress bugs
  88. 1.96  23-06-98     High-res icons, fix for 'overwriting dir' trap; diplay fixes
  89. 1.97  01-08-98     Added support for LPT2, BETA, not properly tested yet :-(
  90. 1.98  04-08-98     Update LPTDD.SYS for LPT2/LPT3 use (works OK but hardcoded)
  91. 1.99  05-12-98     Documentation and help-text update, ?? = verbose SEND help
  92. 2.00  12-07-99     Windowed user-interface, scroll-buffer
  93. 2.01  04-08-99     Cable spec doc; enhanced command-recall; 80 column width
  94. 2.02  17-08-99     Improved display performance; progress numeric on large files
  95.                    default asynchronious mode on send (more robust normally)
  96. 2.03  21-08-99     Remote execution HANGS fixed! screen-lines param on start
  97. 2.04  22-08-99     Cleanup; <Esc> will now abort send, show etc at next file
  98. 2.05  05-09-99     Type-ahead default ON (for DragText compatibilty); SET cmd
  99. 2.06  06-09-99     Minor update in SEND (AF default) and DEVICE (rmview info)
  100. 2.07  07-09-99     Fixed hang-on-exit when windowed (lptq qq); Link to PCOPY
  101. 2.08  12-09-99     Fixed SET command (compress) and added 'U' option to send
  102. 2.09  14-09-99     Minor fix in SET SEPARATOR cmd (trap)
  103. 2.11  23-01-2000   Fixed trap, Y2K format, agent-stack trap; LPTS.CMD timeouts
  104. 2.12  31-01-2000   Fixed SCREEN OFF/ON, for faster dir sync; "P" cmd = Ping
  105.  
  106.                    WARNING ==> LPTQ.EXE 2.01 or older is not compatible with
  107.                                releases starting from 2.02, using it wil KILL
  108.                                the daemon LPTOOL.EXE!
  109.  
  110. Special thanks to:
  111.  
  112. Ray Tennenbaum     for his contribution to this documentation
  113. Aglaja Przyborski  for the nice icons she created for the tool
  114. Joe Nord           for writing an excellent LPT device driver wich was
  115.                    the basis to start LPTool development
  116.                    (LPTIO.SYS, part of the PCOPY package, see www.leo.org)
  117.                                                                               
  118. Installation
  119. ------------
  120.  
  121. Only two files are required to operate LPTool, LPTDD.SYS, the device
  122. driver, and LPTOOL.EXE, the actual LPTool.
  123.  
  124. 1) Unzip the files into a directory.  Next, add to your config.sys:
  125.  
  126.    DEVICE=[drive]:\[path]\LPTDD.SYS
  127.  
  128.   Note: LPTDD.SYS can take two optional parameters:
  129.   "-T:ss" specifying the timeout value on send/receive (default 10 seconds).
  130.   If using slow media (diskette), or when LPTool is used on a very busy system,
  131.   increase this for reliable operation, e.g.
  132.  
  133.    DEVICE=[drive]:\[path]\LPTDD.SYS -T:30
  134.  
  135.   "-P:n" specifying the LPT port-address to use (default is 1 for using 0378).
  136.  
  137.    DEVICE=[drive]:\[path]\LPTDD.SYS -P:2
  138.  
  139.   You can use LPTDD.CMD (on Warp 4 or better) for an "estimated guess" on the
  140.   correct parameter for LPTDD.SYS
  141.  
  142. 2) To use LPTOOL.EXE, either copy it to a directory in your path
  143.    (recommended) or simply start it in its own directory.
  144.    You may then issue commands like the ones below.
  145.    LPTool supports REXX.
  146.  
  147. * LPTRACE.EXE is the LPTool with trace and debug code (available on request)
  148.   -- it also runs on OS/2 2.11.
  149.  
  150. * LPTQ.EXE is a simple text front-end to pass LPTool commands to LPTool.EXE
  151.   -- very useful for batchfile transfers and from file-managers
  152.   -- no need for LPTQ at all at the 'receiver', optional at the 'sender'
  153.  
  154. * LPTS.CMD is an LPTool REXX script to synchronize a local directory with
  155.   a remote directory, based on date- and time-info.
  156.  
  157. * LPTD.CMD is a simple command to start LPTool as dedicated daemon.
  158.   -- useful when commands are passed from one or more LPTQ's
  159.  
  160. * LPTDD.CMD is a small utility to make a recommendation for LPTDD.SYS options
  161.   -- useful when the default does not work, funny LPT port addresses etc.
  162.  
  163. For best results, all these should be in your PATH.
  164.  
  165.  
  166. LPTool quick setup and verification
  167. -----------------------------------
  168.  
  169.  
  170.    PC-number 1,  "this" or "HERE"          PC-number 2,  "peer"
  171.    usualy originating/sending              usualy listening/receiving
  172.  
  173.  
  174.      Keyb   Screen
  175.                           Keyb   Screen          Keyb   Screen
  176.        |      |
  177.     +------------+          |      |               |      |
  178.     |  LPTQ.EXE  |       +------------+         +------------+
  179.     | front end  |------>|            |         |            |
  180.     +------------+       | LPTOOL.EXE |         | LPTOOL.EXE |
  181.                          |            |         |            |
  182.     +------------+       |   daemon   |         |   daemon   |
  183.     |  LPTQ.EXE  |------>|            |         |            |
  184.     | front end  |       +------------+         +------------+
  185.     +------------+             |                      |
  186.        |      |                |                      |
  187.                          +------------+         +------------+
  188.      Keyb   Screen       | LPTDD.SYS  |  cable  | LPTDD.SYS  |
  189.                          |            |========>|            |
  190.                          |  driver    |         |  driver    |
  191.     Note: Use of LPTQ    +------------+         +------------+
  192.           is optional
  193.  
  194.  
  195. You need to run LPTool on both ends, actualy there is no real 'host'
  196. and 'client' both are equal peers. For LPTool to start, you need to
  197. have LPTDD.SYS installed in config.sys, and a working parallel port
  198. must be available.
  199.  
  200. On some laptops this is sometimes a problem, to save power, they can
  201. be switched off in the BIOS setup. Also, chewck the port-address, when
  202. not standard, you need to specify it on the LPTDD.SYS line in config.sys.
  203. Look for the -P:xx option (LPTOOL.DOC), use LPTDD.CMD to find the value.
  204.  
  205. The port should be a bi-directional one, no ECP or EPP mode required.
  206. (usualy a BIOS setting too, often the default)
  207.  
  208. And you need the right cable connected, it is a regular LapLink cable,
  209. sold in computer stores. The cable-layout is in LPTOOL.DOC too.
  210.  
  211. After starting LPTool you can check the connection to the port using
  212. the 'device' command, it should say something like:
  213.  
  214. >> Current LPTool device: LPTDD1$
  215.  
  216. or, when using LPTool version 3.06 or newer:
  217.  
  218. >> Current LPTool device: LPTDD1$, possible values are:
  219. >>
  220. >> Possible devices are :
  221. >> (LPT1) fixed at 0378 : LPTDD1$, use LPTDD -P:1
  222. >> (LPT2) fixed at 0278 : LPTDD2$  use LPTDD -P:2
  223. >> (LPT3) fixed at 03BC : LPTDD3$  use LPTDD -P:3
  224. >>  LPT1 as set by BIOS : LPTIO1$, requires LPTIO.SYS
  225. >>
  226. >> Parallel ports as seen bij OS/2 device-manager:
  227. >>  I/O = 0X0378  Len = 8  Flg = MULTIPLEXED PARALLEL_0 Parallel Port Adapter
  228.  
  229. When you have that correct on both sides, you can test the actual connection
  230. using a 'ping' command'
  231.  
  232. It should say "Ping sent, Pong received ..."
  233.  
  234. If a timeout occurs, either the cable is not connected or is wrong, or
  235. the selected port is not operating correctly, or LPTool is not running
  236. at the other end.
  237.  
  238. When it does work you can give a 'send' command on either side to send
  239. one or more files to the other side, example:
  240.  
  241. send g:\documents\*  d:\backup  s
  242.  
  243. Will send the whole 'documents' directory tree to a 'backup' directory
  244. on the D: drive.
  245.  
  246.  
  247. Summary of commands
  248. -------------------
  249.  LPTool takes commands as an OS/2 command-line argument or from the
  250.  keyboard using either a classic or a windowed user-interface.
  251.  It displays the results to the screen, scrolling text upward.
  252.  Results can also be copied to a file for later analysis.
  253.  
  254.  When a command is passed from the OS/2 command-line, LPTool will quit
  255.  after execution of the command. This makes is easier to call LPTool functions
  256.  from other tools, like file-managers.  The commands are single words.
  257.  Most commands have one or more parameters of wich some are optional.
  258.  
  259.  Interrupting the program using Ctrl-C will exit completely.
  260.  Most commands can be aborted using the <Esc> key however, the file
  261.  related commands like SEND and SHOW will then stop at the next file.
  262.  
  263.  An overview of the available commands is given below, it can also be
  264.  referenced from within the program using the '?' command.
  265.  
  266.  ping or p     [ + | - ] = Check if other station is connected and ready
  267.  find [s][c][o][a][n][x] = Find files, display info; optional cmd [c])
  268.  show [s][d][o][a][n][x] = Show source & target filespec for a send
  269.  send [s][d][o][a][n][x] = Send files to connected peer machine
  270.  
  271.       s = source specification, optional absolute or relative path
  272.       d = destination: path, '*' = current dir, '=' = same path, d:, d:=
  273.       o = options: S=subdirectories, F=Files, D=Dirs, I=Include, A=async
  274.       x = exclude/include file-spec(s), wildcards * and ? allowed
  275.       a = Attributes to match for source selection
  276.       n = Attributes to set/reset afterwards on source
  277.             A = Archive, R = Read-only, S = System, H = Hidden
  278.                 Prefix each with '+' for set and '-' for reset
  279.  
  280.  ??                    = Give verbose help on the 'send' parameters
  281.  command-string        = Execute an LPTool or OS/2 command here
  282.  .command-string       = Execute an LPTool command at the other side
  283.  r command-string      = Remote exec command, redirect output back
  284.                          External GUI and filemanager support commands
  285.  filetree   [filespec] = As 'find' includes date and time, no destination
  286.  tstree  [fspec][dest] = As 'find' with sortable date/time; includes dest
  287.  drivemap    [ - | + ] = Available drive-letters in different formats
  288.  
  289.  run lpt-macro[.cmd]   = Run REXX macro in LPTool ADDRESS-environment
  290.  q, quit, exit           LPTool; 2.12 31-01-2000  (c) 1996-99; Jan van Wijk
  291.  
  292.  
  293.  EXTERNALS   Any command not recognized as a valid LPTool internal command
  294.              will be passed to the default command-processor (COMSPEC).
  295.              Usefull commands: DIR, DEL, ...
  296.                                                                                
  297. Command reference
  298.  
  299.  send [source-files] [destination] [options] [attrib] [new-attr] [excludes]
  300.  
  301.  Purpose:       Send one or more files from THIS to PEER
  302.  
  303.  Parameters:    source-files    source specification, default '*'
  304.                                 may include absolute or relative path, can
  305.                                 also be a named pipe: "\pipe\pipename" where
  306.                                 pipename will be used as destination filename
  307.  
  308.                 dest            destination path, absolute including drive or
  309.                                 relative to receiving LPTool current directory
  310.  
  311.                                 Some special values or combinations are:
  312.  
  313.                                 '*'    = current dir at receiving LPTool
  314.                                 'd:'   = current receiver dir, different drive
  315.                                 '='    = same path as source, on same drive
  316.                                 'd:='  = same path as source, different drive
  317.                                 \pipe\ = Named pipe "\pipe\src-fname" where
  318.                                          src-fname is the filename part of
  319.                                          the source specification (no path)
  320.  
  321.                 options         default is 'AF' for single-dir, 'AB' for a tree
  322.                                 A = Asynchronious mode, no direct RC reportback
  323.                                 R = Reportback RC of file-transfer to sender
  324.                                 U = Uncompressed, do not compress any files
  325.                                 S = subdirectories included
  326.                                 F = Files only
  327.                                 D = Directories only
  328.                                 B = Both files and directories
  329.                                 I = Use additional Filespecs [x] as INCLUDE
  330.                                     selection, not Exclude. (default exclude)
  331.  
  332.                                 may be prefixed with '+', '-' or '/'
  333.  
  334.                 attrib          Attributes for selection, default none
  335.  
  336.                                 A = Archive
  337.                                 R = Read-only
  338.                                 S = System
  339.                                 H = Hidden
  340.                                 D = Directory
  341.  
  342.                                 When specified, each attribute must be
  343.                                 prefixed with:
  344.  
  345.                                 '+'  attribute set
  346.                                 '-'  attribute clear
  347.                                 '*'  attribute don't care
  348.  
  349.                 new-attr        Attributes to set/reset afterwards on
  350.                                 each selected source file/directory.
  351.  
  352.                                 A = Archive             H = Hidden
  353.                                 R = Read-only           D = Directory
  354.                                 S = System
  355.  
  356.                                 When specified, prefix each attribute with:
  357.  
  358.                                 '+'  attribute set      '*'  attribute keep
  359.                                 '-'  attribute clear
  360.  
  361.                 excludes        Upto 9 seperate file-specs to be excluded or
  362.                                 specifically included.
  363.                                 Multiple wildcards * and ? allowed.
  364.                                                                                
  365.  
  366.  Output:        One line for each file/directory sent to PEER, with:
  367.  
  368.                   filesize  EA-size  attributes  filename   progress
  369.  
  370.                 Some lines with a summary of the number of files,
  371.                 directories, read-only files etcetera that were found.
  372.                 Also a performance indication in Kb/second is given,
  373.                 the actual amount sent and the compression ratio.
  374.  
  375.  
  376.  show [source-files] [destination] [options] [attrib] [new-attr] [excludes]
  377.  
  378.  Purpose:       Show wich files will be sent from THIS to PEER if the
  379.                 same parameters are used on the SEND command
  380.  
  381.  Parameters     see SEND command
  382.  
  383.  Output:        One line for each file/directory sent to PEER with:
  384.  
  385.                   source-filespec  => target-filespec
  386.  
  387.  
  388.  find [source-files] [os2-command] [options] [attrib] [new-attr] [excludes]
  389.  
  390.  Parameters     see SEND command, except for [c] parameter
  391.  
  392.                 os2-command     Command to execute on each file found, the
  393.                                 full path and filename will be passed as
  394.                                 argument to the specified command.
  395.                                 Note: DO NOT INCLUDE ANY SPACES IN THE COMMAND
  396.  
  397.  Purpose:       Find files using same syntax as send/show
  398.  
  399.  Output:        One line for each file/directory found with:
  400.  
  401.                   filesize  EA-size  attributes  filename
  402.  
  403.                 Some lines with a summary of the number of files,
  404.                 directories, read-only files etcetera that were found.
  405.  
  406.  
  407.  filetree [source-files] [dest] [options] [attrib] [new-attr] [excludes]
  408.  
  409.  Purpose:       Show wich files exist for a given filespec and attributes
  410.                 usefull for a GUI interface remote query ("r filetree")
  411.  
  412.  Parameters     see SEND command, [dest] parameter is ignored
  413.  
  414.  Output:        One line for each file/directory found with:
  415.  
  416.                   dd/mm/yy hh:mm filesize  attributes  full-filename
  417.  
  418.  
  419.  tstree   [source-files] [dest] [options] [attrib] [new-attr] [excludes]
  420.  
  421.  Purpose:       Find and list files using a date sortable output format
  422.  
  423.  Parameters     see SEND command, including [dest] parameter (destination)
  424.  
  425.  Output:        One line for each file/directory found with:
  426.  
  427.                   yymmddhhmm full-filename » destination-path
  428.                                                                                
  429.  
  430.  .command-string         = Execute an LPTool command at the other side
  431.  
  432.  Purpose:       Execute an LPTool command at the PEER
  433.  
  434.  Parameters:    As required by the LPTool command
  435.  
  436.  
  437.  *command-string         = Execute an LPTool command at the other side, watch
  438.  
  439.  Purpose:       Execute an LPTool command at the PEER, stay watching output for
  440.                 a short while (usefull from LPTQ to get AGENT output back)
  441.                 Also see the 'WATCH' command
  442.  
  443.  Parameters:    As required by the LPTool command
  444.  
  445.  
  446.  r command-string        = Remote exec command, redirect output back
  447.  
  448.  Purpose:       Execute an OS/2 command at the PEER and get output HERE
  449.  
  450.  Parameters:    As required by the OS/2 command
  451.  
  452.  Output:        All standard-output (STDOUT, filehandle 1) and all
  453.                 standard-error (STDERR, filehandle 2) will be intercepted
  454.                 at the PEER, send back to the local machine, and is displayed
  455.                 using standard LPTool mechanisms. This includes a local log-file.
  456.  
  457.  
  458.  set var [value]         = Set/show an LPTool system variable value
  459.  
  460.  Purpose:       Set an LPTool system variable to a specific value and/or
  461.                 show the actual value of a variable
  462.  
  463.  Parameters:    var  [value]     Name and optional value for a variable
  464.  
  465.                      - PROMPT    Prompting level, default valie is 4
  466.                                    0         no automatic prompting
  467.                                    1         just a command-prompt
  468.                                    2         full menu at auto prompt
  469.                                    4         Daemon usage auto prompt
  470.  
  471.                      - COMPRESS  Compression level, default value is 14
  472.                                    0         no compression
  473.                                    10 .. 13  LZW variants
  474.                                    14        LZW 14-bit (default)
  475.  
  476.                      - PROGRESS  Progress indicator type, default value is 2
  477.                                    0   dots & diamonds only (classic way)
  478.                                    2   dynamic, use numeric on large files
  479.                                    4   numeric, transferred size in Kb or Mb
  480.  
  481.                      - SEPARATOR Separator character for multiple-commands
  482.  
  483.                      - SCREEN    Screen output, default ON
  484.                                    on        Screen output on
  485.                                    off       Off, output to LOG or REXX only
  486.  
  487.                      - ANSI      Ansi color and cursor-movement, default ON
  488.                                    on        ANSI support ON
  489.                                    off       Off, black & white output
  490.  
  491.                      - TYPE      Type-ahead, default ON
  492.                                    on        Type-ahead enabled
  493.                                    off       Type-ahead disabled
  494.  
  495.                      - PRIO      Process priority
  496.                                    --        lowest priority
  497.                                    -         lower priority
  498.                                    -         standard priority
  499.                                    +         higher priority
  500.                                    ++        highest priority
  501.  
  502.  Output:        Value of the system-variable, after optional value assignment
  503.  
  504.                                                                                
  505.  watch [time-out] [idle-time]
  506.  
  507.  Purpose:       Keep watching, and redirecting, screenouput to be able to
  508.                 see it from an attached LPTQ or in the logfile
  509.  
  510.  Parameters:    time-out        Timeout for first-output line in seconds,
  511.                                 if no ouput after (to) then command ends
  512.  
  513.                 idle-time       Timeout after first output is seen in seconds,
  514.                                 if no more ouput is seen for (it) seconds the
  515.                                 command (and redirection) will end
  516.  
  517.  Output:        All standard-output (STDOUT, filehandle 1) and all
  518.                 standard-error (STDERR, filehandle 2) will be intercepted
  519.                 at the PEER, send back to the local machine, and is displayed
  520.                 using standard LPTool mechanisms. This includes a local log-file.
  521.  
  522.                                                                                
  523.  l [file]                = Log to 'file' ('l' = stop log)
  524.  
  525.  Purpose:       Close current LOG, open new and capture LPTool output in it
  526.  
  527.  Parameters:    File specification
  528.                 If no parameter is specified, logging is stopped.
  529.  
  530.  Output:        Concatenated output of LPTool commands given after the
  531.                 'l' command, upto next 'l' or 'q' command.
  532.                 ANSI control characters for colors and cursor-positioning
  533.                 are not written to the logfile.
  534.  
  535.  Remarks:       There is no check on available space on the destination
  536.                 drive, file may end up empty if disk(ette) is full.
  537.  
  538.                 The same logfile specification can be used more than once,
  539.                 output will be concatenated.
  540.  
  541.                 On each 'l' command the current logfile will be closed.
  542.  
  543.  
  544.  trace [level]           = Set trace level for LPTool internal functions
  545.  
  546.  Purpose:       Investigate unexpected behaviour and debug LPTool
  547.  
  548.  Parameters:    level   optional   Trace level; 0 = no trace
  549.  
  550.  Output:        The resulting trace-level, after this the output will be
  551.                 normal output mixed with extra trace information showing
  552.                 API return-codes and LPTool internal variables
  553.  
  554.  Remarks        Use with care, tracing will delay processing wich might
  555.                 cause additional problems like LPTDD$ timeouts.
  556.  
  557.                 This function might be left out of production versions of
  558.                 the tool to get maximum performance.
  559.  
  560.  
  561.  q, quit, exit         = Exit LPTool; 2.00 12-07-99  (c) 1996-98; Jan van Wijk
  562.  
  563.  Purpose:       Exit LPTool program
  564.  
  565.  Parameters:    none
  566.  
  567.  Output:        none
  568.  
  569.  Remarks:       LPTDD$ and logfile will be closed on exit
  570.                 Asynchronious running threads will be aborted.
  571.  
  572.                 When given from clients like LPTQ, the daemon can be stopped
  573.                 as well by executing the 'QQ' command.
  574.  
  575.  
  576.  lpt                     = Identify currently running LPTool (daemon) version
  577.  
  578.  Purpose:       Show version of connected LPTool daemon, useful from clients
  579.  
  580.  Parameters:    none
  581.  
  582.  Output:        Version info
  583.  
  584.  
  585.  device [device-name]    = Identify or set the LPT device to use
  586.  
  587.  Purpose:       Show attached device-driver name, or optionaly set and re-open
  588.                 with a different name (allowing use of LPT2 for instance)
  589.  
  590.  Parameters:    device-name     The device-driver name to open, any valid OS/2
  591.                                 device will do, but only the ones created by
  592.                                 LPTDD.SYS or LPTIO.SYS will actualy work :-)
  593.                                 The device names are:
  594.                                 "LPTDD1$"  for LPT1, hardcoded I/O port 0378
  595.                                 "LPTDD2$"  for LPT2, hardcoded I/O port 0278
  596.                                 "LPTDD3$"  for LPT3, hardcoded I/O port 03BC
  597.                                 "LPTIO1$"  for LPT1, BIOS resolved I/O port
  598.                                                      requires LPTIO.SYS
  599.  
  600.  Output:        Either the name of the currently attached device name, or
  601.                 a message indicating success or failure opening the device, and
  602.                 possible warnings if the device is not a proper LPTool device.
  603.                 Also, when on Warp version 4 or newer, rmview ouput for the
  604.                 available parallel port-addresses is given.
  605.  
  606.  Remarks:       On startup LPTool automaticaly will try to open each of the
  607.                 above mentioned devices, until it finds one present.
  608.                 This will usualy be the "LPTDD1$" device.
  609.  
  610.                 For use of another port, like LPT2 the "-P:n" switch is needed
  611.                 on the device statement in config.sys for LPTDD.SYS and the
  612.                 LPTDD.SYS must be at level 1.98 (dated 04-08-1998) or newer.
  613.  
  614.                 The used port-addresses are HARDCODED in the driver, so systems
  615.                 with non-standard LPT assignments might fail to work properly.
  616.  
  617.                 Tip: You can have multiple LPTDD statements in config.sys for
  618.                      different ports, LPTool will open the first available one,
  619.                      but you can change that later using the 'device' command.
  620.  
  621.                  ==> You can even start multiple LPTool daemons and use them
  622.                      concurrently to different connected machines!
  623.  
  624.  
  625.  cd [path]    = Change current Directory
  626.  
  627.  Purpose:       Change both the current directory and the current drive
  628.  
  629.  Parameters:    path    optional   Absolute or relative path specification
  630.  
  631.  Output:        The resulting current drive and directory
  632.  
  633.  Remarks:       '.' and '..' can be used in the relative path specification
  634.  
  635.  
  636.  
  637.  d:           = Change current Drive
  638.  
  639.  Purpose:       Change the current drive, without changing current directory
  640.  
  641.  Parameters:    none
  642.  
  643.  Output:        The resulting current drive and directory
  644.  
  645.  
  646.  
  647.  
  648.  screen [arg] = Switch output to the screen on or off
  649.  
  650.  Purpose:       Allow output to logfile or client program only
  651.  
  652.  Parameters:    arg     optional   'on' or 'off' to switch mode
  653.  
  654.  Output:        none
  655.  
  656.  Remarks:       The returncode (rc from REXX) will indicate the setting for
  657.                 screen output: 0 indicates screen switched on
  658.                                1 indicates screen switched off
  659.  
  660.  
  661.  
  662.  run mf [arg] = Run a REXX macro from LPT
  663.  
  664.  Purpose:       Execute a REXX script using the 'LPT' environment
  665.  
  666.  Parameters:    mf      mandatory  Macro file specification
  667.  
  668.                 arg     optional   Arguments to the REXX macro
  669.  
  670.  Output:        Any output from the REXX macro including (OS/2) commands
  671.                 executed from the macro.
  672.                 There is no redirection of any output to the LPTool logfile.
  673.  
  674.  Remarks:       LPTool commands can be issued from within the macro, this
  675.                 is the default environment (Address LPT).
  676.                 Command for CMD.EXE must be addressed explicitly using
  677.                 an 'Address Cmd'
  678.  
  679.                 The following REXX variables will be available after
  680.                 each executed LPTool command from a macro:
  681.  
  682.                 rc            The returncode from the LPTool command
  683.  
  684.                 REXX is dynamically loaded, when the run-command is exectuted
  685.                 It requires REXX.DLL and REXXAPI.DLL in the libpath.
  686.                                                                                
  687.  
  688.  drivemap [d]                  Show wich logical drives exist
  689.  
  690.  Purpose:       Show wich drive-letters exist at the LPT-deamon
  691.                 usefull for a GUI interface remote query ("r drivemap")
  692.  
  693.  Parameters     d       optional   Output-format / level of detail
  694.  
  695.  Output:        default:    One line of drives, example: "C: D: E: R: Z:"
  696.                 '-'    :    One line for each drive-letter, just the drive
  697.                 '+'    :    One line for each drive-letter, with drive and
  698.                             additional filesystem information
  699.  
  700.  
  701.  EXTERNALS      Any command not recognized as a valid LPTool internal command
  702.                 will be passed to the default command-processor (COMSPEC).
  703.  
  704.  Purpose:       Allow execution of external commands like CHKDSK, DIR etc.
  705.  
  706.  Parameters:    As required by the external command
  707.  
  708.  Output:        Any output by the command
  709.  
  710.  
  711.  
  712. Examples of LPTool usage
  713. -----------------------
  714.  -  Send all files in current directory to PEER's current directory
  715.     SEND
  716.  
  717.  -  Send a single file to a specific directory
  718.     SEND s:\some\source\path\somefile.ext d:\some\destination\path
  719.  
  720.  -  Send a complete tree of files to a specific destination directory
  721.     SEND s:\some\source\path\* d:\some\destination\path s
  722.  
  723.  -  Send a complete tree of files to same path on a different drive
  724.     SEND s:\some\source\path\* d:= s
  725.  
  726.  -  Send all modified (archive-bit set) file in a directory tree to
  727.     exactly the same path on the PEER side and reset archive-bit on source
  728.     SEND * = s +a -a
  729.  
  730.  -  Show wich files will be sent for the previous example
  731.     SHOW * = s +a
  732.  
  733.     Note that the '-a' option is NOT SPECIFIED to prevent the archive-bit
  734.     to be reset just by showing (we want that to happen on SEND).
  735.  
  736.  -  Send a product-development tree except objects and executables:
  737.     SEND d:\project\* . s * * *.OBj *.EXE
  738.  
  739.  -  Send an installed OS/2 version to a different destination-drive and
  740.     exclude the OS/2 ini-files, swapper end desktop-directory
  741.     SEND c:\* e:\ s * * *os2*.ini *swapper.dat c:\desktop*
  742.                                                                                
  743.  -  Send all .C and .H files, from a tree, that have changed (archive bit)
  744.     SEND d:\project\test\* . si +a * *.c *.h
  745.  
  746.  -  Find all files on the C: drive that are read-only
  747.     FIND C:\* s +r
  748.  
  749.  -  Show drives available at the remote machine:
  750.     REXEC DRIVEMAP
  751.  
  752.  -  Show new (archive attribute) files at remote machine in filetree format:
  753.     REXEC FILETREE C:\* s +a
  754.  
  755.  -  Show new (archive attribute) files at local machine in filetree format:
  756.     FILETREE C:\* s +a
  757.  
  758.  -  Send a file using a named-pipe as source (as called from DFSee "sim"):
  759.     SEND \pipe\bootsect.img d:\tmp
  760.  
  761.  -  Receive a file using a named-pipe as destination (as with DFSee "wrim"):
  762.     .SEND d:\tmp\bootsect.img \pipe\
  763.  
  764.  
  765. Known limitations and bugs
  766. --------------------------
  767.  Error recovery
  768.  
  769.      Error recovery is limitted to reporting the error-code and for most
  770.      common errors also a short description of the error. Usualy this will
  771.      be shown both HERE and at the PEER station.
  772.  
  773.  
  774.  REXEC redirection of STDIN
  775.  
  776.      No redirection for a remote program's standard-input is possible yet.
  777.  
  778.  
  779.  Canceling functions
  780.  
  781.  Interrupting the program using Ctrl-C will exit completely.
  782.  Most commands can be aborted using the <Esc> key.
  783.  
  784.  
  785.  When the scroll-buffer or windowing-mode causes any problems,
  786.  LPTool can be started in classic mode as follows:
  787.  
  788.    LPTOOL.EXE nowin
  789.  
  790.  
  791.  WARNING: LPTool, or better: LPTDD.SYS will NOT work when the
  792.           IBM NDIS parallel port-driver PMAC is active, so when
  793.           a statement like:
  794.  
  795.           DEVICE=C:\IBMCOM\MACS\PMAC.OS2
  796.  
  797.           is in your config.sys
  798.  
  799.  
  800. LPTIO.SYS and PCOPY
  801. -------------------
  802.  
  803. This is the original package created by Joe Nord, being used widely
  804. within IBM itself, also available on several external sites.
  805.  
  806.  LEO download site: www.leo.org/pub/comp/os/os2/leo/systools/pcopy.zip
  807.  
  808.  
  809. It's device driver LPTIO.SYS and LPTDD.SYS are very similar.
  810.  
  811. However LPTDD.SYS supports multiple port-addresses to select, at
  812. the cost of HARD-CODING those addresses.
  813.  
  814. In some circumstances LPTDD.SYS may fail to load or attach to the
  815. port, in those cases you might want to try LPTIO.SYS instead.
  816.  
  817. LPTOOL.EXE will work with LPTDD or LPTIO, while Joe Nords original
  818. PCOPY.EXE can only operate together with LPTIO.SYS.
  819.  
  820.  
  821. Laplink cable layout
  822. --------------------
  823.  
  824. LapLink cables are 25-pin to 25-pin direct cables.
  825. The pin layout is listed below.  DOS 6.x, Fastlynx and
  826. Brooklyn Bridge use this same format.
  827.  
  828.   OneSide    OtherSide   (LapLink PC to PC pin connections)
  829.      2  ----->  15
  830.      3  ----->  13
  831.      4  ----->  12
  832.      5  ----->  10
  833.      6  ----->  11
  834.     15  <-----   2
  835.     13  <-----   3
  836.     12  <-----   4
  837.     10  <-----   5
  838.     11  <-----   6
  839.     25  ------  25  Ground
  840.  
  841.  
  842. Considered improvements
  843. -----------------------
  844.  
  845.  - Limited retries on failing block-transfers (CRC error, timeout etc)
  846.  
  847.  - Redirect STDIN for remote executed commands from PEER to HERE
  848.  
  849.  - A text-mode frontend (LPTQVIO.EXE) to supply LPTool command with a
  850.    user-interface for both input and output.
  851.  
  852.    This will probably be a Norton-commander style interface with two
  853.    windows, one for THIS and one for PEER with a display of the
  854.    directory contents.
  855.  
  856.