Jan 012018
A program to allow your computer to monitor two-way RS-232 data transfers between a host and a terminal, or between any two RS-232 ports.
File CAMP10.ZIP from The Programmer’s Corner in
Category Communications
A program to allow your computer to monitor two-way RS-232 data transfers between a host and a terminal, or between any two RS-232 ports.
File Name File Size Zip Size Zip Type
CAMP.DOC 14572 4382 deflated
CAMP.EXE 20450 11730 deflated

Download File CAMP10.ZIP Here

Contents of the CAMP.DOC file


- CAMP -

version 1.0
(John's Happy Camper)


A program to capture and analyze 2-way communications

(C) Copyright 1990, D. John Repici
All rights reserved.

CIS: 73577,337

The author of this program will assume no liability for losses caused by its
use. This responsibility rests solely with the end user.

CAMP is a copyrighted collection of program and documentation (the
"package") produced by D. John Repici. The program and document may be
copied and distributed for personal use provided that all components of the
package remain together, and provided that the copyright notices are NOT

CAMP or any part of CAMP may not be sold to produce income, or included as
a component in a product or service which is intended to be sold to produce
income, without permission from the author. The author reserves the right to
withdraw any permission given. CAMP may not be distributed in any government
or military sponsored database or network, nor may any part of CAMP.

**A "Starving artist" donation of $15.00 will be gratefully accepted.

Send to:
John Repici; 120 Jefferson St.; Riverside, NJ 08075


Camp is:

A program to allow your computer to monitor two-way RS-232 data transfers
between a host and a terminal, or between any two RS-232 ports. You run it on
a computer connected between the two ports. To the two devices it is connected
to, it looks like a straight cable. It captures data and stores it in two
separate files, one for data going from the terminal to the host, and another
one for data going from the host to the terminal. There is byte-for-byte
representation of the activity on the ports in these files.


com1 com2
| |
[ HOST ]<------->[ your computer running CAMP ]<-------->[ TERMINAL ]
| |
| |
| |
RS-232 RS-232

To run camp:

Properly connect your computer between the two devices to be monitored
(discussed later) and type CAMP at the DOS prompt. You will get CAMP's opening
screen with the "top" menu. There are two menus in CAMP, this top one and the
menu to change the com-port settings. To select an item on these menus, use
the left and right arrow keys to move the pointer over the item and then hit
the key. Next is a discussion of each item on both menus.


The Top Menu:

Record: Opens the files named with the "File" selection (discussed
bellow) and begins monitoring the ports. If no file-name has
been specified, this selection will not be made. When the
files are opened, they are not zeroed. Any port activity
previously recorded to the file will remain, new activity will
be added on to the end of the file.

F10 = Stop "Record" mode and return to the top menu.
This is the only active key during recording. Note that the Esc
key is reserved in the "Record" mode (future release).

Playback: Allows you to play the files back side by side. Hitting the
down-arrow while in this mode will display the next 12 bytes of
the files being played. Hitting the PgDn key will display the
next 36 bytes of the files. The F1 key will toggle between hex
and ascii representations. Lastly, hitting the Esc key will
stop the playback and take you back to the top menu. You can
not rewind (at this release). In order to see the files again
you must hit Esc, to go back to the top menu and then choose
playback in order to view the files from the beginning.

F1 = Hex/ascii Esc = return to top menu

Com.. This will take you to the com-port menu, allowing you to change
the port settings and to make those setting permanent. The
com-port menu is discussed bellow.

Hex/ascii This allows you to toggle between hex and ascii representations
of the information displayed in the windows.

File Lets you choose a file name to record in. The filename must be
entered without an extension. Two files with the extensions
.XX1 (for com1 input) and .XX2 (for com2 input) will
automatically be created. If the file already exists they
will not be destroyed. Any new data recorded into them will be
recorded at the END of the existing data.

Buf In order to maintain byte-for-byte synchronization between the
recorded input of the two ports a special "buffer" byte must be
added to take up space when one device is sending data and the
other device is not. The byte used to pad the files can be
selected by you using this menu-selection.

erase As stated, a file that has already been recorded to will not be
recorded over. All new data will be placed at the end of the
file. If you want to start fresh with a filename that has
already been used you can "erase" it. This selection will
erase the file specified with the "File" menu item.

Esc To exit the program, just hit the Escape key. You will be
given your dos screen back.


The Com-port Menu:

Baud Use to set the baud rate. place the pointer over this
selection and hit enter repeatedly until the baud rate you
want appears.

Datab To select the number of data-bits (also called "word length")
you want. Use the same way as the "Baud" selection.

Par To select the correct parity: Odd, Even, Mark, Space, or None

Stopb To select how many stop bits. If you select a word-length of
"5" this will automatically be set at "1.5". The setting of
1.5 stop-bits is only permitted for 5-bit bytes.

1-name While displaying the files, it is convenient to not have to
keep reminding yourself which port is connected to which
device. This allows you to enter a label (typically the name
of the device) for com1.

2-name Same as "1-name" but for com2.

Altexe Alter-executable. This allows you to make CAMP.EXE come up
with the settings you have selected for: Baud, Datab, Par,
Stopb, 1-name, 2-name, and Buf (note that "Buf" can be changed
from the top-menu). After selecting Altexe, the present
settings will be made part of CAMP.EXE. Whenever you invoke
CAMP from the DOS prompt in the future, it will have those
settings. CAMP.EXE must be in your current-working-directory,
for this option to work. Only the copy of CAMP.EXE that is in
the current-working-directory will be updated.

Esc Hitting the Escape key will take you back to the top menu when
you are finnished making adjustments. Also, if you select
"Altexe" it will automatically return you to the top when it
has completed changing the executable file.



To the disk file:

All data saved to the disk files is synchronized byte-
for-byte using the "Buf"fer byte. This synchronization
occurs AT THE INTERRUPT routine. The EXACT activity at
the ports is maintained in perfect fidelity.

video output during recording:

The data shown in the windows while CAMP is recording
should not be taken too seriously. It is not
synchronized, and worse, the ring buffers that service
the video output during recording will "spill over"
(they will ignore, and therefor lose, incoming data) if
they become full. This will NOT EFFECT THE RECORDED
DATA. only what's going past the windows while in
"record" mode. The video output for recording is only
there so you can see activity on the ports, and make
some determination of what's going on.


Using CAMP:
When you play the files back using CAMP, they are
displayed in perfect synchronization, side-by-side on
the two windows. You can toggle between hex and ascii
representation while in the "Playback" mode by hitting
the F1-key.

Using other techniques:

For more convenient viewing (you can't move backwards
when viewing a file in CAMP) of either the com1 input
or the com2 input use a file viewing program such as
"List", or a binary editor. The files are composed of
only the port data (and the Buffer bytes to synchronize


RS-232 connections:

For asynchronous communication the usual configuration of an rs-232 port is as
a DTE or a DCE. The problem comes from the fact that the rs-232 standard is
full duplex, meaning it sends data out one line, and receives data back in on a
different line. A DTE port will send data out on line 2 and receives data in
from line 3. A DCE port will send data out on line 3 and receive data in from
line two. Note how this makes the two complimentary. Your computer is
"almost" ALWAYS a DTE, while, a modem for example, is a DCE. This makes
connecting a modem to a computer very easy. The data output by the computer on
line two is received in by the modem on its line-two, while the data output by
the modem on line three is received in by the computer on the same line.

_____________________ _____________________
| | | DCE |
| DTE |pin 2 pin 2| |
| data out ---> |-------------------->|--> data in |
| | | |
| data in <-----|<--------------------| <---data out |
| |pin 3 pin 3| |
| | | |
|_____________________| |_____________________|

The problem arises when you try to hook two DTEs or two DCEs together. For
example, two DTEs (two computers for example).

_____________________ _____________________
| | | DTE |
| DTE |pin 2 pin 2| |
| data out ---> |---------------------| <--- data out |
| | | |
| data in <-----|---------------------|------> data in |
| |pin 3 pin 3| |
| | | |
|_____________________| |_____________________|

Note that the data going OUT of one piece of equipment is going to the pin on
the other piece of equipment that is _itself_ sending data OUT. Likewise with
the data in pins. Here's where you need a "null modem", or "null cable" which
crosses the two lines so that two DCEs (or DTEs) can talk to each other.


So we can make these assumptions:

------------ = existing cable =============== = added cable
(not null)

[email protected] = added null modem adapter to camp

[email protected]

[email protected]========================dTe

[email protected]

[email protected][email protected]========================dCe

The worst case is DTE to DCE when you're on the DCE side. Carry two null
adapters and a straight cable to cover all bases. Better have a couple of
gender changers in the kit too.



Release Date Particulars

1.0 7/3/90 First release.

 January 1, 2018  Add comments

Leave a Reply