home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1 / HamRadio.cdr / packet / ezp140 / ezp.txt < prev    next >
Text File  |  1986-10-30  |  23KB  |  458 lines

  1.  
  2.  
  3.  
  4.                   E Z PACKET
  5.  
  6.         A simple and easy packet radio program
  7.                For the IBM PCs
  8.                 Version 1.40
  9.  
  10.               Copyright by AA4L
  11.  
  12.     E Z Packet is a simple terminal program for IBM PCs and TAPR style
  13.     TNCs.  It is intended for packet radio use in the Amateur Radio Service
  14.     only.  The program may be freely copied and distributed for this
  15.     purpose.  Use for any commercial purpose, or sale of this program or
  16.     any of the parts thereof is prohibited.
  17.  
  18.     The program will be of principal interest to beginners in packet radio.
  19.     It does not have any advanced features. However, it is easy to learn
  20.     and simple to use. Furthermore, it is reasonably compact, and should
  21.     execute in small systems.
  22.  
  23.     Many thanks to Ed Stephenson, AB4S, for his beta testing, help and
  24.     encouragement.
  25.  
  26.  
  27.              GETTING READY TO USE E Z PACKET
  28.  
  29.     To use E Z Packet, your TNC should be set up with the following
  30.     terminal to TNC communication paramaters:  1200 baud, 8 data bits, 1
  31.     stop bit, no parity.  This is the best setup for all around use for
  32.     most TNCs.    E Z Packet normally expects the TNC to be connected to COM
  33.     port COM1:.If you intend to use the file transfer features of E Z
  34.     Packet, you should configure your TNC to use HARDWARE FLOW CONTROL.
  35.     For the TNC 2 the commands are XFLOW OFF, STA 00, STO 00.  Read your
  36.     TNC manual or ask for help.
  37.  
  38.             RUNNING E Z PACKET
  39.  
  40.     To start E Z Packet, boot your system with DOS 2.0 or later, load the
  41.     program disk in your active drive, and type "EZP <enter>".  After you
  42.     get rid of the hello screen, you will see a split screen display.
  43.     Characters entered from the keyboard are displayed in the lower screen,
  44.     and characters received from the TNC are displayed in the upper screen.
  45.     The characters you type in the lower screen are NOT sent to the TNC
  46.     until you strike the <enter> or carriage return key (or until you enter
  47.     255 characters without a carriage return).    If you make a typing
  48.     mistake, and the cursor is still on the same line, you can use the
  49.     BACKSPACE key to back up and overwrite the error.  None of the other
  50.     DOS editing keys are functional.  If you see the data you just
  51.     transmitted from the lower screen appearing in the upper screen, your
  52.     TNC is echoing, and you will probably want to turn the echo feature
  53.     off.  (ECHO OFF in the TNC2.)
  54.  
  55.     You are now ready to have keyboard QSO's with your packet buddies. Have
  56.     fun!
  57.  
  58.           USING DIFFERENT COMMUNICATION PARAMETERS
  59.  
  60.     If you wish to change the communication parameters, you can enter the
  61.     changes on the DOS command line (when you start EZP) as follows:
  62.  
  63.     COMMAND LINE        RESULT
  64.     ------------        ------
  65.     EZP              com1,   1200 baud, N, 8, 1
  66.     EZP 2             com2,   1200 baud, N, 8, 1
  67.     EZP n 3  (n = 1 or 2)    com(n),  300 baud, E, 7, 1
  68.     EZP n 24             com(n), 2400 baud, N, 8, 1
  69.     EZP n 48             com(n), 4800 baud, N, 8, 1
  70.  
  71.     The 300 baud option is provided for the purpose of initializing a TNC
  72.     from a "cold start". (Hardware and software reset.)
  73.  
  74.  
  75.               FUNCTION KEYS
  76.  
  77.     Each of the forty function keys (1-10, shift 1-10, control 1-10 , and
  78.     alt 1-10) can be programmed for your customized use.  This is done
  79.     through the use of the auxiliary program EZPKEYS.COM, which creates
  80.     and/or modifies a diskfile FKEY.PRM which is read by E Z Packet.  (E Z
  81.     Packet expects to find FKEY.PRM on the active or default disk drive and
  82.     in the active directory.  If you keep it on the same diskette with
  83.     EZP.COM you should not have any problems.  If E Z Packet cannot find
  84.     FKEY.PRM it proceeds without incident, and no function keys are set
  85.     up.) You must exit E Z Packet to use EZPKEYS.COM.  Each function key
  86.     can be programmed with a string of up to 80 characters.  Control keys
  87.     may be inserted in the string using the convention "^X".  For instance,
  88.     if you want a carriage return at the end of your string, end the string
  89.     with ^M.  When E Z Packet is running, striking a function key will
  90.     cause the string you have programmed to be entered into the lower
  91.     window and sent to the TNC just as if you had typed it.  Hence, the
  92.     function keys are very useful for commonly used phrases and commands.
  93.     Examples:  "^C c k4iww-1 v ab4s,ai0k,wa4lpd-1 ^M" or "73 from Bob AA4L
  94.     in Bay Leaf USA".  EZPKEYS.COM has an option to list the function key
  95.     contents to your printer, in case you have any problems remembering
  96.     what you did.  CAUTION:  Don't try to use a text editor to create
  97.     fkey.prm.  It is not a text file.
  98.  
  99.     EZP expects a carriage return at the end of a line, and only at the end
  100.     of a line.    EZP truncates the function key string at the first ^M it
  101.     sees.  Since everything after a ^M is ignored, the remainder of the
  102.     allowable 80 characters can be used for a comment which will appear
  103.     only in the printed listing.  If you want to enter multiple TNC
  104.     commands from a single function key, you can use a "psuedo carriage
  105.     return" which the program ignores but the TNC recognizes.  The ascii
  106.     character <141> is a "psuedo c/r", and ^<205> will also work.  Enter
  107.     the "psuedo c/r" into the fkey string by holding down the alt key and
  108.     keying 1,4,1 in THE NUMBER PAD AT THE RIGHT OF THE KEYBOARD.  Example:
  109.  
  110.     ^C MH<141>CONV^M (displays "calls heard" & returns to converse  mode)
  111.  
  112.     Note that <141> represents the ascii character <141>, which prints on
  113.     the screen as an <i> with a funny dot.  If I were to include the
  114.     actual character in this text, it might screw up your printer. DO NOT
  115.     try to enter "<141>" in the fkey string. Use alt 1,4,1 as described.
  116.     The parentheses above enclose a comment. The parens are for aesthetics
  117.     only, and have no meaning to the program. They are NOT required.
  118.  
  119.     If your fkey string does NOT end with a ^M, and you wish to use the
  120.     comment feature, you can use the <|> character as a delimiter. EZP will
  121.     truncate the fkey string starting with the <|> character. You can also
  122.     use this to force trailing blanks. ( <|> is ascii <124> and may be
  123.     directly entered from the keyboard.) Example:
  124.  
  125.     73 es CUL | (becomes part of current line with one trailing blank)
  126.  
  127.                EZP COMMAND SUMMARY
  128.  
  129.     All E Z Packet commands are entered via an alpha key in conjunction
  130.     with the alt key.  Example:  Alt-Q exits the program.  E Z Packet will
  131.     display a list of the command keys at any time in response to the
  132.     <home> key.
  133.  
  134.     COMMAND        FUNCTION
  135.     -------        --------
  136.     alt-B        Toggles the BELL on or off. (Normally off). This
  137.             prevents a received control-g character from
  138.             beeping at you. It defeats the ding-dongs who are
  139.             afraid nobody will notice them. Instead of a bell,
  140.             a "+" character is printed. A "connect alarm" is
  141.             provided which sounds a distinctive tone whenever
  142.             the "connected to" message appears on the screen.
  143.             The alt-B command has no effect on the connect
  144.             alarm.
  145.  
  146.     alt-C        Toggles the CAPTURE function on and off. When
  147.             CAPTURE is on, everyhing received from the TNC is
  148.             written to the capture file. CAPTURE is useful for
  149.             receiving ASCII text files, and for creating a
  150.             hard copy of channel activity.
  151.  
  152.     alt-D        Displays a diskette directory for disk a:, b: or
  153.             c:. Only the root directory is displayed. Also
  154.             displays the remaining space on the disk.
  155.  
  156.     alt-K        Receive a file (ASCII or binary) using the
  157.             XPACKET protocol. (See below.)
  158.  
  159.     alt-L        Locks the screen. When the screen is locked, you
  160.             can review the last seven "pages" received with the
  161.             PgUp & PgDn keys. The screen remains locked until
  162.             you strike alt-L again. Alt-L redisplays the
  163.             latest screen before unlocking.
  164.  
  165.     alt-N        Allows you to name the capture file. You will be
  166.             prompted for a filename. Enter the desired drive
  167.             designator  with the filename. Example: b:dnld.fil.
  168.             If the file you name does not exist, it will be
  169.             created. If the file does exist, newly received
  170.             data will be appended to it. CAPTURE does not
  171.             overwrite old data. The default name is
  172.             "capture.txt"  on the default drive.
  173.  
  174.     alt-P        Toggles the PRINTER on and off. When PRINTER is on,
  175.             everything received from the TNC is listed on the
  176.             printer.   This is useful for copying messages from
  177.             bulletin boards.  Continuous use of the printer may
  178.             interfere with the ability of EZP to keep up with
  179.             the received data from the TNC.
  180.  
  181.     alt-Q        Exit from EZP and return to DOS.
  182.  
  183.     alt-R        Receives (downloads) a file using the XMODEM
  184.             protocol. Prompts you for the required information.
  185.             See the XMODEM section.
  186.  
  187.     alt-S         Sends a file (ASCII or binary) using the XPACKET
  188.             protocol. (See below.)
  189.  
  190.     alt-T        Transmits an ASCII Text file. ASCII Text files are
  191.             "plain language" files like this one. Each line
  192.             must be terminated with a carriage-return / line-
  193.             feed sequence, and no line should be longer than
  194.             255 characters. You will receive prompts that tell
  195.             you what to do.
  196.  
  197.     alt-X        Transmits a file using XMODEM protocol. See the
  198.             XMODEM section. Prompts are provided.
  199.  
  200.     <end> key        If for, for any reason, your TNC gets into TRANS-
  201.             PARENT mode, the only way to return to COMMAND
  202.             mode is to wait one CMDTIME (usually one second),
  203.             send three control-C's,and wait another  CMDTIME.
  204.             No other characters may be sent during the whole
  205.             period. Since everything sent from the lower screen
  206.             is followed by a carriage return, you cannot send
  207.             this sequence in the "normal" manner. The <end> key
  208.             sends three control-C's without c/r's.
  209.  
  210.     CAUTION:  The PCJR architecture does not not permit reliable data
  211.     transfers between disk files and communications ports.  If you are
  212.     using a PCJR, you should install a virtual or RAM disk, and all will
  213.     then be well. This applies to XMODEM as well as ASCII file transfers.
  214.  
  215.     NOTE: In order to maintain the simplest possible user interface, I
  216.     chose not to support multi-level directories and PATHnames in EZP. All
  217.     files are expected to be in, and will be written to, root directories.
  218.  
  219.  
  220.           THE XMODEM FILE TRANSFER PROTOCOL
  221.  
  222.     ***NOTE***
  223.     To use the XMODEM (and XPACKET) features of E Z Packet, you must have a
  224.     TNC-1 (non WA8DED version), or TNC-2, or equivalent.  The TNC should be
  225.     set such that CMDTIME is equal to one second, and the command control
  226.     character is hex 03 (control-C).  These are the default values.
  227.     **********
  228.  
  229.     EZP contains facility for transfer of binary files using the
  230.     XMODEM protocol.  It will work with TNC-2s and TNC-1s.  It will NOT
  231.     work with The TNC-1/WA8DED.  Binary files are non-text files, such as
  232.     program files.  They frequently have filename extensions such as
  233.     ".com", ".exe", or ".bin".  XMODEM is included because the WDCG BBS
  234.     system operated by K4IWW-1 uses it, and because it is widely available
  235.     in terminal programs designed for use with telephone line modems.
  236.     There are several file transfers protocols which are much better suited
  237.     to use with packet radio, but there is little standardization, and the
  238.     net result is that both parties must run the same program to use them.
  239.     XMODEM ain't much, but at least it's fairly "standard".
  240.  
  241.     XMODEM transfers data in blocks of 128 bytes. The receiving system is
  242.     expected to verify each block and respond with an accept or reject
  243.     message (ack or nak). This checking is highly reduntant to the checking
  244.     performed by the TNC, and the XMODEM block lengths are not synchronized
  245.     with the TNC packet lengths. Therefore, the file transfer tends to be
  246.     rather slow.
  247.  
  248.     XMODEM was designed for use with full-duplex telephone line modems.
  249.     Most versions of XMODEM incorporate a timing feature. Responses are
  250.     expected from the other end within a certain period of time.
  251.     Response times will be much longer in a half duplex packet radio system
  252.     than in a full duplex telephone system. This situation gets worse if
  253.     there is channel congestion or if digipeaters are used. The net result
  254.     is that not all terminal program XMODEM versions will work on packet
  255.     radio. Some terminal programs offer multiple XMODEM versions. In this
  256.     case, the one with the longer timeouts is usually known as "relaxed
  257.     XMODEM". The "relaxed" version is the one to use. In any case,
  258.     XMODEM probably should not be used on a packet radio path which
  259.     incorporates more than one digipeater.
  260.  
  261.     The XMODEM version in E Z Packet incorporates abnormally long timeouts,
  262.     and should work better on packet radio than the versions supplied in
  263.     most telephomne modem terminal programs. However, if the other station
  264.     is using a version with shorter timeouts, E Z Packet can't fix it.
  265.  
  266.     ***NOTE***
  267.     The BBS may admonish you to be sure that your TNC is in transparent
  268.     mode when performing XMODEM transfers. Don't worry about it. E Z Packet
  269.     manages the transparent mode entry and exit for you. Just answer the
  270.     BBS prompts to tell the BBS that you want to do an XMODEM upload or
  271.     download. AFTER the BBS tells you that it is ready to receive or send
  272.     the file, strike <alt-R> or <alt-X> and do what E Z Packet tells you
  273.     to do. You do NOT have to use the same filenames as the BBS. Examples:
  274.     you can download "whereis.com" to your file "c:findit.com" and you can
  275.     upload your file "b:smart.bas" to the BBS as "stupid.bas".
  276.     **********
  277.  
  278.     ASCII Text Files may be transfered using the XMODEM protocol.  However,
  279.     there is no real reason to use XMODEM for this purpose on packet radio.
  280.     As mentioned above, the packet protocol contains enough error checking
  281.     procedures to make the error checking procedures of XMODEM totally
  282.     unnecessary.  The ASCII transfer procedure is very much faster.
  283.  
  284.                XPACKET FILE TRANSFERS
  285.  
  286.     The XPACKET packet radio file transfer protocol was developed by Carl
  287.     Moreschi, N4PY.  It was first made available in his program PTP.  I know
  288.     of no program which supports XPACKET, other than PTP and EZP.
  289.     XPACKET is the protocol of choice for transfer of any type of file
  290.     between two stations which are using either PTP or EZP.  It is much
  291.     faster and reliable than XMODEM, and the self-synchronizing features
  292.     eliminate the need for checking and editing which a straight ASCII
  293.     transfer sometimes requires. To use XPACKET, the sending and receiving
  294.     stations should strike alt-s and alt-k, respectively, at about the same
  295.     time. Then just follow the prompts. Note that the file name is NOT
  296.     entered by the receiving station, but is sent from the originating
  297.     station. The receiving operator will be prompted to enter the
  298.     designator for the disk drive to which he wishes to receive the file.
  299.  
  300.  
  301.                   TECHNICAL NOTES
  302.                   (For Hackers)
  303.  
  304.     E Z Packet is written in Version 3.01a Turbo Pascal. The principal
  305.     reasons for writing it were to learn the language, and to provide a
  306.     vehicle for developing terminal software which supports the WA8DED TNC1
  307.     software. That piece of it ain't done yet. However, as is, it may be a
  308.     useful program for beginners for the reasons stated above.
  309.  
  310.     I want to keep it simple and avoid bells and whistles to keep from
  311.     scaring off beginners.
  312.  
  313.     Turbo Pascal does not have native support for interrupt driven
  314.     communications, so the communications routines in E Z Packet are
  315.     homebrewed, and are written in in-line machine code and Pascal.  There
  316.     are no assembly langauge routines, per se.
  317.  
  318.     The receive interrupt driver uses a 4095 character (or byte) buffer. If
  319.     the free buffer space gets down to 200 bytes, DTR and RTS are dropped.
  320.     If this does not discourage the TNC, reception continues. When the
  321.     buffer is completely filled, the last buffer position is repeatedly
  322.     overwritten. There are no alarm indications, and the situation is
  323.     self-healing, except for the data loss. This situation will not occur
  324.     in normal use, but it can occur if you use the screen for something
  325.     else (such as the directory function) for long periods of time.
  326.  
  327.     The transmit side is not interrupt driven or buffered. Output is
  328.     directly to the com port. The buffered interrupt driven transmit
  329.     routine was written and debugged, but there did not seem to be any
  330.     practical benefit in using it in such a simple program. The program
  331.     waits for the UART Transmit holding register to empty before passing
  332.     the next character. The program also waits for RTS and DSR to be active
  333.     for each character. If appropriate, it will wait FOREVER. (If this
  334.     occurs during a file transfer, you can escape by keying the abort
  335.     character.)
  336.  
  337.     E Z Packet strips line feed characters from incoming text.    Carriage
  338.     returns cause the program to write an (editor compatible) cr/lf
  339.     sequence to the screen and capture file.  E Z Packet uses a cr with NO
  340.     lf end-of-line sequence for transmitted text.  I believe this is
  341.     compatible with most terminal and BBS software, and lf characters can
  342.     be inserted by TNCs if needed. When transferring ASCII text files, an
  343.     eof character (hex 1A) in the data stream will bring things to a
  344.     screeching halt.
  345.  
  346.     While in "keyboard QSO" mode, E Z Packet's priorities are:  (1) Send
  347.     data to TNC; (2) Read and print data from TNC, (3) Manage keyboard.
  348.     Therefore, in extreme cases, the keyboard could be locked out for up to
  349.     a couple of seconds, or possibly more if the printer feature is in use.
  350.     This is no problem for the average hunt and peck packeteer, but a
  351.     competent touch typist could certainly overrun the 15 character DOS
  352.     keyboard buffer.  There are many public domain and licensed resident
  353.     DOS extension programs which expand the DOS keyboard buffer to 128 or
  354.     256 bytes.    If you have a problem, the use of one of these programs
  355.     will fix it.  Operating at 4800 baud may help, as it will allow EZP to
  356.     get rid of outbound traffic quicker.
  357.  
  358.     There is a quirk in the Borland Turbo libraries for extended scan code
  359.     keyboard entries. The net result is that under some conditions, an
  360.     <esc> ($1B) character entered from the keyboard can be decoded, in
  361.     combination with the following character in the keyboard buffer, as a
  362.     function key or other "special" key entry. Hence, EZP might appear to
  363.     lose a couple of characters, or think that you have issued it a
  364.     command. This will NOT happen at "normal" keying speeds, and can be
  365.     avoided by waiting for the escape (left arrow) symbol to appear on the
  366.     screen before typing the next character. I wouldn't even bother to
  367.     mention it, except that the WA8DED TNC requires that each command be
  368.     preceeded by an escape character. Should this be a problem in your
  369.     particular application, you can work around it by assigning the escape
  370.     character to one of your function keys. (Use ^[ to load the function
  371.     key.) Use the function key instead of the <esc> key to send an escape
  372.     character, and the problem (if there is a problem) will go away.
  373.  
  374.     EZP ans EZPKEYS use the TURBO Read() and Readln() functions to ask the
  375.     operator for keyboard data, such as file names and the fkey strings.
  376.     These functions are similar to the BASIC INPUT function, however, the
  377.     editing conventions available to the operator are strange and
  378.     wonderful. The editing commands are summarized herewith:
  379.  
  380.     Esc or ctl-X  : Erases the whole line
  381.     ctl - r      : Restores the line erased by Esc
  382.     ctl - d      : Restores one character from the line erased by Esc
  383.     Backspace      : Normal (cursor left and rubout)
  384.  
  385.     In TURBO, the "special" keys (fkeys, cursor arrows, del, ins, etc.)
  386.     send a two-byte sequence starting with an esc character. Hence,
  387.     attempting to use these keys to edit input will give unexpected
  388.     results. Backspace and ctl-R will recover your data.
  389.  
  390.     The above does NOT apply to data keyed into the lower screen keyboard
  391.     buffer for transmission.
  392.  
  393.     TURBO does not make it very easy to intercept I/O errors. I have done
  394.     the best I can with the standard TURBO tools, plus a few of my own, but
  395.     there are many errors, such as "disk not ready" that will show you a
  396.     DOS or TURBO error message. I plan to tinker with this some more in the
  397.     future. Meanwhile, the program, as is, is reasonably crash-proof.
  398.  
  399.     If you have a need for the Pascal source code, I am open to discussion.
  400.  
  401.                PACKET OPERATING PROCEDURES
  402.  
  403.     There are exceptions to every rule, and some forms of errant behaviour
  404.     not acceptable in prime operating hours may be tolerated at 4:00am.
  405.     However, adherence to the following rules of conduct will make life
  406.     much more pleasant for us all:
  407.  
  408.     NEVER BEACON.
  409.  
  410.     NEVER, NEVER, NEVER, EVER BEACON THROUGH A DIGIPEATER.
  411.  
  412.     NEVER SEND "BELLS".
  413.  
  414.     If your TNC has a CWID feature, never use it. Better still, drive a
  415.     stake through its heart. CWID is not required by FCC, and it is very
  416.     impolite.
  417.  
  418.     Never try to work a DX mailbox except during off hours.  Retries can
  419.     tie up not only the BBS but the entire channel within hearing of the
  420.     digipeaters involved.  SysOps have a secret blacklisting society, and
  421.     most mailboxes can be programmed to lock out selected callsigns.  Stay
  422.     on their good side!
  423.  
  424.     When you establish a "direct" connection, and you settle down for a
  425.     long keyboard chat, QSY to .03, .05, .07, or .09.
  426.  
  427.     Always QSY from .01 for station to station file transfers.
  428.  
  429.     Pay strict attention to the adjustment of your equipment. A properly
  430.     adjusted TNC can decode darn near anything that even twitches the
  431.     S-meter. Yet, every night, my screen fills up with retry after retry
  432.     from stations that are delivering S9 signals to each other. The problem
  433.     is simply bad audio. Receive audio level to the TNC, and transmitter
  434.     deviation level, are very critical. If you lack equipment and
  435.     expertise, ask for help. Also pay strict attention to the optimum
  436.     settings of the delay parameters in your TNC. If you clean up your
  437.     signal you will have have more enjoyable contacts, more people will be
  438.     willing to connect to you, and you will substantially reduce the
  439.     congestion on .01. Your instruction book probably says that your TNC
  440.     will work with "most" transceivers without further adjustment. It
  441.     really means it might work with somebody else's rig.
  442.  
  443.                AUTHOR'S NOTE
  444.  
  445.     I hope you enjoy using EZP. Bug reports and suggestion for improvement
  446.     are welcome. I have no way of debugging on non-IBM equipment, so if you
  447.     have problems on an IBM "compatible", you have my sympathy and nothing
  448.     else.
  449.  
  450.     73
  451.  
  452.     Bob Johnson AA4L
  453.     11305 Rums Hill
  454.     Raleigh NC 27614
  455.     919 847 5606
  456.     (Bob from Bay Leaf USA)  
  457.  
  458.