Date: Wed, 23 Oct 2002 22:01:41 -0500 From: Martin McCormick <martin@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org Subject: Serial Data Acquisition Mystery Solved. Message-ID: <200210240301.g9O31fG47058@dc.cis.okstate.edu>
next in thread | raw e-mail | index | archive | help
I wrote in yesterday with a question about using /dev/ttyd0 as a serial data input port. I found out that there were two reasons for my program not to work. Firstly, I had made a truly stupid mistake which must have happened when I may have gotten a phone call or somebody stopped by. I forgot to add one line to the code that dumped each received line of text in to the file I had opened for that purpose. The other problem was simply that I hadn't entered very much test data in to the file and the buffers hadn't flushed yet. I put a fflush (fp_inputstream); in my program to run when a file is closed and then one can see any inputted data. I haven't tried large amounts of data yet, but it seems to be working as planned. Does anybody know if opening /dev/ttyd0 for reading only has any ill effects? In this case, there will be no hand shaking or return data, only a 9600-baud stream from a piece of communications equipment to the serial port. Martin McCormick 405 744-7572 Stillwater, OK OSU Center for Computing and Information services Network Operations Group To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210240301.g9O31fG47058>