Are you using fflush() after your sends, this flushes the buffer when your send string is small and forces a complete send of your data. -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Herbert Graf Sent: Monday, February 16, 2004 2:12 PM To: PICLIST@MITVMA.MIT.EDU Subject: [EE]: Serial Port and Linux Hello all, I'm trying to write a small program that sends a few things over a serial port and then reads a few things back. I've having trouble getting it to work. I'm using open, write and read to do my things, accessing the device through the /dev/ttyS1 interface. Things work fine for a while and then seem to go crazy. For example, I can send a few things down the line, but then when I do a single byte read from the port I continuously get the newline character. Anybody have some simple gcc compatible c code of accessing the serial port in Linux? I'm using Redhat 9.0 and gcc. Thanks, TTYL ---------------------------------- Herbert's PIC Stuff: http://repatch.dyndns.org:8383/pic_stuff/ -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads