serialib icon indicating copy to clipboard operation
serialib copied to clipboard

Error reading bytes

Open Dom-Cantrill opened this issue 3 years ago • 1 comments

I'm calling serial.readbytes() and it will always return -2, indicating an error reading the data. Is there any way to diagnose this further. The data appears in other applications that can read serial data, such as putty, so it's purely a library issue. Opening the port works fine.

Dom-Cantrill avatar Jun 22 '22 20:06 Dom-Cantrill

Hi, that's weird, are you on Linux or Windows ?

You can add a break point in the library (.cpp) at line 648 on Linux or 631 on Windows. It's probably because data are not received or port is not properly opened, but you already says it's fine. If you copy your code here, it will be easyer.

imabot2 avatar Jun 30 '22 08:06 imabot2