|C H A P T E R 52|
Serial Ports Test (serialtest)
The serialtest checks the system on-board serial ports (su[0,1], zs[0,1], zsh[0,1], se[0,1], se_hdlc[0,1], asy[0,1]), and any multiterminal interface (ALM2) boards (mcp[0-3]). Data is written and read in asynchronous and synchronous modes using various loopback paths.
Intervention mode must be enabled to run this test. This test is nonscalable.
The loopback test requires null modem and plug connectors, which are described in Appendix A.
There are a variety of loopback paths available. The internal loopback paths do not require an external connector. Their availability depends on the device. The zs(7D) device has an internal path for synchronous mode and the se(7D) device has an internal path for asynchronous mode. The exact type of loopback connector required depends on the system I/O panel.
The loopback for the Null Modem Ato B option is a female-to-female plug. Its pin configuration is the same as the one described for the section 9-Pin to 9-Pin Port-to-Port Loopback Cable.
The loopback for the Plug A to A option is described in the section 9-Pin Female Single-Port Loopback Plug.
If you have zs(7D) serial ports on your machine, the synchronous devices might not exist. Look in the /dev directory for zsh (where h=0 and/or 1). If they do not exist, use the following procedure to create them.
1. Enter the add_drv zsh command.
2. Enter the devfsadm command. Go to the /dev directory to check if the device nodes for zsh have been created.
3. If these steps do not work, enter the rem_drv zsh command and then repeat Steps 1 and 2.
This mode uses the asynchronous communication protocol as described in the zs(7D)and se(7D) man pages. The termio(7I) interface is used for configuring port characteristics.
You can select the loopback paths to use, the amount of data to transfer, and the baud rate to be used for the transfer.
The test writes and reads data through the loopback path and compares the data to the original data. The test first sends a single character. If no errors or timeouts are detected, the rest of the data is simultaneously written and read, then compared for data integrity.
This mode uses the synchronous hdlc-framing interface as described in the zsh(7D) and se_hdlc(7D) man pages. Data is written and read in checksum-protected packets.
The user can select the loopback paths to use and the clock rate.
The synchronous test runs in three phases:
1. The first phase looks for activity on the port. If no activity is detected for at least four seconds, the test proceeds to the next phase. If activity is detected, serialtest exits with an error.
2. The second phase attempts to send and receive one packet. If no packets are detected after five attempts, the test exits with an error. If a packet is returned, the result is compared to the original. If the length and content of the packets do not match exactly, the test exits with an error.
3. The third phase attempts to send many packets through the loop. Some packet drops are to be expected especially on a heavily loaded system. The test allows a percentage of the packets to be dropped. The user can set the drop tolerance between 0 percent and 99 percent.
The default is 20 percent. If the system is extremely busy, the drop tolerance should be increased. Each packet is compared with its original for length and content. If a mismatch is detected, the test exits with an error.
This mode of testing is not available for devices connected to the super I/O port. It is, however, available for all other supported I/O ports.
To reach the following dialog box, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system might not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.
Modem_a_to_b is an external loopback cable with a modem attached to generate synchronous Transmit and Receive clocks in synchronous mode. The modem a_to_b external loopback type is intended for Sun internal use only. It requires custom equipment that is not available. (Supported only for SP devices.)
Selects the baud rate for Asynchronous mode testing. The valid rates are 110, 300, 600, 1200, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 153600, 230400, 307200, 460800, and ALL. The default rate is 9600 baud. Some platforms can only support up to 38400 or 76800. If the device is connected to the super I/O port then the max baud rate supported is 115200. The test will return an error if you try to use a higher baud rate than is supported. For baud rates greater than 153600, the serial line drivers must be set for RS-423 mode and not RS-232 mode. The RS-423 and RS-232 modes are usually selected by a hardware jumper on the motherboard.
Selects the type of flow control to use in Asynchronous mode testing. You can select Hardware (RTS/CTS), Software (XON/XOFF) or None. The default depends on the loopback type. Software flow control is not allowed on a, b, a_b, or a_b_concurrent loopback types.
Selects the device generated clock rate for Synchronous mode testing. The valid rates are from 110 to 230400. The rate does not have to be a specific value as required for async mode baud rates. The default rate is 9600. Some platforms can only support up to 38400 or 76800. The test will return an error if you try to use a higher rate than is supported. For rates greater than 100000, the serial line drivers must be set for RS-423 mode and not RS-232 mode. The RS-423 and RS-232 modes are usually selected by a hardware jumper on the motherboard.
Selects the tolerance level of Synchronous mode dropped packets during the many_packets subtest. The default is Drop 20 percent. The valid range is from 0 percent to 99 percent. Some packet drops are expected especially at higher Toleranceclock rates and on a heavily loaded system.
Selects the number of seconds in additional time to wait for a Synchronous mode packet to be sent. Additional time may be needed when there is heavy system activity and time-outs are being detected. In general, the user can decrease the value to 0 when the system load is light or increase the value when there is a heavy system load.
Attempts to open the port to determine if the device is connected. If the port does not open and if the port is not busy, the test exits with an error. If it is successful or fails with a busy or exclusive use error, then the port is considered connected, and the test passes.
/opt/SUNWvts/bin/sparcv9/serialtest standard-arguments -o dev=device-name, porta=port-name, T=test-type, L=loopback-type, M=mode, D=data-pattern, AB=async-baud-rate, S=async-data-size, par=none|even|odd, BS=1|10|100|1000|3000|5000|10000, F=flow-control, B=sync-baud-rate, DP= sync-drop-tolerance, P=sync-poll-wait
Command-line syntax for devices connected to the super I/O port:
/opt/SUNWvts/bin/sparcv9/serialtest standard-arguments -o dev=device-name, porta=port-name, T=test-type, L=loopback-type, D=data-pattern, AB=async-baud-rate, BS=1|10|100|1000|3000|5000|10000, F=flow-control, UAB=User-Baud-Rate