The syncloop command performs several loopback tests that are useful in exercising the various components of a serial communications link.
Before running a test, syncloop opens the designated port and configures it according to command line options and the specified test type. It announces the names of the devices
being used to control the hardware channel, the channel number (ppa) corresponding to the device argument, and the parameters it has set for that channel. It then runs the loopback
test in three phases.
The first phase is to listen on the port for any activity. If no activity is seen for at least four seconds, syncloop proceeds to the next phase. Otherwise, the user is informed
that the line is active and that the test cannot proceed, and the program exits.
In the second phase, called the "first-packet" phase, syncloop attempts to send and receive one packet. The program will wait for up to four seconds for the returned packet. If
no packets are seen after five attempts, the test fails with an excoriating message. If a packet is returned, the result is compared with the original. If the length and content do not match exactly, the
test fails.
The final phase, known as the "multiple-packet" phase, attempts to send many packets through the loop. Because the program has verified the integrity of the link in the first-packet phase, the test
will not fail after a particular number of timeouts. If a packet is not seen after four seconds, a message is displayed. Otherwise, a count of the number of packets received is updated on the display once
per second. If it becomes obvious that the test is not receiving packets during this phase, the user may wish to stop the program manually. The number and size of the packets sent during this phase is determined
by default values, or by command line options. Each returned packet is compared with its original for length and content. If a mismatch is detected, the test fails. The test completes when the required
number of packets have been sent, regardless of errors.
After the multiple-packet phase has completed, the program displays a summary of the hardware event statistics for the channel that was tested. The display takes the following form:
|
CRC errors Aborts Overruns Underruns In<-Drops-> Out
0 0 0 0 0 0
|
This is followed by an estimated line speed, which is an approximation of the bit rate of the line, based on the number of bytes sent and the actual time that it took to send them.
|