1834312 Members
2278 Online
110066 Solutions
New Discussion

Serial Port Parameter

 
Oleg_23
Occasional Contributor

Serial Port Parameter

Hi.
Sorry for my English.

I have HP9000 server L-series, HP-UX 11i.
Server has IO-Core card with 3 serial ports (remote, console, power).

How can I change speed for a serial port, e.g. /dev/tty0p0?
By default, speed is 300 baud:

$ stty < /dev/tty0p0
speed 300 baud; ...

I try -

$ stty 9600 < /dev/tty0p0

but speed did not change.

If I change speed in GSP, anyway nothing happened.

Thank you in advance.
3 REPLIES 3
Dietmar Konermann
Honored Contributor

Re: Serial Port Parameter

Hi!

Your stty command is perfectly correct. But the configuration is reset to its defaults when the device is closed. You need to keep it open while you need to use it.

From a posix-sh script e.g.:

(
stty 9600
echo "hallo"
read answer
...
) < /dev/tty0p0 >/dev/tty0p0


Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Rainer von Bongartz
Honored Contributor

Re: Serial Port Parameter

OR


sleep 9999999999> > /dev/tty0p0&

stty 9600 < /dev/tty0p0


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
harry d brown jr
Honored Contributor

Re: Serial Port Parameter

Oleg,

If that's poor english, I can't imagine what correct english is!

Maybe it was those cryptic commands, like:

stty


:-)
Live Free or Die