NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problems with stty?



"David Dudley" writes:
- I'm trying to work some serial port magic, but when I use stty to change
- the speed, it defaults back to 9600.

It goes back to the defaults because nothing is holding the
tty open.  So, stty(1) opens it to change the settings, changes
the settings, and then closes it.  Last close, back to defaults.

Try using something like cat(1) or the shell to open/hold open
the device, and then see what happens.

eg:
        % cat /dev/tty04 &
        [1] 65432
        % stty -f /dev/tty04 speed 19200
        9600
        % stty -f /dev/tty04 speed
        19200
        % kill %1
        % stty -f /dev/tty04 speed
        9600

--
Eric Schnoebelen                eric%cirr.com@localhost         
http://www.cirr.com
        Windows has detected that a gnat has farted near your computer.
                        Press any key to reboot.


Home | Main Index | Thread Index | Old Index