You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should check using another tool (with the same serial port settings) that the device really doesn't send zeros, just to be sure (especially because a non-zero byte 0xFC has been received as well).
This readBytes() method is a very "core" one, I use it in my app without problems (although with TIMEOUT_READ_SEMI_BLOCKING mode, using an older library version 2.10.2).
(Otherwise, I see no problem in your code, the reading loop is almost the same as in the offical example.)
The method
<serialPort>.readBytes(byte[] buffer, int bytesToRead)
wont fill the byte array.Version:
2.11.0
Sample
Output
The text was updated successfully, but these errors were encountered: