This Chapter describes how to use the serial capabilities of the serial/audio mezzanine card. For information on writing applications, see “Additional Documentation and Information”.
In order to use the serial ports, the Audio/Serial Option requires the aso.sw. subsystem, which provides:
the STREAMS based ASO driver (/var/sysgen/boot/asoser.o), which lets you use the serial ports on the Audio/Serial Option with STREAMS based utilities at up to 115,200 baud (depending upon the utility)
the memory-mapped ASO driver (/var/sysgen/boot/asoserns.o), which allows custom applications to use a low-latency, memory-mapped interface to the ASO serial ports
All of the serial ports provided by the Audio/Serial Option use DB-9 connectors and can be used as either RS-232 or RS-422 ports. When used as RS-422 ports, pins 1 and 6 are activated for TX_H and RX_H (transmit high and receive high), respectively. See Appendix A, “Connector Pinouts,” for a diagram of the connector pinout of the DB-9 ports.
![]() | Caution: The power-up default for all of the Audio/Serial Option serial ports is RS-232 mode. If you have serial devices that would be damaged by pinout voltages in RS-232 mode, be sure to disconnect them before rebooting your Challenge or Onyx system. |
Figure 2-1 shows the layout of the serial ports.
Pinouts for the ports are described in Appendix A, “Connector Pinouts.”
Table 2-1 shows how the ports correspond to IRIX® device file entries.
Table 2-1. How the Serial Ports Correspond to IRIX Device Files
RS-232 Device | RS-422 Device | High-Speed (Memory-Mapped) Device |
|---|---|---|
/dev/tty[dfm]72 | /dev/tty4[dfm]72 | /dev/aso_mmap/tty72 |
/dev/tty[dfm]73 | /dev/tty4[dfm]73 | /dev/aso_mmap/tty73 |
/dev/tty[dfm]74 | /dev/tty4[dfm]74 | /dev/aso_mmap/tty74 |
/dev/tty[dfm]75 | /dev/tty4[dfm]75 | /dev/aso_mmap/tty75 |
/dev/tty[dfm]76 | /dev/tty4[dfm]76 | /dev/aso_mmap/tty76 |
/dev/tty[dfm]77 | /dev/tty4[dfm]77 | /dev/aso_mmap/tty77 |
To make sure that a particular serial port is working in RS-232 mode, follow these steps:
Obtain an ASCII terminal and the proper cable with which to connect it to one of the Audio/Serial Option serial ports:
The ports on both the Audio/Serial Option and the terminal use data terminal equipment (DTE) signals. This means the transmit data pin on an Audio/Serial Option port should be connected to a receive data pin on the terminal, and vice versa. See Appendix A, “Connector Pinouts.”
The cable needs at least three wires to function properly with a terminal: transmit low (pin 2), receive low (pin 3), and ground (pin 7). (These pin numbers are for the Audio/Serial Option DB-9 connector; the pin numbers on the terminal may vary, depending upon the type of connector it uses.)
Connect the ASCII terminal to the serial port you want to test using the serial cable.
Turn on the terminal and make sure it is configured in the following way:
9600 baud
8 data bits
1 stop bit
no parity
Press the <Enter> key on the ASCII terminal. You should see a login prompt similar to this:
IRIS login:
If you do not see a login prompt, log in as root on the workstation and type some characters directly to the terminal.
For example, if you are testing the port tty_72, type the following at a shell prompt:
cat >> /dev/ttyd72 This is a test Are these words displayed on the terminal screen? |
These sentences should appear on the ASCII terminal. When you are finished typing, press <Ctrl-D>.
If you do not see a login prompt, and the sentences you typed in the previous step do not appear on the ASCII terminal screen, check the following:
Make sure the cable is connected to the correct serial port. Refer to Figure 2-1 for the default layout of serial ports and connectors.
Make sure the cable is wired correctly. It should be a three-wire, null-modem serial cable with transmit wired to receive, and ground wired to ground.
Verify that the terminal's communication settings are correct. They should be 9600 baud, 8 data bits, 1 stop bit, and no parity.
Some terminals have more than one port (for example, a data port and an auxiliary port.) Make sure you connect the serial cable to the correct port for the terminal, usually the port labeled Data or Modem. If your terminal has more than one port, and you are not sure which is correct, refer to your terminal's documentation.
For complete information on using serial ports with modems, terminals, and other devices, see the IRIX Advanced Site and Server Administrator's Guide.
Table 2-2 shows how you can use any of the six ASO serial ports:
Table 2-2. ASO Serial Port Device Entries and Baud Rates
Serial Mode | Device Files | Maximum | Driver |
|---|---|---|---|
RS-232 | /dev/tty[dfm]72 | 115,200[a] | Silicon Graphics supplied ASO driver /var/sysgen/boot/asoser.o |
RS-422 | /dev/tty4[dfm]72
through | 115,200a | Silicon Graphics supplied ASO driver /var/sysgen/boot/asoser.o |
RS-232 or
RS-422 via
memory- | /dev/aso_mmap/tty72
through | 115,200a | Silicon Graphics supplied ASO driver /var/sysgen/boot/asoserns.o |
[a] Standard utilities, such as getty and cu, may be limited to 38400 baud. Using serial devices via STREAMS at greater than 38400 baud requires custom applications. [b] Software selectable; the default is RS-232. | |||
![]() | Caution: When the serial ports on the Audio/Serial Option are used in RS-422 mode, the pin-outs are not the same as the standard RS-422 ports used on Challenge and Onyx deskside and rackmount systems. See “Differences Between Existing Challenge and Onyx Serial Ports”. |
If you access the serial ports through the entries /dev/tty[dfm]72 through /dev/tty[dfm]77, RS-232 signals are automatically enabled on the serial port pins. If you access the ports through the entries /dev/tty4[dfm]72 through /dev/tty4[dfm]77, RS-422 signals are automatically enabled. You can also select between RS-232 and RS-422 modes using STREAMS IOCTL calls. See the serial(7), streamio(7), and asoser(7) reference pages, and /usr/include/sys/asoser.h.
Memory-mapped applications use /dev/aso_mmap/tty72 through /dev/aso_mmap/tty77. Both RS-232 and RS-422 modes are supported. The default is RS-232. See the asoserns(7) reference page.
Standard IRIX serial utilities may not work at baud rates higher than 38400. Custom applications can use baud rates up to the maximum supported by the Audio/Serial Option using either STREAMS or memory-mapping. See “Writing Serial Applications” for more information.
To use the Audio/Serial Option serial ports with standard utilities, operations, and devices, such as getty, cu, SLIP, PPP, uucp, printers, terminals, and modems, you must manually edit a variety of configuration files. For complete instructions, see the IRIX Advanced Site and Server Administrator's Guide. Also, see serial(7) and the reference pages for the specific utilities, such as getty(1M).
The IRIX Advanced Site and Server Administrator's Guide is available online using the InSight document viewer. It is also available in printed form. Contact your local Silicon Graphics representative for more information on ordering printed manuals.
![]() | Note: Do not use the graphical Port Setup tool, available from the Toolchest and System Manager, with the Audio/Serial Option. This is the tool that is documented in “Setting Up Peripheral Connections,” in the Personal System Administration Guide. The Port Setup tool does not recognize the serial ports found on the Audio/Serial Option. |
In RS-232 mode, the pin-outs of the Audio/Serial Option serial ports are identical to the standard RS-232 ports found on Challenge and Onyx systems. However, the serial ports on the Audio/Serial Option use different pinouts for RS-422 connections. Table 2-3 shows these differences between the ports:
Table 2-3. RS-422 Port Pinout Comparison
Audio/Serial Option | Existing CHALLENGE and Onyx Port Pin Number | Meaning |
|---|---|---|
1 | 7 | Transmit high (TX_H) |
2 | 2 | Transmit low (TX_L) |
3 | 3 | Receive low (RX_L) |
4 | 9 | Request to send (RTS) |
5 | 5 | Clear to send (CTS) |
6 | 8 | Receive high (RX_H) |
7 | 6 | Signal ground |
8 | 4 | Data carrier detect (DCD) |
9 | 1 | Data terminal ready (DTR) |
If necessary, you can use the information in the above table to construct an adapter cable that will allow any RS-422 cables designed for the existing Challenge and Onyx port pinouts to work properly with the Audio/Serial Option ports.
The Audio/Serial Option provides two methods of accessing serial devices:
a STREAMS based interface
a memory-mapped interface
The following guidelines should help application developers decide which method to use.
The STREAMS interface is appropriate if you want to take advantage of the features of STREAMS. These features include portability, carriage-return and newline translation, blocking I/O, and ease of porting existing STREAMS based serial applications.
However, the memory-mapped interface may be appropriate for the following reasons:
It offers lower latency than STREAMS, making it more appropriate for use with the frame scheduler in real-time applications.
It offers lower system overhead.
It provides non-blocking I/O, which may be important for applications that need a smooth flow of data to and from a serial device.
See “Additional Documentation and Information” for information on STREAMS documentation.
One way that you can tune serial performance is through the lboot variable asoser_int_lim, which is found in the file /var/sysgen/master.d/asoser. This variable controls the maximum number of interrupts per second generated by the Audio/Serial Option board.
Values of asoser_int_lim range from 50 to 1000 interrupts per second. A lower number of interrupts per second causes greater latency for serial I/O. A higher number of interrupts increases interrupt overhead and thus CPU use. The default value of asoser_int_lim is 500.
When using the memory-mapped interface, latency is the expected time between the receipt of the “stop” bit trailing a the data byte and the time that data byte becomes is available to the user application. When using the STREAMS driver, latency can be longer because of STREAMS scheduling. If low-latency is important for a particular application, use the non STREAMS (memory-mapped) driver.
Latency can also vary slightly under severe system bus loading or is interrupts are disabled for a long period of time. To help prevent data loss under these conditions, the Audio/Serial Option mezzanine card and firmware are designed to buffer thousands of characters.
The formula in Figure 2-2 describes how the number of interrupts per second (IPS) translates into latency in milliseconds.
Thus, an asoser_int_lim value of 50 interrupts per second would translate to a latency of 20 milliseconds.