Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 1996 06:41:28 -0700
From:      Sean Kelly <kelly@yarmouth>
To:        handy@sag.space.lockheed.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: baudrate on serial port?
Message-ID:  <9602281341.AA02331@emu.fsl.noaa.gov>
In-Reply-To: <Pine.OSF.3.91.960227203740.12956A-100000@sag.space.lockheed.com> (handy@sag.space.lockheed.com)

next in thread | previous in thread | raw e-mail | index | archive | help
All tty settings return to their initial/lock state after the port is
closed.  When you do stty -f /dev/cuaa1 57600, stty will open the
port, set the bps rate, and then close the port.  When the port
closes, it goes back to 9600.

What program are you using to talk to your modem?  I'd try telling
that program what bps rate you'd like to use.  For example, if you're
using /usr/bin/tip, then edit /etc/remote and insert br#57600 in the
entry you're using.  If you're using your own home grown software, use
the cfsetispeed() and cfsetospeed() functions.

If you're doing this from the command line or from scripts, here's a
trick:

        sleep 999999 </dev/cuaa1 &      # Open the port and keep it open awhile
        stty -f /dev/cuaa1 57600        # Set bps rate
        echo "Hi" > /dev/cuaa1          # Talk to modem at that rate

You could also use stty -f /dev/cuaia1 57600, which sets the INITIAL
state of the modem.  The next open of that port will get you 57600
bps.  Type ``man sio'' for more information.

-- 
Sean Kelly
NOAA Forecast Systems Laboratory, Boulder Colorado USA

I'm just guessing, but probably one of the early signs that your radarscope is
wearing out is something I call "image fuzz-out."  But I've never even seen a
radarscope, so I wouldn't totally go by what I've just said here.
        -- Deep Thoughts, by Jack Handey



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9602281341.AA02331>