E Sundiag Serial Parallel Controller





This appendix explains how to use Sundiag to test the functionality of the Serial Parallel Controller card within the UNIX operating environment. Sundiag uses the Serial Parallel Controller device driver to access the card components such as the cd-180 and ppc2 chips, and the serial and parallel ports. This appendix assumes that you know how to use Sundiag. See the Sundiag User's Guide for information about how to install and use Sundiag.

Hardware Requirements

The following is the minimum hardware configuration required to successfully run the (user0) SPC/S Internal Test:

The following hardware is also required to successfully run the other Sundiag Serial Parallel Controller tests:

Sundiag Files

The Serial Parallel Controller Sundiag files are automatically stored in the /usr/diag/sundiag directory when the device driver is installed from the release media to your system.

The two Serial Parallel Controller Sundiag files are:

Starting Sundiag

When you are ready to run Sundiag Serial Parallel Controller, type:

You should see the Probing Message, and then the Sundiag window should appear on your screen.

The Sundiag Serial Parallel Controller tests appear under "USER TESTS" in the control panel.

Sundiag Serial Parallel Controller Tests

The Sundiag Serial Parallel Controller consists of the following ten tests:

    This test performs a quick internal check of the Serial Parallel Controller card(s) installed in SBus slots. You do not need to attach anything to the card(s) to perform this test. This is a stand-alone test designed to run alone, not with any other tests.

    This test provides full-duplex transmission and full-modem loopback testing on the port designated /dev/ttyz00. You must attach a 25-pin Loopback plug to serial port /dev/ttyz00 on the patch panel. (This port is labeled 0 on the patch panel connected to the first installed card.)

    This test checks the proper operation of the serial ports by echoing any character typed on a tty terminal keyboard to the tty terminal screen. This test is terminated by typing Ctrl-C from the terminal keyboard. After a short delay, the Status Window updates the Pass Count.

If no terminal keyboard input is received within two minutes, a timeout occurs and a failure is posted to the Status Window.

    To run the default test, you must connect a tty terminal to /dev/ttyz00 (labeled 0 on the patch panel connected to the first installed card). (You can test other serial ports by altering the .usertest file. See the .usertest section at the end of this appendix.) Observe the terminal screen to validate the test.

    This test sends the entire ASCII character set to a Centronics-compatible parallel printer. You must attach a parallel printer to the parallel port (/dev/stclp0) on the Serial Parallel Controller patch panel. Observe the printer output to validate the test.

For the user4 - user9 tests, when you connect the 96-pin Loopback plug, make sure the locking mechanism on the 96-pin loopback plug clicks to insure a secure connection.

    This test provides data transmission, full-modem loopback, and parallel port loopback testing on the first installed card. You must attach a 96-pin loopback plug to the card before running this test.

    This test provides data transmission, full-modem loopback, and parallel port loopback testing on the second installed card. You must attach a 96-pin loopback plug to the card, if present, before running this test.

    This test provides data transmission, full-modem loopback, and parallel port loopback testing on the third installed card. You must attach a 96-pin loopback plug to the card, if present, before running this test.

    This test provides data transmission and full-modem loopback testing on the first installed card. It also tests the cable between the card and the patch panel, and the patch panel itself. You must attach eight 25-pin loopback plugs to the serial ports on the patch panel before you perform this test.

    This test provides data transmission and full-modem loopback testing on the second installed card. It also tests the cable between the card and the patch panel, and the patch panel itself. You must attach eight 25-pin loopback plugs to the serial ports on the patch panel before you perform this test.

    This test provides data transmission and full-modem loopback testing on the third installed card. It also tests the cable between the card and the patch panel, and the patch panel itself. You must attach eight 25-pin loopback plugs to the serial ports on the patch panel before you perform this test.

The Serial Parallel Controller tests appear under "USER TESTS" in the Sundiag control panel. To run a test, with the mouse, click on the box next to one of the ten tests listed above. Then click on the Sundiag start button.

Test Options

The Sundiag Serial Parallel Controller tests, except the Printer test, allow you to change test options. The test options are shown in the following table.

If you are running pre-2.0 Sundiag, do not enable the options in the Options Window. If you do so, Sundiag will either fail or not recognize the enabled option(s).

    Table E-1 Test Options

Options Default Values Description D any See footnote [1]) Specifies the device name. T 1 See footnote [2]) Specifies the subtest name. B 9600 110 - 38400 [3]) Specifies the baud rate. C 8 5 - 8 Specifies the character length. S 1 1, 2 [4]) Specifies the number of stop bits. P 0 0 - 2 [5]) Specifies parity. F rtscts See footnote [6]) Specifies the flow control protocol. I A 5, A, r [7]) Specifies the data for the loopback tests.

The test options are changed by modifying the .usertest file. To change the test options:

    1. As superuser, type cd /usr/diag/sundiag and press the Return key.
    2. Use vi or another editor of your choice to change the .usertest file in the /usr/diag/sundiag directory.

    Each line in the .usertest file is in the following format: sundiag test label, test name, command-line arguments

You can replace sundiag test label with whatever you want to be displayed on the Sundiag control panel. Use spiftest for the test name. See the table earlier in this appendix and the Sundiag User's Guide for the available command line arguments.

The following example shows the .usertest file. The # symbol before a line in the .usertest file means that the line is commented out. If you want to test another serial port (/dev/ttyz01 - 07), you can use a text editor and remove the # symbol on the line corresponding to the serial port(s) you want to test.

If you do alter the .usertest file so that you can test more than
/dev/ttyz00,
you must use a 25-pin loopback plug for each enabled serial port.

Error Messages

Sundiag error messages appear in the sundiag console window. The error messages are generated as a result of the Sundiag Serial Parallel Controller discovering fatal errors. Sundiag saves these error messages in the Sundiag error log file. The error messages appear in the following format:

    MM/DD/YY HH:MM:SS <device name spiftest ERROR: error message

SunOS error messages (if any) appear in your system console window and are not listed here. This section identifies possible causes for the card or test failure and identifies the Field Replaceable Unit (FRU), if possible. The three FRUs are as follows:

This section also provides suggestions if an error is not hardware related.

Error message: No SPC/S card found or device driver not installed

    Possible causes: An incorrect slot number was specified, or a non-SPC/S card was found, or the device driver was not installed.

Error messages:

Ioctl STC_DCONTROL(STC_REGIOW-COR2) error on <device name, or

Ioctl STC_DCONTROL(STC_REGIOR-CCR) error on <device name, or

Ioctl STC_DCONTROL(STC_REGIOW-CCR) error on <device name, or

Ioctl STC_DCONTROL(STC_PPCREGW-PDATA) error on <device name, or

Ioctl STC_DCONTROL(STC_PPCREGR-PDATA) error on <device name, or

Ioctl TCSETS failed on <device name, or

Ioclt TIOCMGET error on <device name, or

Ioclt TIOCMSET error on <device name, or

Ioctl STC_GPPC error on device <device name'>

Ioctl STC_SDEFAULTS error on <device name'>

Ioctl STC_DCONTROL error on <device name'>

    Possible cause: The device driver was not installed correctly, or the card is not working (see system console for messages). You may need to reinstall the device driver.

Error message: Expected DSR set, observed clear
Parallel port loopback test failed on <device name'>

    Possible causes: The modem lines DSR are not stable, or the parallel port is not sending the correct data, or the 96-pin loopback plug either is wired incorrectly or not making proper contact.

Error message: Expected <pattern'>
Observed <pattern'>
Modem loopback test failed on <device name'>

    Possible causes: The modem lines are not stable. If the modem loopback test passed on the 96-pin loopback test and failed on the 25-pin loopback test, then it is possible that either the patch panel or the cable is not functional. Also, make sure the loopback plug is making proper contact.

Error message: Can't open <device name with file descriptor <number'>

    Possible causes: This is an internal error. Phone Sun for technical assistance.

Error message: Device <device name already open

    Possible causes: Two tests are trying to access the same device at the same time or the device is already busy running another process.

Error messages:

Open error on <device name, or

Read error on <device name, or

Write error on <device name'>

    Possible causes: Another application is currently using this device or the device driver is not installed properly.

Error messages:

Paper out error on device <device name, or

Off-line error on device <device name, or

Busy error on device <device name, or

Error on device <device name'>

    Possible causes: The parallel printer is either out of paper, off-line, busy printing data, or some other error condition exists. Check the printer status.

Error message:

Expected <number bytes, observed <number bytes
Internal test failed on <device name'>

    Possible cause: Data transmission failed because you're running the internal loopback with another test. The Serial Parallel Controller card must be replaced.

Expected = <pattern, observed = <pattern'>
Internal test failed on <device name'>

    Possible cause: Data transmission failed, the card must be replaced.

Expected = <pattern, observed = <pattern'>
Data loopback failed on <device name'>

    Possible causes: Data transmission failed because you are running the internal loopback with another test, or the loopback connector is not making proper contact, or the card failed. Re-insert the connector and make sure it makes proper contact. If the test still fails and if you are running the 25-pin loopback test, you can try to run the 96-pin loopback test to isolate the problem. If both tests fail for the same port, then it is possible that the card is not functional. If the 96-pin test passes, and the 25-pin doesn't, try the test with a different cable.

Error message: Timeout error on <device name'>

    Possible causes: The test requires a loopback plug, a tty terminal, or a printer connected to the device under test and found none.