home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1 / HamRadio.cdr / packet / dosgate / dosgate.doc < prev    next >
Text File  |  1988-12-18  |  16KB  |  444 lines

  1.     ╔═════════════════════════════════════════════════════════╗
  2.     ║                                                         ║
  3.     ║    DOSGATE _                                            ║
  4.     ║             \                                           ║
  5.     ║              \                                          ║
  6.     ║               \_ Remote operation of MS-DOS             ║
  7.     ║                                                         ║
  8.     ╚═════════════════════════════════════════════════════════╝
  9.     Copyright (c) 1987
  10.  
  11.     Rich Bono, NM1D
  12.     7 Redfield Circle
  13.     Derry, New Hampshire 03038
  14.  
  15.     This document describes DOSGATE version 1.6
  16.  
  17.     DOSGATE is a system which allows an industry standard MS-DOS computer 
  18.     to be controlled via an RS-232 serial port.  The port is considered to 
  19.     be a remote user.  The traditional console of the machine is still in 
  20.     complete control and can supervise and disable/enable the remote user 
  21.     at will.  There is a simple 'Chat' mode that may be entered from the 
  22.     console to allow 'talking' with the remote user to give assistance or 
  23.     instructions.  In addition to chat mode, there is a simple terminal
  24.     emulator to allow control of a modem or other device connected to the
  25.     serial port.
  26.  
  27.     The remote user may be connected directly with an RS-232 terminal,
  28.     via a modem over telephone lines, or with a TNC for remote operation
  29.     via radio!
  30.  
  31.     The local console may still be used for any software 
  32.     that normally runs.  The remote user is capable of running any 
  33.     software that calls only MS-DOS (int 21h) system calls.  Any software
  34.     that by-passes MS-DOS and interfaces with the BIOS or directly with the
  35.     hardware for I/O will not be usable by the remote user.
  36.  
  37.     This version of DOSGATE is being distributed as SHAREWARE.  You are
  38.     allowed to use DOSGATE on a trial basis for a limited period of time.
  39.     After the trial period, you must register your use of DOSGATE with the
  40.     author.   Remember, DOSGATE is NOT in the public domain, and as such it
  41.     is NOT free software.
  42.  
  43.     If you find DOSGATE helpful in anyway, or you wish to promote 
  44.     further improvements to DOSGATE, please send an apropriate amount 
  45.     to the author at the above address. If you send $20.00 or more, 
  46.     you will be be placed on the update list.
  47.  
  48.     The author would like to hear from anyone with comments or 
  49.     suggestions concerning DOSGATE or other projects.
  50.  
  51.     Currently tested with :
  52.  
  53.        DOS:
  54.  
  55.         Versions 3.2, 3.3, 4.00, 4.01
  56.  
  57.        Remote user connection devices:
  58.  
  59.         Kantronix KAM (version 2.82 through 2.85)
  60.         Kantronix KPC-2 (version 2.82 or 2.85)
  61.  
  62.     DOSGATE is implemented as an MS-DOS installable device driver.
  63.  
  64.     Also implemented is a simple terminal emulator which allows one
  65.     to communicate with the serial port.
  66.  
  67.     To use the terminal emulator, execute DOSGATE at the DOS
  68.     prompt.
  69.  
  70.         The terminal emulator has one command:
  71.  
  72.         ALT-X - exits the terminal emulator and returns to MS-DOS.
  73.  
  74.     Device driver installation instructions:
  75.  
  76.     DOSGATE has but four runtime commands:
  77.  
  78.         ALT-D will toggle the remote user on and offline.  A message
  79.         is sent to the console and the remote user to inform about
  80.         the change.
  81.  
  82.         ALT-T will toggle the 'terminal' function on/off.  A message
  83.         is output to confirm the change in mode.  This terminal is
  84.         only to be used for simple configuration commands to or from
  85.         the TNC or modem.
  86.  
  87.         ALT-C will toggle the 'chat' function on/off.  A message is
  88.         output to both the console and the remote user to inform
  89.         about the change.  Use this mode to 'talk' to a remote user
  90.         that is connected to the system.
  91.  
  92. DOSGATE should be installed as any other MS-DOS device
  93.         driver. It also provides for various options.
  94.  
  95.     
  96.     CONFIG.SYS should contain the line:
  97.  
  98.         DEVICE = DOSGATE.EXE
  99.  
  100.             This causes the following default options:
  101.  
  102.                     Remote user disabled,
  103.                     Remote user with echo,
  104.                     1200 baud,
  105.                     No handshaking,
  106.                     DOSGATE on COM1,
  107.                     No Carrier Detect logic
  108.                     No SET USER= logic
  109.  
  110.             The following options are available at boot time . . .
  111.  
  112.             /R - Remote user enabled at boot time
  113.  
  114.             /E - Disable ECHO of remote users keystrokes
  115.                 This is useful if the remote users'
  116.                 terminal has local echo.
  117.  
  118.             /2 - Selects COM2 for DOSGATE else COM1 is used
  119.  
  120.             /C - Carrier Detect logic, will do the following when
  121.  
  122.                 CD goes TRUE:  - Issue CTRL-C, 'START', CR
  123.                 CD goes FALSE: - Issue CTRL-C, 'END', CR
  124.  
  125.  
  126.                 Be SURE that your interface cable supports
  127.                   the Carrier Detect Line!!!
  128.  
  129.                 Remote user must be enabled!
  130.  
  131.                 This allows the programs 'start' & 'end' to be
  132.                  executed as remote users come and go.
  133.  
  134.             /U - Sets the environment variable USER to the ID of
  135.                 the user from the TNC status message.
  136.                 If no TNC status message, user enters CR, and
  137.                 then receives a 'Login:' prompt.  The user's
  138.                 input is stored in the USER environment.
  139.                 Note: FORCES the /C switch on (see above).
  140.  
  141.             /Bxx - selects baud rate (default is 1200 baud)
  142.                 (No parity, 8 bits, 1 stop bit)
  143.                 currently supported baud rates:
  144.                     /B96 - 9600 baud
  145.                     /B12 - 1200 baud
  146.                     /B30 - 300 baud
  147.                     /B11 - 110 baud
  148.  
  149.             /H - Enables hardware handshaking - Must have DSR & CTS
  150.                 to be able to transmit to remote. Be sure that
  151.                 the interface cable supports these lines!
  152.  
  153.             /A - Absorb LF's that follow CR's to remote.
  154.                 this is useful if the remote users terminal
  155.                 automatically does a CR/LF upon receiving a CR.
  156.  
  157.             /P - Enables Packet radio specific options
  158.                 ie:
  159.                     Remote user enabled at boot time
  160.                     Remote user Echo disabled
  161.                     Absorb LF's following CR's to remote
  162.                     Enable hardware handshaking
  163.                     Carrier detect logic enabled
  164.                     SET USER= logic enabled
  165.  
  166.  
  167.     for example:
  168.  
  169.         DEVICE=DOSGATE.EXE /R /E   - Start remote user enabled, and
  170.                         absorb (disable) ECHO to the
  171.                         remote user.
  172.             or
  173.  
  174.         DEVICE=DOSGATE.EXE /P      - Start DOSGATE for packet radio
  175.                                      operation (see '/P' above).
  176.  
  177.     DOSGATE should be the only device driver installed for the CON:
  178.     device.  This means DO NOT install an ANSI.SYS device driver when
  179.     the DOSGATE driver is installed!!!
  180.  
  181.     Note: At this time, DOSGATE does not support ANSI escape sequences
  182.     to the local console.  ANSI escape sequence support may be implemented
  183.     in a later version (Be sure and register if you desire this).  Escape
  184.     sequences will work on a remote terminal if it understands them.
  185.  
  186.     It is strongly suggested that you install the DOSGATE driver in a
  187.     sub-directory that is hidden from the user, and that does NOT have
  188.     the environment PATH pointing to it.  Or you may rename DOSGATE.EXE to
  189.     DOSGATE.SYS to keep users from executing DOSGATE and invoking the
  190.     terminal emulator function.
  191.  
  192.     When used as a terminal emulator DOSGATE allows the choice of baud
  193.     rate to be used.
  194.  
  195.     ie: DOSGATE /b96    - This would start the terminal emulator using 
  196.                   9600 baud over COM1 (default is 1200 baud).
  197.  
  198.  
  199.     Environment variables are used to assist MS-DOS programs executing
  200.     in the DOSGATE environment.  The currently defined evironment is:
  201.  
  202.         USER    - Set by DOSGATE driver to the ID of the user.
  203.                Used by DOSMAIL functions and START.EXE.
  204.  
  205.         DRIVES    - Used by END.EXE, must be set by AUTOEXEC.BAT
  206.  
  207.         Note: The path environment variable should NOT point
  208.             to a directory that the DOSGATE.EXE driver is
  209.             stored, and the remote user should NOT be able
  210.             to stumble across the DOSGATE.EXE file.  If the
  211.             user attempted to execute the DOSGATE driver, he
  212.             would start the terminal emulator feature of the
  213.             DOSGATE.EXE driver, and hang the system!  Keep
  214.             the DOSGATE.EXE driver in a hidden directory!
  215.  
  216.     The additional programs, "START.EXE", "END.EXE", "DISC.EXE" are
  217.     used for helping with managing the user in DOSGATE.
  218.  
  219.     With this version:
  220.  
  221.         START - Can be invoked automatically
  222.              (see '/C' parameter above).
  223.  
  224.             START will:
  225.  
  226.             1: Open the file 'user.log' in the directory
  227.             specified by the environment 'MSG', and write
  228.             the contents of the environment 'USER' to that file.
  229.  
  230.             2: Look for a file called "WELCOME.DOC" and
  231.             output it to the user.  This can be to give the
  232.             user instructions when he first connects.
  233.  
  234.             3: Invoke 'READ /c' to report if the user has any mail.
  235.  
  236.             Note: START.EXE can be replaced by a program of your
  237.                   own that performs any functions that you desire
  238.                   to be done when the user first "connects" (see
  239.                   below).
  240.                   
  241.  
  242.         END - Can be invoked automatically
  243.             (see '/C' parameter above).
  244.  
  245.             END will look in the environment for the
  246.             'DRIVES' parameter.  This is used to set each
  247.             drive to its ROOT ('\') directory, and also to
  248.             leave the machine with the default drive set as
  249.             indicated.  This is used to insure that the
  250.             next user will come into DOSGATE at the same
  251.             place each time, and not where the last user
  252.             left off.
  253.  
  254.             DRIVES should be set in AUTOEXEC.BAT as follows:
  255.  
  256.                 SET DRIVES=C:;A:;B:;D:
  257.  
  258.             This would set each drive (A:, B:, C:, and D:) to its
  259.             root directory, and also set the default drive to
  260.             C: (the first drive specified will be the default
  261.             drive).
  262.  
  263.  
  264.             Note: END.EXE can be replaced by a program that you
  265.                 supply to perform any functions that you
  266.                 desire to happen when the user 'disconnects'.
  267.  
  268.  
  269.         If the 'sysop' desires some other functions to be performed
  270.         when a user first connects to DOSGATE, just create your own
  271.         program (or batch file) to perform the desired actions, it
  272.         must be named START (.EXE, .COM or .BAT).
  273.         The END (.EXE, .COM, or .BAT) program is called when a user
  274.         disconnects.  This may also be replaced.  If the 'sysop'
  275.         desires nothing to be done for connect/disconnect, and will
  276.         not be using mail, then the 'CD' logic may be disabled.  If
  277.         the 'sysop' desires connect action, but nothing upon
  278.         disconnect, then simply replace the END program with one
  279.         that does nothing.
  280.  
  281.  
  282.         DISC - Must be invoked manually.
  283.  
  284.             At this time, DISC will
  285.  
  286.                 wait 3 seconds,
  287.                 issue 3 control-C's,
  288.                 wait 3 seconds.
  289.                 issue 'DISC' [CR],
  290.                 issue 'TRANS' [CR]
  291.  
  292.             This is to place the TNC in command mode, issue
  293.             a disconnect request, then place the TNC back into
  294.             TRANSPARENT mode until the disconnect is complete.
  295.             The user may use this command to have DOSGATE initiate
  296.             the disconnect.
  297.  
  298.  
  299.     Compatibility with DOSGATE:
  300.  
  301.     The general rules for programs that can be run under DOSGATE are
  302.     fairly simple, not keeping to the rules may simply cause confused
  303.     users, or could cause the system to HANG!
  304.  
  305.  
  306.     1 - Any program that affects the serial port that DOSGATE is using
  307.     for the remote user will probably cause the computer to hang!
  308.     DOSGATE is using the serial port with interupts ON, and will
  309.     not tolerate other programs touching the serial port hardware.
  310.  
  311.     2 - Any program that does not do its I/O through DOS (int 21h) calls
  312.     will by-pass the remote user.  This means that the remote user
  313.     will probably be able to start such a program, and all may appear
  314.     normal on the local console, but the computer may appear dead as
  315.     far as the remote user is concerned.
  316.  
  317.     3 - Any program that issues ANSI escape sequences may work for the
  318.     remote user (if his terminal supports the proper escape sequences),
  319.     but (with the current version of DOSGATE) will not work correctly on
  320.     the local console.
  321.  
  322.     4 - Programs that output massive amounts of data may run slow.
  323.     Remember that any data that is output to the remote user is limited
  324.     in speed by the serial port, (1200 baud is about 120 characters per
  325.     second, this means that is will probably take more than 16 seconds
  326.     to output 1 screen worth of data).
  327.  
  328.     5 - At this time, if the remote user sends too much data to DOSGATE
  329.     and the current program cannot keep up with the user, some data may
  330.     be lost.  There is output hardware handshaking (CTS).
  331.  
  332.  
  333.     Special notes for TNC users:
  334.  
  335.     There are various TNC parameters that are very important for
  336.     succesful use of DOSGATE.  DOSGATE is not very smart as far as the
  337.     TNC is concerned.  This is not an accident or an afterthought!
  338.     Since DOSGATE performs NO TNC COMMANDS then is should be compatible
  339.     with virtually ALL TNCs that have a few minor qualifications.
  340.  
  341.     The TNC MUST:
  342.  
  343.         1 - Have its RS-232 Data Carrier Detect (DCD, pin 8) go
  344.             true when a user connects, and go false when a
  345.             user disconnects.  This also means the your
  346.             RS-232 cable must include the DCD line.  Most
  347.             cables designed for a modem have all the nessary
  348.             lines (also important is the CTS and DSR line).
  349.  
  350.         2 - Be set to go into 'TRANSPARENT' mode when the user
  351.             connects, and return to 'command' mode when the
  352.             user disconnects.
  353.                 For Kantronix TNCs:
  354.                   NEWMODE ON
  355.                   CONMODE TRANS
  356.  
  357.             The following settings are also desirable:
  358.  
  359.                 AX25L2V2 ON
  360.                 CHECK 10 - Or some other value (not 0)
  361.                 PARITY 4
  362.                 8BITCONV ON
  363.                 CMDTIME 1
  364.                 COMMAND $03
  365.                 FLOW OFF
  366.                 MRPT ON
  367.                 NOMODE OFF
  368.                 NUCR 0
  369.                 NULF 0
  370.                 PACTIME 10
  371.                 RELINK OFF
  372.                 RING OFF
  373.                 SENDPAC $0D
  374.                 TRFLOW OFF
  375.                 TXFLOW OFF
  376.                 CSTAMP ON
  377.                 DAYTIME xxxxxxxxxxxx (set to correct time)
  378.  
  379.         3 - Be set to allow only ONE user to connect at a time.
  380.                 USERS 1    (note: KAM & KPC4 set 'USERS 0' to
  381.                                   be sure only one user at a
  382.                                   time can connect)
  383.  
  384.         4 - Issue a '*** CONNECTED to CALL xxx' message terminated with
  385.             a Carriage Return when the user first connects.  Where
  386.             CALL is the id of the user who connects and xxx can
  387.             be other information such as the date/time.  The syntax
  388.             of this message is crutial to the operation of the user
  389.             id logic of DOSGATE.  Every space and the case of the
  390.             characters (up to the CALL) is very important.  If
  391.             DOSGATE does not find this message when a user logs in
  392.             it will prompt the user to input his id.
  393.  
  394.  
  395.         5 - Be set for hardware handshaking.  At this time, DOSGATE
  396.             only supports hardware handshaking.  This does not mean
  397.             that DOS's XOFF handshaking will not work.
  398.  
  399.     DOSGATE hints:
  400.  
  401.         DOSGATE does not perform any machine protection. This means
  402.     that if a remote user decides to erase a file or format your hard disk
  403.     he WILL be able to do so!!! Unless you take steps to insure that he
  404.     is unable to perform these dasterdly deeds!  If you can trust ALL
  405.     remote users, then you need not be concerned with this.  Although(!),
  406.     if you are allowing the general public access to your machine, then
  407.     you may want to do the following:
  408.  
  409.         Create 'Hidden' directories which contain programs or data
  410.         that you don't want the casual user to stumble across.  Note:
  411.         this is not a foolproof method and most 'intelligent' DOS
  412.         users may be able to find the hidden directories.
  413.  
  414.         Set the Read Only attribute on any files that you don't want to
  415.         be easily erased and don't leave any programs on the system to
  416.         allow the remote user to change file attributes.
  417.  
  418.         Do NOT keep a copy of your format (or any similarly dangerous
  419.         software) ANYWHERE on your machine.
  420.  
  421.         Aquire a copy of CED (or other similar DOS extention) to
  422.         allow you to remove or rename internal DOS commands so that
  423.         the remote user cannot DELete files, set the PATH, or look
  424.         at environment variables.  I use CED and map commands that
  425.         I don't want the user to perform to a non existant command,
  426.         this way when the user types the command DEL *.*, instead
  427.         of the prompt "are you sure? ", he is greeted with the message
  428.         "Invalid command or file name"!  After trying a few destructive
  429.         commands, the user gives up, thinking that they have all been
  430.         removed!
  431.  
  432.         Keep only software that ok for remote users to gain access to
  433.         on the machine.  This way, if a user does destroy something,
  434.         it will not be anything important.
  435.  
  436.         You also may NOT want to leave any compilers around! This
  437.         will keep a *smart* user from connecting to your machine
  438.         and writing a simple program while online to destroy the
  439.         contents of your disks!!!
  440.  
  441.  
  442.     Notes:
  443.         MS-DOS is a trademark of Microsoft Corporation
  444.