Serial I/O in SCO Unix

Conor P. Cahill cpcahil at virtech.uucp
Thu Mar 22 12:27:22 AEST 1990


>        Can I send and receive data via serial port by calling open(), read()
>and write() on tty device?

Yes.  It doesn't matter what the device you have attached to the port, you
can treat it as a standard file (that's what UNIX is all about).

>If not, how can I poll/read/write serial port just like DOS environment (which
>use interrupt)? For example, direct programming the hardware (serial port) in
>Unix?

You can't direct program the hardware from unix.  You use ioctl()s to perform
the same kind of functions.  See the termio(7) (not sure about the manual
section numbering under SCO Unix) man page for the ioctl commands and
arguments.


-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.questions mailing list