home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / MOUSE / CAMP10.ZIP / CAMP.DOC next >
Encoding:
Text File  |  1990-07-04  |  14.2 KB  |  386 lines

  1.                                                               CAMP.DOC  1
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                     - CAMP -
  13.  
  14.                                   version 1.0
  15.                              (John's Happy Camper)
  16.  
  17.                                    90-July-3
  18.  
  19.  
  20.              A program to capture and analyze 2-way communications
  21.  
  22.                       (C) Copyright 1990, D. John Repici
  23.                              All rights reserved.
  24.  
  25.                                 CIS: 73577,337
  26.                                  GE: J.REPICI
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. The author of this program will assume no liability for losses caused by its 
  42. use.  This responsibility rests solely with the end user.
  43.  
  44. CAMP is a copyrighted collection of program and documentation (the 
  45. "package") produced by D. John Repici.  The program and document may be 
  46. copied and distributed for personal use provided that all components of the 
  47. package remain together, and provided that the copyright notices are NOT 
  48. REMOVED.
  49.  
  50. CAMP or any part of CAMP may not be sold to produce income, or included as 
  51. a component in a product or service which is intended to be sold to produce 
  52. income, without permission from the author.  The author reserves the right to 
  53. withdraw any permission given. CAMP may not be distributed in any government 
  54. or military sponsored database or network, nor may any part of CAMP. 
  55.  
  56.   **A "Starving artist" donation of $15.00 will be gratefully accepted.
  57.  
  58. Send to:
  59.               John Repici; 120 Jefferson St.; Riverside, NJ 08075
  60.  
  61.                                                               CAMP.DOC  2
  62.  
  63.  
  64.  
  65.  
  66.  
  67. Camp is:
  68.  
  69. A program to allow your computer to monitor two-way RS-232 data transfers 
  70. between a host and a terminal, or between any two RS-232 ports.  You run it on 
  71. a computer connected between the two ports.  To the two devices it is connected 
  72. to, it looks like a straight cable.  It captures data and stores it in two 
  73. separate files, one for data going from the terminal to the host, and another 
  74. one for data going from the host to the terminal.  There is byte-for-byte 
  75. representation of the activity on the ports in these files. 
  76.  
  77. graphically:
  78.  
  79.                     com1                         com2
  80.                     |                            |
  81.    [ HOST ]<------->[ your computer running CAMP ]<-------->[ TERMINAL ]
  82.               |                                      |
  83.               |                                      |
  84.               |                                      |
  85.               RS-232                                 RS-232
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92. To run camp:
  93.  
  94. Properly connect your computer between the two devices to be monitored 
  95. (discussed later) and type CAMP at the DOS prompt.  You will get CAMP's opening 
  96. screen with the "top" menu.  There are two menus in CAMP, this top one and the 
  97. menu to change the com-port settings.  To select an item on these menus, use 
  98. the left and right arrow keys to move the pointer over the item and then hit 
  99. the <enter> key.  Next is a discussion of each item on both menus.
  100.  
  101.  
  102.                                                               CAMP.DOC  3
  103.  
  104. The Top Menu:
  105.  
  106.     Record:     Opens the files named with the "File" selection (discussed 
  107.                 bellow) and begins monitoring the ports.  If no file-name has 
  108.                 been specified, this selection will not be made.  When the 
  109.                 files are opened, they are not zeroed.  Any port activity 
  110.                 previously recorded to the file will remain, new activity will 
  111.                 be added on to the end of the file.
  112.  
  113.                     F10 = Stop "Record" mode and return to the top menu.
  114.                 This is the only active key during recording. Note that the Esc 
  115.                 key is reserved in the "Record" mode (future release).
  116.                 
  117.  
  118.     Playback:   Allows you to play the files back side by side.  Hitting the 
  119.                 down-arrow while in this mode will display the next 12 bytes of 
  120.                 the files being played.  Hitting the PgDn key will display the 
  121.                 next 36 bytes of the files.  The F1 key will toggle between hex 
  122.                 and ascii representations. Lastly, hitting the Esc key will 
  123.                 stop the playback and take you back to the top menu.  You can 
  124.                 not rewind (at this release).  In order to see the files again 
  125.                 you must hit Esc, to go back to the top menu and then choose 
  126.                 playback in order to view the files from the beginning. 
  127.  
  128.                     F1 = Hex/ascii              Esc = return to top menu
  129.  
  130.  
  131.     Com..       This will take you to the com-port menu, allowing you to change 
  132.                 the port settings and to make those setting permanent.  The 
  133.                 com-port menu is discussed bellow.
  134.  
  135.     Hex/ascii   This allows you to toggle between hex and ascii representations 
  136.                 of the information displayed in the windows.
  137.  
  138.     File        Lets you choose a file name to record in.  The filename must be 
  139.                 entered without an extension.  Two files with the extensions 
  140.                 .XX1 (for com1 input) and .XX2 (for com2 input) will 
  141.                 automatically be created.  If the file already exists they 
  142.                 will not be destroyed.  Any new data recorded into them will be 
  143.                 recorded at the END of the existing data.
  144.  
  145.     Buf         In order to maintain byte-for-byte synchronization between the 
  146.                 recorded input of the two ports a special "buffer" byte must be 
  147.                 added to take up space when one device is sending data and the 
  148.                 other device is not.  The byte used to pad the files can be 
  149.                 selected by you using this menu-selection.
  150.  
  151.     erase       As stated, a file that has already been recorded to will not be 
  152.                 recorded over.  All new data will be placed at the end of the 
  153.                 file.  If you want to start fresh with a filename that has 
  154.                 already been used you can "erase" it.  This selection will 
  155.                 erase the file specified with the "File" menu item.
  156.  
  157.     Esc         To exit the program, just hit the Escape key.  You will be 
  158.                 given your dos screen back.
  159.  
  160.  
  161.  
  162.                                                               CAMP.DOC  4
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169. The Com-port Menu:
  170.  
  171.  
  172.     Baud        Use to set the baud rate.  place the pointer over this 
  173.                 selection and hit enter repeatedly until the baud rate you 
  174.                 want appears.
  175.  
  176.     Datab       To select the number of data-bits (also called "word length") 
  177.                 you want.  Use the same way as the "Baud" selection.
  178.  
  179.     Par         To select the correct parity: Odd, Even, Mark, Space, or None 
  180.  
  181.     Stopb       To select how many stop bits.  If you select a word-length of 
  182.                 "5" this will automatically be set at "1.5".  The setting of 
  183.                 1.5 stop-bits is only permitted for 5-bit bytes.
  184.  
  185.     1-name      While displaying the files, it is convenient to not have to 
  186.                 keep reminding yourself which port is connected to which 
  187.                 device.  This allows you to enter a label (typically the name 
  188.                 of the device) for com1.
  189.  
  190.     2-name      Same as "1-name" but for com2.
  191.  
  192.     Altexe      Alter-executable.  This allows you to make CAMP.EXE come up 
  193.                 with the settings you have selected for: Baud, Datab, Par, 
  194.                 Stopb, 1-name, 2-name, and Buf (note that "Buf" can be changed 
  195.                 from the top-menu).  After selecting Altexe, the present 
  196.                 settings will be made part of CAMP.EXE.  Whenever you invoke 
  197.                 CAMP from the DOS prompt in the future, it will have those 
  198.                 settings.  CAMP.EXE must be in your current-working-directory, 
  199.                 for this option to work.  Only the copy of CAMP.EXE that is in 
  200.                 the current-working-directory will be updated.
  201.  
  202.     Esc         Hitting the Escape key will take you back to the top menu when 
  203.                 you are finnished making adjustments.  Also, if you select 
  204.                 "Altexe" it will automatically return you to the top when it 
  205.                 has completed changing the executable file.
  206.  
  207.  
  208.  
  209.                                                               CAMP.DOC  5
  210.  
  211.  
  212.  
  213.  
  214. Recording:
  215.  
  216.     To the disk file:   
  217.  
  218.                         All data saved to the disk files is synchronized byte-
  219.                         for-byte using the "Buf"fer byte.  This synchronization 
  220.                         occurs AT THE INTERRUPT routine.  The EXACT activity at 
  221.                         the ports is maintained in perfect fidelity.
  222.  
  223.  
  224.  
  225.  
  226.     video output during recording:
  227.  
  228.                         The data shown in the windows while CAMP is recording 
  229.                         should not be taken too seriously.  It is not 
  230.                         synchronized, and worse, the ring buffers that service 
  231.                         the video output during recording will "spill over" 
  232.                         (they will ignore, and therefor lose, incoming data) if 
  233.                         they become full.  This will NOT EFFECT THE RECORDED 
  234.                         DATA.  only what's going past the windows while in 
  235.                         "record" mode.  The video output for recording is only 
  236.                         there so you can see activity on the ports, and make 
  237.                         some determination of what's going on.
  238.  
  239.  
  240. Playback:
  241.  
  242.     Using CAMP:
  243.                         When you play the files back using CAMP, they are 
  244.                         displayed in perfect synchronization, side-by-side on 
  245.                         the two windows.  You can toggle between hex and ascii 
  246.                         representation while in the "Playback" mode by hitting 
  247.                         the F1-key. 
  248.  
  249.     Using other techniques:
  250.  
  251.                         For more convenient viewing (you can't move backwards 
  252.                         when viewing a file in CAMP) of either the com1 input 
  253.                         or the com2 input use a file viewing program such as 
  254.                         "List", or a binary editor.  The files are composed of 
  255.                         only the port data (and the Buffer bytes to synchronize 
  256.                         them).
  257.  
  258.  
  259.                                                               CAMP.DOC  6
  260.  
  261.  
  262.  
  263. RS-232 connections:
  264.  
  265.  
  266.  
  267. For asynchronous communication the usual configuration of an rs-232 port is as 
  268. a DTE or a DCE.  The problem comes from the fact that the rs-232 standard is 
  269. full duplex, meaning it sends data out one line, and receives data back in on a 
  270. different line.  A DTE port will send data out on line 2 and receives data in 
  271. from line 3.  A DCE port will send data out on line 3 and receive data in from 
  272. line two.  Note how this makes the two complimentary.  Your computer is 
  273. "almost" ALWAYS a DTE, while, a modem for example, is a DCE.  This makes 
  274. connecting a modem to a computer very easy.  The data output by the computer on 
  275. line two is received in by the modem on its line-two, while the data output by 
  276. the modem on line three is received in by the computer on the same line.  
  277. graphically: 
  278.  
  279.  
  280.      _____________________                       _____________________  
  281.     |                     |                     |               DCE   | 
  282.     | DTE                 |pin 2           pin 2|                     | 
  283.     |       data out ---> |-------------------->|--> data in          | 
  284.     |                     |                     |                     | 
  285.     |       data in <-----|<--------------------| <---data out        | 
  286.     |                     |pin 3           pin 3|                     | 
  287.     |                     |                     |                     | 
  288.     |_____________________|                     |_____________________| 
  289.  
  290.  
  291.  
  292.  
  293. The problem arises when you try to hook two DTEs or two DCEs together.  For 
  294. example, two DTEs (two computers for example).
  295.  
  296.  
  297.  
  298.      _____________________                       _____________________  
  299.     |                     |                     |               DTE   | 
  300.     | DTE                 |pin 2           pin 2|                     | 
  301.     |       data out ---> |---------------------| <--- data out       | 
  302.     |                     |                     |                     | 
  303.     |       data in <-----|---------------------|------> data in      | 
  304.     |                     |pin 3           pin 3|                     | 
  305.     |                     |                     |                     | 
  306.     |_____________________|                     |_____________________| 
  307.  
  308.  
  309.  
  310. Note that the data going OUT of one piece of equipment is going to the pin on 
  311. the other piece of equipment that is _itself_ sending data OUT.  Likewise with 
  312. the data in pins.  Here's where you need a "null modem", or "null cable" which 
  313. crosses the two lines so that two DCEs (or DTEs) can talk to each other.
  314.  
  315.  
  316.  
  317.                                                               CAMP.DOC  7
  318.  
  319.  
  320.  
  321. So we can make these assumptions:
  322.  
  323.  
  324.     ------------ = existing cable           =============== = added cable
  325.                                                                (not null)
  326.  
  327.                    +@ = added null modem adapter to camp
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                             (null)
  335.     dTe=========================+@CAMP--------------------------dTe
  336.  
  337.  
  338.  
  339.  
  340.  
  341.                 (null)
  342.     dTe---------------------------CAMP+@========================dTe
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.                                              (straight)
  352.     dTe=========================+@CAMP--------------------------dCe
  353.  
  354.  
  355.  
  356.  
  357.  
  358.                  (straight)
  359.     dTe-------------------------+@CAMP+@========================dCe
  360.  
  361.  
  362.  
  363.  
  364.  
  365. The worst case is DTE to DCE when you're on the DCE side.  Carry two null 
  366. adapters and a straight cable to cover all bases.  Better have a couple of 
  367. gender changers in the kit too. 
  368.  
  369.  
  370.  
  371.                                                               CAMP.DOC  8
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380. History:
  381.  
  382.  
  383.     Release     Date        Particulars
  384.  
  385.     1.0         7/3/90      First release.
  386.