Serial port problem
I am reading serial port in a loop. using this code.
CPP / C++ / C Code:
This is a standard serial communication code found everywhere.I have to read the port till I receive 0xA char on the port from a hardware connected to it . So this read call i have put in a Do-While loop.
I send some command to my hardware which responds immediately in 8-10ms.
My intention is to wait for maximum 15ms.But the problem is i still get timeout from waitforsingleobject(..) even though hardware has sent the data on port. No byte is read in that 15ms.However if i increase the timeout to say 35ms in waitforsingleobject it works ok.
Can anyone please tell me why is this happening or what should i look for?
Thanks in advance
Last edited by LuciWiz : 07-Jul-2005 at 05:59. Reason: Please insert your C++ code between [c++] & [/c++] tags
|Thread Tools||Search this Thread|
|Rate This Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Graphic problem in Unreal Tournament 2004||zerox||Computer Software Forum - Games||10||09-Oct-2005 13:31|
|Please help! Socket problem||robsmith||C Programming Language||1||09-May-2005 02:03|
|Problem to read on a serial port||collinm||C Programming Language||2||30-Mar-2005 02:42|
|Problem with string and serial port||collinm||C Programming Language||13||25-Mar-2005 08:39|
|An ActiveX Control does not work in VB, what problem would that be?||mingcosp||MS Visual C++ / MFC Forum||0||19-Jan-2005 11:04|