Link to home
Start Free TrialLog in
Avatar of rodden
rodden

asked on

Serial Comm with C

Hardware: Sun UltraSparc2 running Solaris 2.5.1
I've got the Sun connected to a DOS computer via serial cable.  I need to know how to use termios in C (on the Sun) to communicate with the serial port so I can
1. Read incoming information - it will be in the format similiar to:
  34.56 -23.45 56.76 \n
and store each float in a variable.
2. Be able to write to the serial port as well. To tell the DOS program running on the other end to send the next line of information as above. (This is done by sending a 'f\n' to the DOS computer.)
It is necessary NOT to use any buffers because the information needs to be read in real time and used in the rest of my program on the Sun.
I've read the termios man pages on termios and I'm lost. Code on how to do this is would be greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of pxh
pxh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial