C Device Driver Settings





This appendix explains how to change the default settings for the serial and parallel ports in the /usr/etc/stc/stc_defaults file. The Serial Parallel Controller device driver enables you to specify various settings to configure the serial and parallel ports.

Before supporting interactive login sessions with your device driver, become familiar with the functions in the following files.

Set the baud rate of the serial ports at an appropriate speed for the device(s) you connect to your SBus-based SPARC desktop system. You can set the baud rate up to 38.4 k baud, but do not exceed the 135 k baud total throughput for all eight serial ports unless you are using flow control. If you do not use flow control, you will lose data.

The stc_defaults file allows you to specify various default operating settings for the ports on your device driver. You can configure serial and parallel ports by specifying settings in this file. These settings are explained in this appendix.

Card Addresses

The following table shows you how to address the Serial Parallel Controller cards in your system.

The numerical order of the SBus slots determines the address which the device driver uses to reference your card(s). The device driver begins searching for a Serial Parallel Controller card in SBus slot 1, and continues searching until it finds the first installed Serial Parallel Controller card. The address of the first card is stc0; the address of the second card (if any) is stc1; and the address of the third card (if any) is stc2.

    Table C-1 How Your Cards are Addressed

Card Addresses stc0 ttyy00 - ttyy07, ttyz00 - ttyz07 stc1 ttyy08 - ttyy0f, ttyz08 - ttyz0f stc2 ttyy10 - ttyy17, ttyz10 - ttyz17

Device Names

The following tables show device names and how they correspond to serial and parallel ports on your card. This information also applies to ttyy ports.

Do not include /dev in the device name as in /dev/ttyz00. Use ttyzn for the device name, where n is the number of the port.

    Table C-2 Device Names (Odd Numbered)

Device Name Card Number Port ttyz01 0 serial 1 ttyz03 0 serial 3 ttyz05 0 serial 5 ttyz07 0 serial 7 ttyz09 1 serial 1 ttyz0b 1 serial 3 ttyz0d 1 serial 5 ttyz0f 1 serial 7 ttyz11 2 serial 1 ttyz13 2 serial 3 ttyz15 2 serial 5 ttyz17 2 serial 7

    Table C-3 Device Names (Even Numbered)

Device Name Card Number Port ttyz00 0 serial 0 ttyz02 0 serial 2 ttyz04 0 serial 4 ttyz06 0 serial 6 stclp0 0 parallel ttyz08 1 serial 0 ttyz0a 1 serial 2 ttyz0c 1 serial 4 ttyz0e 1 serial 6 stclp1 1 parallel ttyz10 2 serial 0 ttyz12 2 serial 2 ttyz14 2 serial 4 ttyz16 2 serial 6 stclp2 2 parallel

Serial Ports

You must include a line in the stc_defaults file for each serial port you use. The line contains two fields. The format is:

Device is the device name of the peripheral device you connect to your system. The syntax for device names is ttyzn where n is the number of the port. See the table earlier in this appendix which shows device names supported by your device driver, and how they correspond to serial and parallel ports on your card.

Flag is a setting you can specify. Typing one or more of the following flag names after the device name in the line for the serial port turns the setting(s) on. You can type the flag names in any order. Deleting a flag name from the line turns a setting off.

The flag display displays the current settings for a particular line in the stc_defaults file. You can use this option to verify your modem settings for one or more serial ports. Typing display at the end of the line displays the settings for the line each time you run the stc_defs program.

Example of configuring serial port 2 to ignore CD and assert DTR on open():

Parallel Port

Include a line in the stc_defaults file for each parallel port you use. The line can contain four fields. The first field is required; the others are optional. You can specify one or more settings within each field, but all settings specified for all fields must be on the same line. You cannot use a line continuation character (\). The format is:

Device is the device name of the peripheral device you connect to your system. The syntax for the device name is stclpn, where n is the number of the card containing the parallel port you wish to configure. See the table earlier in this appendix which shows device names supported by your device driver, and how they correspond to serial and parallel ports on your card.

Flag1 is a setting you can specify. This setting controls how the parallel interface responds to certain control/status signals coming from the peripheral device. Typing one or more of the following flag names after the device name in the line for the parallel port turns the setting(s) on. You can type the flag names in any order. Turning the setting on enables the Serial Parallel Controller card to monitor the appropriate signal from the peripheral device. Deleting a flag name from the line turns a setting off. The card then ignores the signal.

Flag2 is another setting you can specify. This setting controls how exceptional conditions on the parallel interface are handled. Flag1 modifies the behavior of flag2. Typing one or more of the following flag names after flag1 in the line for the parallel port turns the setting(s) on. You can type the flag names in any order. Deleting a flag name from the line turns a setting off.

Variable is one more setting you can specify. You can assign an integer value to the variable to control various aspects of the parallel port's error handling and data transfer parameters. For the values you can use, see the /usr/include/sbusdev/stcio.h file. If a value is not specified, the device driver will use the current value for the first three values. If timeout is exceeded, the device driver returns an error to the parallel port's controlling process (and optionally posts a signal).

Typing one or more of the following variable names after flag2 in the line for the parallel port turns the setting(s) on. You can type the variable names in any order. Deleting a variable name and its integer value from the line turns a setting off.

The flag display displays the current settings for a particular line in the stc_defaults file. You can use this option to verify your settings for the parallel port on one or more cards. Typing display at the end of the line displays the settings for the line each time you run the stc_defs program.

Example of configuring the parallel port on card 2:

For more examples of configuring serial and parallel ports, see the following files: