Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ames!bionet!arisia!roo!kurtenba From: kurtenba@parc.xerox.com (Gord Kurtenbach) Newsgroups: comp.os.msdos.programmer Subject: Help! serial comm problems Keywords: serial communication port RS232 Message-ID: <487@roo.UUCP> Date: 26 Jul 90 01:57:46 GMT Sender: news@parc.xerox.com Lines: 32 I'm not a DOS programmer and I`m trying to write a program to read and write over the serial port. The basic structure is: while (1) { } I've tried opening "com2" using fopen and I can successsfully stuff data down the stream. But when I try to read from the stream with say a call to fgetc, I get a "General failure reading com2:" errormessage. I've fopened com2 for reading and writing and the baud rates etc are correct and I can read data from the hardware port using bioscom so communication is working. What is wrong here? Will this approach work or am I on the wrong track? My second question is, if I do get the read working how can I avoid blocking on it? If some kind soul out there has a stitch of code (C would be great) that does what I want I would be most thankful for their help. Thanks. Gord Kurtenbach PS: I've notice that the DOS command "copy com2: junk" also gives the same error. Could my system be configured wrong?