0

Hi boys and girls,

I use at-commands through the comport. The problem is if I send "get everything" to the comport the output is about 30 lines of text in under a second. The c# comport listener is only able to capture about 2 of these lines due to the fast output from the comport.

How do I ensure that I get all 30 lines captured by the listener...and slowing the BAUD rate is not going to help me.

Kind Regards
Krefie

2
Contributors
3
Replies
8
Views
3 Years
Discussion Span
Last Post by Ketsuekiame
0

You need to bypass the event listener and construct your own loop code that reads from the port. The problem is that the event you have won't fire fast enough.

Essentially you just need a tight while loop and check for data coming in.

0

I did think of this, guess I wil have to give it a try.

Was looking for some other solutions aswell...maybe register more than one event listener

Thnx

0

Unfortunately that wouldn't fix anything.

Is the problem that your buffer is filling up too quickly or that when you get the read there is only 2 lines available and the rest comes after?

If it's the former, you need an external tight loop that also checks whether data is available. For the latter, you can continue to use the event, however, your loop will need to be inside.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.