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
My application runs in a Debian VM and communicates with a few RTU slaves through the MikroTik KNOT TCP/RTU gateway (running RouterOS 7.14beta3 or later, as older versions have a bug, missing last byte of response when reading two registers and 2nd byte of response CRC is zero). When that device is rebooted, my application stops working until restarted.
Actual behavior if applicable
After the TCP connection is broken (by the TCP/RTU gateway reboot, network issues etc.), each subsequent modbus_read_registers / modbus_read_input registers returns with EPIPE (Broken pipe) error. To recover, the application needs to be restarted - even though it does use modbus_set_error_recovery(ctx, MODBUS_ERROR_RECOVERY_LINK | MODBUS_ERROR_RECOVERY_PROTOCOL) on startup.
Expected behavior or suggestion
Reconnect to the TCP/RTU gateway automatically, without need to restart the application.
Steps to reproduce the behavior (commands or source code)
Read any registers from some RTU slave(s) through a TCP/RTU gateway repeatedly in a loop, works fine for some time, then reboot the gateway, no longer works and never recovers from the "Broken pipe" error, the application needs to be restarted.
The text was updated successfully, but these errors were encountered:
libmodbus version
3.1.6-2.1
OS and/or distribution
Debian 12.4
Environment
x86-64
Description
My application runs in a Debian VM and communicates with a few RTU slaves through the MikroTik KNOT TCP/RTU gateway (running RouterOS 7.14beta3 or later, as older versions have a bug, missing last byte of response when reading two registers and 2nd byte of response CRC is zero). When that device is rebooted, my application stops working until restarted.
Actual behavior if applicable
After the TCP connection is broken (by the TCP/RTU gateway reboot, network issues etc.), each subsequent modbus_read_registers / modbus_read_input registers returns with EPIPE (Broken pipe) error. To recover, the application needs to be restarted - even though it does use modbus_set_error_recovery(ctx, MODBUS_ERROR_RECOVERY_LINK | MODBUS_ERROR_RECOVERY_PROTOCOL) on startup.
Expected behavior or suggestion
Reconnect to the TCP/RTU gateway automatically, without need to restart the application.
Steps to reproduce the behavior (commands or source code)
Read any registers from some RTU slave(s) through a TCP/RTU gateway repeatedly in a loop, works fine for some time, then reboot the gateway, no longer works and never recovers from the "Broken pipe" error, the application needs to be restarted.
The text was updated successfully, but these errors were encountered: