SUMMARY: SPC/Controller

From: Santiago Aggio (syaggio@criba.edu.ar)
Date: Tue Feb 25 1997 - 20:31:37 CST


Thanks to all who submitted.

---------------------
My original question:
---------------------

I have some troubles to install a SPC Controller in a Sparc Station 10 runnning Solaris 2.5.1. I found the stc device and the stc.conf file, in the directory /platform/sun4m/kernel/drv but I don't know the way to install them.!!!
I found the unix command in /platform/sun4m/kernel, but i'm not sure that this is the solutions.

------------------------------
Answer 1
------------------------------

In Sunos 4.1.2,

/dev:

-rw------- 1 root staff 2 Jun 12 1996 stc.AUTOLOAD
-rw-r--r-- 1 root staff 50440 Jun 12 1996 stc.o
crw------- 1 root staff 59, 71 Feb 20 17:30 stc0
-rwxr-xr-x 1 root staff 15165 Jun 12 1996 stc_config
crw-rw-rw- 1 root staff 59, 64 Feb 20 17:30 stclp0

/usr/etc:
drwxrwsr-x 2 root staff 512 Jun 12 1996 stc/

/usr/etc/stc:

-r--r--r-- 1 root staff 5168 Jun 12 1996 stc_defaults
-rwxrwxr-x 1 root staff 32768 Nov 2 1990 stc_defs

******************** /usr/etc/stc/stc_defaults ******************
#
# @(#)stc_defaults 1.6 90/11/02 Copyr 1990 Sun Micro
#
# sample stc_defaults file for setting up SPC/S card
#
# serial port fields
# device names:
# you can use either the ttyyX or ttyzX designation, however the
# syntax is ttyyX (or ttyzX) and NOT /dev/ttyyX
# boolean flags:
# soft_carrier - enables soft carrier on the specified line; when this
# is set, transitions on the CD line will be ignored
# dtr_assert - causes DTR to be asserted on the next open of the line
# stc_dtrclose - use alternate semantics when dealing with DTR in close()
# if this is clear (the default), DTR will follow the
# same semantics on close() as the zs/alm/mcp drivers
# implement; if this is set, DTR will not drop on close()
# if TS_SOFTCAR is set in the t_flags field of termios
# cflow_flush - flush any data being held off by remote flow control
# during close()
# cflow_msg - display a message on the console if data transmission is
# stalled due to remote flow control blocking the
# transfer in close()
#
# parallel port fields
# device names:
# specify stclpX, where X is the board number which contains the
# parallel port you wish to modify; again, /dev/stclpX is
# NOT supported (yet :->)
# boolean flags:
# the following 4 flags determine how the parallel interface deals with
# certain control/status signals coming from the external
# device; when a particular flag is SET (i.e. it appears in
# the line describing a parallel port), the corresponding
# signal from the external device will be monitored; when the
# flag is clear, the corresponding signal will be ignored
# paper_out - the PAPER OUT signal
# error - the ERROR signal
# busy - the BUSY signal
# select - the SELECT (or ON LINE) signal
#
# the next 2 flags determine the handling of exceptional conditions on
# the parallel interface (qualified with the 4 flags above)
# pp_message - if pp_message is CLEAR (i.e. does not appear in the line
# describing a parallel port), you'll get a console
# message when a particular condition is first detected,
# and another console message when that condition has
# cleared itself. if pp_message is SET, you'll get
# a console message approx every 60 seconds for a
# particular condition until that condition clears itself
# pp_signal - if pp_signal is set, the parallel port's controlling
# process will get a PP_SIGTYPE signal whenever we
# detect an exceptional printer condition that hasn't
# been masked off
# PP_SIGTYPE is defined in /usr/include/sbusdev/stcio.h
#
# valued variables:
# the following 5 variables control various aspects of the parallel port's
# error handling and data transfer parameters; they all take an
# integer-valued argument (for the range of legal values, see
# sbusdev/stcio.h); unless you know what you're doing, don't muck
# with the defaults. if you don't specify a value, the value
# currently in use by the driver will remain in effect
# for the first 3 values, if the timeout time is exceeded the
# driver will return an error to the parallel port's controlling
# process (and optionally post a signal)
# ack_timeout - amount of time to wait for ACK from device after
# asserting STROBE and transfering a byte of data
# (in seconds)
# error_timeout - amount of time to wait for ERROR to go away
# (in seconds)
# busy_timeout - amount of time to wait for BUSY to go away
# (in seconds)
# data_setup - amount of time between placing data on the parallel lines
# and asserting STROBE (in uS)
# strobe_width - width of STROBE pulse (in uS)
#
# notes on format: the field names must match EXACTLY; white space is permissible,
# however, unlike /etc/gettytab, all definitions must be on the same physical# line (i.e. you can't use '\' as a line continuation character)
#
# sample for /dev/ttyz00 (and /dev/ttyy00) with just dtr_assert set, maybe an
# incoming modem
# ttyz00:dtr_assert:
#
# serial lines for first SPC/S board
#
ttyz00:dtr_assert:soft_carrier:
ttyz01:dtr_assert:soft_carrier:
ttyz02:dtr_assert:
ttyz03:dtr_assert:soft_carrier:
ttyz04:dtr_assert:soft_carrier:
ttyz05:dtr_assert:soft_carrier:
ttyz06:dtr_assert:soft_carrier:
ttyz07:dtr_assert:soft_carrier:
#
# sample entry for /dev/stclp0 with a changed ACK timeout and a longer
# strobe width and ignoring the SELECT line
# stclp0:paper_out:error:busy:strobe_width=6:ack_timeout=120:
#
# parallel line for first SPC/S board - since we don't specify any of
# the valued variables, they retain their default values
#
stclp0:paper_out:error:busy:select:
#
# the following is an example for a device connected to the parallel line
# on the first SPC/S board - the "select" line from the device will
# be IGNORED (since the "select" flag is not specified); this could
# be used for printers that have brain-dead SELECT line timing
#
# stclp0:paper_out:error:busy:
#
# you can use the boolean flag "display" to display the current settings of
# a particular line (serial or parallel) - for example, after setting a
# new ack timeout for /dev/stclp2, display all the parameters of that port
#
# stclp2:paper_out:error:busy:select:ack_timeout=20:display:
#
# end of stc_defaults
#

Then you need to load the kernel at boot time in /etc/rc.local:

#
# Load loadable modules.
#
if [ -f /etc/loadable ] ; then
        sh /etc/loadable > /dev/console
fi

************ /etc/loadable **********************
#!/bin/sh
# Load the SPC/S driver # SPC/S-driver
if [ -f /dev/stc_config ] ; then # SPC/S-driver
        if [ -s /dev/stc.AUTOLOAD ] ; then # SPC/S-driver
            sh /dev/stc_config -BOOT -l -m -R -d # SPC/S-driver
        fi # SPC/S-driver
fi # SPC/S-driver
if [ -x /usr/etc/stc/stc_defs ] ; then # SPC/S-config
  /usr/etc/stc/stc_defs /usr/etc/stc/stc_defaults # SPC/S-config
fi # SPC/S-config

-----------------------------
Answer 2
-----------------------------

boot -r "installs" them automatically. -r is for reconfigure, which is
where it decides what drivers need to be loaded.

>From personal experience, I'd avoid that board and get something else...



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:47 CDT