Yigal123
asked on
MScomm is missing events
Hello,
I have C++ Application using MScomm control with 300 baud-rate External Modem connected to external device.
Our device send message every 20 seconds, when PC receives the message it replay with Acknowledge .
Problem description,
MScomm is not firing event for every message send by our device, sometimes it take 2 to 4 messages until MSComm fire event,
When getting the input buffer I see all the messages in MSComm buffer (few messages).
The qeustion is why MScomm is not fire event for each message ? instead it keep few messages and then fire event to all of them.
My App. settings
m_comm.SetInBufferCount( 0 );
m_comm.SetRThreshold(1);
m_comm.SetInputLen(0);
m_comm.SetRTSEnable(TRUE);
I have C++ Application using MScomm control with 300 baud-rate External Modem connected to external device.
Our device send message every 20 seconds, when PC receives the message it replay with Acknowledge .
Problem description,
MScomm is not firing event for every message send by our device, sometimes it take 2 to 4 messages until MSComm fire event,
When getting the input buffer I see all the messages in MSComm buffer (few messages).
The qeustion is why MScomm is not fire event for each message ? instead it keep few messages and then fire event to all of them.
My App. settings
m_comm.SetInBufferCount( 0 );
m_comm.SetRThreshold(1);
m_comm.SetInputLen(0);
m_comm.SetRTSEnable(TRUE);
ASKER
Is there more experts that experience the problem as I described and can advice there way of solving the problem ?
If you want to follow up on the idea of using the API directly, here's an how-to I've found:
http://www.robbayer.com/files/serial-win.pdf
Here's just one example of some of the things you can find if you google "problems with MSComm control": http://comm32.com/mscomm32.html
I wish I could be specifically more help, but I don't have extended experience attempting to utilize the com ports... just one major program I tried to write in VB years ago that was a dismial failure at staying active over long periods of time trying to use MSComm
http://www.robbayer.com/files/serial-win.pdf
Here's just one example of some of the things you can find if you google "problems with MSComm control": http://comm32.com/mscomm32.html
I wish I could be specifically more help, but I don't have extended experience attempting to utilize the com ports... just one major program I tried to write in VB years ago that was a dismial failure at staying active over long periods of time trying to use MSComm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My solution is the one that solve the problem.
While there are not many people I've personally known that needed Comm interfaces in a professional setting, but those I have known have all avoided MScomm control and just learned to access the ports directly with the API.