I am checking the return code every time, and this can run for many minutes without any issue. Every now and again though, I get a return code of -1 and errno is set to the strange value 112345691 (0x06b2425b). I haven't found this value in the code, and it's consistently always this specific value.
I've checked to make sure I'm not calling anything between the libmodbus call and the return value/errno check.
I'm running this on osx 10.15.7 with libmodbus 3.1.6 from homebrew. I also don't see anything weird in a tcpdump capture of the traffic on that network port.
I have a simple C program which opens a connection to a device and then rapidly (every 20msec) issues
modbus_read_registers(mb, 9, 8, buf); modbus_write_registers(mb, 5, 2, buf);
I am checking the return code every time, and this can run for many minutes without any issue. Every now and again though, I get a return code of -1 and errno is set to the strange value 112345691 (0x06b2425b). I haven't found this value in the code, and it's consistently always this specific value.
I've checked to make sure I'm not calling anything between the libmodbus call and the return value/errno check.
I'm running this on osx 10.15.7 with libmodbus 3.1.6 from homebrew. I also don't see anything weird in a tcpdump capture of the traffic on that network port.