NeuronRobotics / nrjavaserial

A Java Serial Port system. This is a fork of the RXTX project that uses in jar loading of the native code.
Other
345 stars 143 forks source link

Detect fifo buffer underrun #73

Closed TheNetStriker closed 4 years ago

TheNetStriker commented 8 years ago

Is it possible to detect fifo buffer overflows with this library?

The reason why I'am asking is because of the changes in this issue: https://github.com/NeuronRobotics/nrjavaserial/issues/36

I suspect that my OpenHAB server is loosing some ZWave events because of this. Is there a way to check how often the serial port buffer did overflow?

madhephaestus commented 8 years ago

The buffers are dynamic and should only "overflow" if your computer runs out of ram. I have pushed a steady 1Mbaud for days and days without any overflow on a ras pi. I would suggest using VisualVM to analyze your application's memory management because it sounds more like leaky memory than some buffer drop. If you are losing bytes in the serial stream, look at your physical layer and microcontroller code.

TheNetStriker commented 8 years ago

There should be more than enough free ram on my BeagleBone Black, but it seams to make a difference if I use the new or the old version of nrjavaserial. (Some of the ZWave values ar not loading with the new version) I will also discuss this in the OpenHAB forum after some more testing.

TheNetStriker commented 8 years ago

I forgot to ask, did you test this with the latest 3.12.0 version? (The issue was merged after 3.11.0 was released)

madhephaestus commented 4 years ago

stale closing