Home/Support/Support Forum/Flush serial buffer?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Flush serial buffer?

0 votes
I am working with an application to allow multiple TCP/IP clients to connect to the DigiME, sending/receiving data from a single serial server on the other side.

The TCP clients send requests for status information from the server on the serial side. Periodically the TCP client will only receive back a partial response. Not until the next request is sent do I get back the tail end of the response in addition to the following response.

The application has a thread which does the read() of the serial port, a thread for each TCP client, and a seperate thread to handle add/delete of clients. The serial port is running at 19200 baud, 8N1. I have tried different flow control settings, and functions like tcflush and tcflow with no change in behavior.

Any ideas what might be going on here or what else I could try? I can provide code snippets for anyone willing to take a look. Anyone else have a sample app that provides the same funtionality? (multiple TCP clients)
Thanks.
asked May 8, 2006 in NET+OS by maxp New to the Community (1 point)
recategorized Dec 18, 2013 by tuxembb

Please log in or register to answer this question.

1 Answer

0 votes
It may also be of interest to note that I'm not dealing with large messages here. Requests are 4 bytes, and responses are 14 bytes, and always seem to "hang", after the first 4 bytes.
The rate at which I send these requests does not seem to affect the behavior.
answered May 8, 2006 by maxp New to the Community (1 point)
...