README for Serbert
Serbert is a command line utility which performs a Bit Error Rate Test (BERT) on serial lines. It does this by transmitting bytes, and waiting for their uncorrupted return.
Serbert, however, does not provide a true Bit Error Rate Test (BERT), as it does not check the individual bits returned. It uses the operating systems standard serial interface, which provides the status of each returned byte.
HOME ON THE NET
The project is hosted by Sourceforge. You can find the latest release at http://serbert.sourceforge.net/. If you have any questions, or think you have found a bug, feel free to email me at <dwclarke@users.sourceforge.net>.
INSTALLATION
Instructions to install Serbert are given in the file INSTALL.
UPDATE
Updating the version should have no effect, as there are no updates available yet.
To see the current version number of Serbert, it is shown on the help:
>serbert -h
and on the diagnostics:
>serbert /dev/ttyS0 -d
USAGE
serbert can be used to check a serial line. By fitting a
loopback on one end of a serial link, and using serbert to
inject data into the other, a performance test can be made
on the line.
serbert, however, does not provide a true Bit Error Rate
Test (BERT), as it does not check the individual bits
returned. It uses the operating systems standard serial
interface, which provides the status of each returned
byte.
Each test will show when a communication error occurs - a
timeout or framing error - unless the quiet mode (-q) is
selected. At the end of the test the number of errors that
occurred will be shown.
To test, first you will need to fit a loopback on the line
you are testing. On RS232 lines, this will mean linking
the RX and TX lines together - pins 2 and 3. No control
lines need to be linked, unless any intermediate equipment
(line drivers, modems, etc.) require it.
The first time you use serbert try linking together the RX
and TX lines on your computer, just to check that serbert
is working correctly. I usually have a D9 and D25 with me,
which have pins 2 and 3 linked. Breakout boxes are also
useful for this.
You are now ready to try running serbert. The port to be
used must be given. It is the users responsibility to gain
permission to use the port.
On Linux, for instance, the following can be used:
serbert /dev/ttyS0
This will use the default options, so the 1024 bytes are
sent. The bytes sent are 00 to FF hex sent repeatedly. The
default baud rate is 19200, and bytes are sent 8 bits, no
parity, 1 stop bit.
If any communications errors occur, then a report will be
shown, giving the type of error, and the time it occurred.
The time a communications error occurred can be useful on
long term tests, to trace if errors occur at a particular
time of day, or with a certain regularity. If they do,
then this may then be associated with a piece of equipment
which is turned on by a timer, or is used at certain times
of day. In this way, equipment interfering with communi-
cations can be traced. It is the users responsibility to
check that the system time is correct.
As an alternative, while the test is running, intermediate
results can be displayed. The -i option will show these
intermediate results. The option requires a number, which
is how often to show the intermediate results, in seconds.
The error times will not be shown when the intermediate
results option is used. Alternatively, pressing the 'i'
key during the test will show the intermediate results.
The test can be run for a specified time, number of bytes
or continuously. If the test is to be run for a specified
time, then the -m option can be used to specify the number
of minutes, or the -o option for the number of hours. If a
particular number of bytes are to be sent, then the -n, -k
or -K options can be used. The -n option sends the number
of bytes given with the option. The -k and -K options send
the number of kilobytes given. The difference between the
two options is that for -k a kilobyte is 1000 bytes, and
for -K a kilobyte is 1024 bytes. A test can be performed
which does not automatically terminate, by using the -c
option. A test can be terminated at any time by pressing
'q'. If 'q' is pressed the current results will be shown.
If a different baud rate is required, then -b option can
be used to select an alternative one.
The bytes that are sent can be changed. A specific byte or
series of bytes can be sent using the -s option. -s is
followed by the string to send in hex e.g. -sAA55 alter-
nately sends the two bytes hex AA and 55. A pseudo-random
sequence of bytes can also be sent using the -r option.
While the test is running, if intermediate results (-i)
are not being used, any errors detected will be reported.
If this is not required, and only the final results are
needed, the quiet option, -q, can be used. If the test
cannot be run, due, for instance, to an incorrect parame-
ter, any resulting error message will not be suppressed.
When a byte is transmitted by serbert, it waits a certain
time for the byte to be returned. This timeout time, which
defaults to 10400mS, can be changed with the -t option.
This option requires a time in milliseconds. A longer
timeout time may be required if intermediate equipment
delays the passage of the byte.
There is a diagnostics mode, switched on by the -d option.
When this is used the current settings are displayed
before the test commences. Also, more detailed system
error messages (as opposed to communication error mes-
sages) are shown.
To view the bytes being sent and received, as well as the
communications errors, use the -v option, verbose mode.
This can be useful to check if a timeout is occurring,
where a byte is returning late, leading serbert to believe
a corrupt byte has been received. This type of error
should be fairly consistant, and, using the -v option,
easy to detect. If it is occurring, use the -t option to
increase the timeout. The -v option cannot be used with
the intermediate results option -i.
Help can be displayed by using the -h option, or by enter-
ing 'serbert' without any parameters. No test will be run
after help is displayed. There is also a man page for Serprot.
OPTIONS
PORT Serial port to use.
-b Baud rate to use: 50, 75, 110, 134, 150, 200, 300,
600, 1200, 1800, 2400, 4800, 9600, 19200, 38400,
57600, 115200.
-c Continuous mode. Test does not automatically termi-
nate.
-d Diagnostic mode. Show requested parameters and
detailed error messages.
-h Display help.
-i Display intermediate results every SECS seconds.
-k Number of bytes to send in k (* 1000).
-K Number of bytes to send in K (* 1024).
-m Number of minutes to send.
-n Number of bytes to send. Default is 1024.
-o Number of hours to send.
-q Quiet mode. Just display final results.
-r Send random bytes mode.
-s The string to send in hex e.g. -sAA55 alternately
sends the two bytes hex AA and 55. The default
string is 256 bytes: 00 to FF.
-t The read timeout to use in microseconds.
-v Verbose mode. Show all that happens.
