• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Better control than MSComm available?

Using MSComm for serial communications is unreliable.  What works once doesn't work later.  Receiving text messages, 3 different fixed lengths, over 6 serial ports using 6 MSComm controls.  Much better after implementing the suggestions for my previous question, but still wierd.  Text is terminated by CrLf, works pretty good, but won't work 24/7.  Tried changing to EOF termination and looking for comEvEOF.  Worked first time, then only once in a while.  I can't see any reason for whether it works or not.  I have heard there are other comm controls available from 3rd party vendors, but don't know what to look for or where.
1 Solution
It's been a long time, but one thing I seem to remember is that before I expected to start receiving my comm input, I'd do something to clear out the buffer in case there was any junk or noise there.  Then, if you have received messages, and you think you're done, then, before you use it again, flush the buffer once again before receiving the data.
Chandramouli kArchitectCommented:
I have reliable comms with double buffering...
MSComm doesn't guarantee to deliver messages based on your CRLF protocol - hence you need to buffer messages to comnpensate for incomplete strings, then scan for a delimiter (your vbCR)... then process the substring... etc.

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to mcoop
Please leave any comments here within the
next seven days.
Just an aside...
there seem to be a LOT of messages (since the EE upgrade - unrelated) that get left unresolved - or worse, the thread runs for a while with valuable feedback - then the original person says 'thanks' and walks away.. using their free points to ask a question, then not bothering to 'make a decision'

per recommendation

Community Support Moderator @Experts Exchange

You make a good point there.  This is why the cleanup volunteers such as twalgrave add a lot of value to the process.  They get the moderators to look at these questions and force a decision on way or another.  Many times during the cleanup process either an expert or a moderator can see these abandoners and be able to deal with them.  If you have an idea on how to prevent this, please post a zero-point question in Community Support/Suggestions, we'd love to hear it.  If you'd like to volunteer to assist with the cleanup process, we'd love that too, just drop a line here.
I guess one way to get a profile - would be to maintain a list of IP addresses that each member connects from (or better the MAC addresses and/or system signature collected with a java client)... then it would be relatively easy to keep a tab on those members that abuse the process, or are chronically lazy.

Then the cleanup process could be largely unnecesssary - perhaps not 'barring them 'per se', but ignoring them when they try to come in multiple times under a different alias from the same system - with  a bad history.

I've seen countless twerps signup for the 'free points' then use them all on one question to get a high profile, and walk away with the answer - come in again next week as another user...

I think if EE polled their regular 'experts' you would see a trend towards individuals becoming less involved...  largley because of this - but also unfortunately due to the string of server  and site problems a few months ago.

I've thought about helping in the cleanup, but as I'm self-employed, I may not be able to offer the attention required... let me knw what's nvolved - glad to help if I can.
Thanks for getting back with me. We do need a few more processes in place to find those people out, but with the recent and constant rewrites, it falls to the bottom of the list.  I encourage you to post a question in Community support if you suspect dual identities.  Dual identities are stopped when we find them as they are against the membership agreement.  

As far as cleanup goes, it's a pretty simple process. It is well explained in the following link - read over and post inside if you're interested in helping.  Some cleanup volunteers do 50 questions every couple of weeks (about an hours worth of time once you get the steps down) while others can give us 100 questions a day, all help is very much appreciated:

I apologize in advance for the amount of "fluff" in there, but these cleanup volunteers and moderators need a sense of humor to keep them going.  You'll see that we need the help, but there are some definite rules and the moderators will want to "approve" you first, but it's a good thing.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now