Talking to serial devices on Sys V?

John Antypas jantypas at ucrmath.UUCP
Tue Jul 12 01:58:01 AEST 1988


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!



More information about the Comp.unix.questions mailing list