🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun.hardware
Article #24

Re: Need HELP setting ttya comm params on an SLC

#24
From: Duke of Canterbury
Date: Wed, 28 Oct 1992 19:00
50 lines
2909 bytes
hal@pollux.cs.uga.edu (Hal N. Brooks) writes:
: I'd like to use ttya on an SLC with the communications
: parameters of 9600 baud, 8 data bits, 1 stop bit.
: 
: The ttya-mode field of the prom says that that's what I've
: got (9600,8,1,N,-), but all indications are that it's
: doing 7,E,1 instead.
: 
: I'm just trying to hook up a printer, and my best evidence that
: it's actually doing 7,E,1 is that by connecting ttya to the
: serial port of a PC and running a comm program on the PC, I
: can cat a file on the Sun to /dev/ttya and it appears on the
: screen of the PC *if* the comm params on the PC are set to 7,E,1,
: but I get garbage if the comm params on the PC are set to 8,N,1.

The zs driver (the driver than handles ttya and ttyb) defaults to 7,E,1, and
I don't think it honors any of the EEPROM settings for ttya and ttyb,
although I'm not sure of this.  Let's assume that the zs driver ignores the
EEPROM, and sets the ports to 7,E,1.  Playing with stty, we get:

    % stty -a >/dev/ttyb
    speed 9600 baud, 0 rows, 0 columns
    parenb -parodd cs7 -cstopb -hupcl cread -clocal -crtscts 
    ^^^^^^ ^^^^^^^ ^^^ ^^^^^^^
see, ttyb is set to 7,E,1.  Now, let's say that you want to cat a file to
ttyb using 8,N,1 you could do:

    % ( stty cs8 -parenb ; cat filespec ; stty -a ) >/dev/ttyb
    speed 9600 baud, 0 rows, 0 columns
    -parenb -parodd cs8 -cstopb -hupcl cread -clocal -crtscts 

The "stty -a" at the end of the command is just for your conformation to see
the the ttyb parameters really did get changed.  You can also set the
baudrate, flow control, etc... in the stty command that's running inside the
paren-shell.

If you try stty on ttyb again, you'll see that the parameters are back to
the zs driver's defaults:

    % stty -a >/dev/ttyb                                          
    speed 9600 baud, 0 rows, 0 columns
    parenb -parodd cs7 -cstopb -hupcl cread -clocal -crtscts 

mike

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mike bender  DOD# 007  for sale: NX-650 & VT110 Shadow	415-863-8913 (home)
bender@oobleck.eng.sun.com    nothin' witty here	415-336-6353 (work)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID: <letoq3INNjk@appserv.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!sun-barr!male.EBay.Sun.COM!jethro.Corp.Sun.COM!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!oobleck!bender
References: <1992Oct28.004447.23693@athena.cs.uga.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!sun-barr!male.EBay.Sun.COM!jethro.Corp.Sun.COM!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!oobleck!bender
From: bender@oobleck (Duke of Canterbury)
Newsgroups: comp.sys.sun.hardware
Subject: Re: Need HELP setting ttya comm params on an SLC
Date: 28 Oct 1992 19:00:19 GMT
Organization: SPARK's R US
Lines: 50
Distribution: usa
Message-ID: <letoq3INNjk@appserv.Eng.Sun.COM>
References: <1992Oct28.004447.23693@athena.cs.uga.edu>
Reply-To: bender@oobleck.eng.sun.com
NNTP-Posting-Host: oobleck
X-Newsreader: Tin 1.1 PL3