Operating System - HP-UX
1753663 Members
5606 Online
108798 Solutions
New Discussion

How do I use ioctl to set the baud rate?

 
SOLVED
Go to solution
Lars Bylander
Frequent Advisor

How do I use ioctl to set the baud rate?

I would like to use ioctl() to set the
baud rate (and other stuff) on the
serial port (e.g. tty0p0). I am using
the c-compiler on B2000 computers,
both under HP-UX 10.20 and 11.00.

Anybody who has a pice of code?

Lars Bylander
KTH/Alfven Laboratory
1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How do I use ioctl to set the baud rate?

Here's a piece of code (actually a program) that contains what you need. It actually
sets a tty port to some values and then forks
with a pause to hold the port open for other processes. If all you are interested in is the TCSETA ioctl calls just grab them.
If it ain't broke, I can fix that.