[comp.unix.questions] Talking to serial devices on Sys V?

jantypas@ucrmath.UUCP (John Antypas) (07/11/88)

Hello again.

Does anyone out there in Sys V know what the correct procedure for 
openning a two-way connection to a serial device is?  I want to be to
send ascii strings to a few devices and read results back, but every 
time I fiddle with all of the various stty type values, I get various
results -- all wrong.

How can one for example, write a C program which will open a 2400 baud
connection to a modem on /dev/tty0, send the string "AT<return>" and
then attempt to read the "OK" from the modem?  Sounds trivial, but it hasn't
been for me!