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
{{ message }}
Repository navigation
rtu.send_message should not read more bytes than needed. #49
Currrently rtu.send_message() is to greedy when reading response from the serial port. uModbus will fail when a server appends a response with for example a few nul bytes. The function should not read more bytes than needed.
Often the length of the response can be calculated. For response on function codes 1, 2, 3, 4,15 and 16 the 2nd byte of the PDU contains the byte count. That is how many bytes are left in the PDU.
The response of function code 5 en 6 is of the same length as the request PDU.
Activity
Untested to only read back what was requested
Fix clients being to greedy when reading response