Hi,
It is not hack. This is the correct way of 25 bytes reading: check if there are 25 bytes in the buffer than read it. 
Then you misunderstoofd the problem:
- at time 0.0 I wait until there are 25 bytes to read
- when there are 25 bytes I read them, then I wait 3.0 seconds
- then I check if there are 25 bytes available and read them
But since a fast device delivers every 1.7 seconds 25 bytes, the LineBuffer hast after 17 seconds 250 bytes and I read only 125 of them. So bit by bit I am drifting off the actual measurement bytes of my device.
What I need is this:
- at time 0.0 I wait until there are 25 bytes to read
- when there are 25 bytes I read them, then I wait 3.0 seconds
- then I check if there are 25 NEW bytes available from the device
The bytes I read are measurement values and I need the most recent bytes.
So maybe when i cannot turn off the LineBuffer, I can at least read the last 25 bytes of the LineBuffer?