Make sure that the Serial Input Buffer Size is adequate for your application. It is 128 bytes by default. If a greater number of bytes that the buffer size are sent and your application does not read them in time then the buffer can fill and data will be lost.
// display the current buffer size
System.out.println("auxSerialPort.getInputBufferSize(): " + auxSerialPort.getInputBufferSize());
// set the new buffer size
auxSerialPort.setInputBufferSize(256);
// display the new buffer size
System.out.println("auxSerialPort.getInputBufferSize(): " + auxSerialPort.getInputBufferSize());
The output should look as follows.
auxSerialPort.getInputBufferSize(): 128 auxSerialPort.getInputBufferSize(): 256
Real-Time Mon - Fri, 8am - 4pm EST P: 724-933-9350 PureChat |
Always Available Contact Form sales@integpg.com support@integpg.com |
![]() ![]() |