|
-
June 3rd, 1999, 07:40 AM
#1
Serial Communication ( reading problem )
I've done a class that communicates with the serial port. The problem is that for some reason after booting the machine and starting my program, I cannot receive anything, but I can send bytes to the port. So for it to work, I open up a HyperTerminal on the com port and write in it. After that I start receiving information from the port.
Info on the program:
I open the com port with an overlapped structure to have asynchronous reading and writing. I use ReadFile and WriteFile with an Overlapped structure.
Thanks in advance.
Jason Phillips
-
June 3rd, 1999, 11:25 PM
#2
Re: Serial Communication ( reading problem )
this is kind of a stupid question, but did you initialize the port correctly and set the baud, parity, stop bits and all that to the correct values????
Word,
Ryan "Radman" Du Bois
-
June 4th, 1999, 03:11 PM
#3
Re: Serial Communication ( reading problem )
Actually I found the problem.
I did not initialize the COMMTIMEOUTS structure. So it seems that after booting up the machine, the COMMTIMEOUTS must be set so that it never reads the port, or something. But it works great now.
Thanks,
Jason Phillips
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|