C H A P T E R  18

Serial Ports Test (serialtest)


serialtest Description

The serialtest checks the system on-board serial ports (asy[0,1]), and any multiterminal interface (ALM2) boards (mcp[0-3]). Data is written and read in asynchronous mode using external loopback path.



Note - serialtest supports testing the asy driver (16550 UART). The 16550 device only works in asynchronous mode. The maximum baud rate is 115200.





Note - The 16550 UART can support two devices but some systems only carry one physical port (TTYS1 or TTYB, /dev/term/b, known as COM2 in the x86 environment). Do not try to test port a. The operating system shows two ports, but physically there is only one port.



Intervention mode must be enabled to run this test. This test is nonscalable.


Loopback Connectors

The loopback test requires null modem and plug connectors, which are described in Appendix A.

The loopback for the Plug A to A option is described in the section 9-Pin Female Single-Port Loopback Plug.


serialtest Asynchronous Testing

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.


serialtest Options

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.


FIGURE 18-1 serialtest Test Parameter Options Dialog Box

Screenshot of the serialtest Test Parameter Options dialog box


 


TABLE 18-1 serialtest Options

Option

Description

Test Type

Selects how the test will run. Test options include:

  • a - Runs the test on port A.
  • b - Runs the test on port B.
  • a_b - Runs the test on ports A and B sequentially.
  • a_b_concurrent - Runs the test on port A and port B concurrently.

Loopback Type

Selects the loopback test. Options include:

  • Plug_a_to_a__b_to_b - An external loopback plug for a, b, a_b, and a_b_concurrent test types.
  • no_modem_a_to_b - An external loopback cable for a_to_b and a_to_b_concurrent test types.

Data Type

Selects the data pattern to transfer. You can select:

  • Random
  • Sequential
  • Alphanumeric
  • 0x00-0xff

Async Baud Rate

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.

Consult your hardware installation manual for more information.

Async Data Size

Selects the total number of bytes to transfer in Asynchronous mode. This can range from 1 to 10000.

Async Flow Control

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.

The following options are not available for the devices connected to the super I/O port. They are available for all other supported I/O ports.

Test Mode

Selects the mode to run the test in. The modes available are Asynchronous, Synchronous, or Both. When Both is selected, the test runs first in Asynchronous mode then Synchronous mode.

Sync Baud Rate

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.

Consult your hardware installation manual for more information.

Sync Packet

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.

Sync Poll Wait

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.

 

The following option is available only for devices connected to the super I/O port. They do not apply to any other supported I/O ports.

User Defined Baud Rate

Allows the user to set new baud rate values for the test. First select the User Defined option from the Async menu. Then enter the new value in the User Defined Baud Rate field.



serialtest Test Modes


TABLE 18-2 serialtest Supported Test Modes

Mode

Description

Connection

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.

Functional

Performs the selected loopback test.



serialtest Command-Line Syntax

/opt/SUNWvts/bin/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/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


TABLE 18-3 serialtest Command-Line Syntax

Argument

Description

dev=device-name

Identifies the serial port(s) to test. There is no default value. You must specify a device name such as:

  • asy0
  • asy1

porta=port-name

The name of the first device of a serial device pair. The default is A.

T=test-type

Specifies the type of test to run:

  • a = runs the test on port A.
  • b = runs the test on port B.
  • a_b = runs the test on ports A and B sequentially.
  • a_b_concurrent = runs the test on port A and port B concurrently.
  • a_to_b = runs the test from port A to port B.

L=loopback-type

The type of loopback connector attached to ports:

  • Plug_a_to_a__b_to_b
  • Modem_a_to_b (Sun internal only)

M=mode

The default test mode is aasynchronous (asynch).

D=data-pattern

Selects the data pattern to transfer. You can select:

  • Random
  • Sequential
  • Alphanumeric
  • 0x00-0xFF

AB=async-baud-rate

Asynchronous baud rate (default = 9600). The valid values are between 110 - 460800.

Note: Some platforms can only support asynchronous baud rates up to 38400 or 76800. For baud rates greater than 153600 the serial line drivers must be set for RS-423 mode and not RS-232 mode.

 

S=async-data-size

Asynchronous mode total number of bytes to write. Values range from 1 to 10000 bytes.

par=none|even|odd

Parity used in the async loop test. Default value is none.

BS=1|10|100|1000|3000|5000|10000

Number of bytes in each write during async loop test. Default value is 100.

F=flow-control

Asynchronous mode flow control:

  • Hardware (RTS/CTS)
  • Software (xon/xoff)
  • None



Note - sync-baud-rate, sync-drop-tolerance, sync-poll-wait, User-Baud-Rate are not supported on x86 platforms.