[Suns-at-Home] IPX Serial port speed (OpenBSD)

Alex Carver agcme2002 at yahoo.com
Thu Feb 18 22:01:22 EST 2010


--- On Thu, 2/18/10, Sandwich Maker <adh at an.bradford.ma.us> wrote:

> From: Sandwich Maker <adh at an.bradford.ma.us>
> Subject: Re: [Suns-at-Home] IPX Serial port speed (OpenBSD)
> To: suns-at-home at net-kitchen.com
> Date: Thursday, February 18, 2010, 4:41 PM
> " From: Alex Carver <agcme2002 at yahoo.com>
> " 
> " --- On Thu, 2/18/10, Sandwich Maker <adh at an.bradford.ma.us>
> wrote:
> " 
> " > From: Sandwich Maker <adh at an.bradford.ma.us>
> " > 
> " > " From: Alex Carver <agcme2002 at yahoo.com>
> " > " 
> " > " If I remember correctly, the IPX on-board serial
> ports will support up
> " > " to 38400 baud.  My current problem is that I
> can't seem to change it
> " > " to anything other than 9600.  In OpenBSD, I
> use stty to change it
> " > " (logged in as root) and it always bounces back to
> 9600.  Is there
> " > " something else conflicting with the port speed?
> " > " 
> " > " Serial consoles are disabled since I have a
> keyboard and monitor
> " > " plugged in.
> " > 
> " > is there a getty running on it?
> " > 
> " > []
> " 
> " No gettys are enabled on the ports.  The getty
> config file has them
> " both set to "off".  As far as I can tell, nothing
> else has control of
> " the ports.  Every time I use stty, though, it shows
> this:
> " 
> " #stty -f /dev/ttya speed 19200
> " 9600
> " #
> " 
> " There's a brief delay while it runs the command and
> before it prints
> " out the 9600.
> 
> this sure smells like another process...
> 
> what if you try
> stty -f /dev/ttya 19200 speed 
> ?  probably nothing different.

Using this it actually says 19200 briefly.  Then the port goes back to 9600 again.

> 
> " Is there a way to check if something has grabbed the
> port?
> 
> do you have fuser?  on solaris and probably other sV
> offspring, it can
> show the pid and uid of any process using the file, which
> can be
> regular, device special, etc.
> 
> " > From: Matt Crawford <matt8128 at dls.net>
> " > 
> " > []
> " > 
> " > 
> " > As soon as the device is closed, it reverts to the
> default.
> " > So you have to set it from a process that keeps it
> open, or
> " > engage in some other trickery:
> " > 
> " > 
> " > ( stty 38400; myprog ) < /dev/ttyb 2>&1
> > /dev/ttyb
> " 
> " I'm using this port with a GPS and gpsd so I can turn it
> into a
> " basic time server.  Gpsd itself is supposed to be
> able to change
> " the port speed while it's running but it complains that
> it can't
> " and the port always stays stuck at 9600.
> " 
> " So would this work:
> " 
> "  ( stty 38400 && gpsd /dev/ttyb )
> " 
> " Keeping everything in a single process or am I going to
> get stuck again?
> 
> my instinct is that it'll bounce back to 9600 when the stty
> exits.
> even if it does work, i don't think you can rely on it
> until you find
> out why it's misbehaving to start with.



      


More information about the Suns-at-Home mailing list