Conversation
|
Added error value |
frzifus
left a comment
There was a problem hiding this comment.
Does it make sense to limit the amount of retries and to introduce a break between the retries?
|
@frzifus Yes, that is what I was doing as a sub-optimal measure. But I think it would be preferable to actually follow the specifications. The problem arises when the traffic is high. Any thoughts? |
|
Hi @decadenza! Please excuse the late reply here, I hope you're still around! I really like your suggestion here, but I have a question left: |
|
Hi. As an alternative, the user has to fire a re-attempt, but it looks more logical to use the timeout parameter that is already part of the library. What do you think? |
|
@decadenza sorry again for the late reply, if you're still around, please resolve the conflicts and then I’ll review this PR 👍 |
|
It's been long time since I last used this. The conflict was only caused by the addition of |
Due to noise/interference on the serial line (separate problem), I was having errors like:
And so on.
My system has only one slave with id 1.

I came across this issue on a different repository.
As I understand it, Modbus protocol specifies that master should manage the "unexpected slave" and wait for the correct one for the specified timeout setting.
Checking the code I realised that the client was not waiting for the correct timeout before throwing the error.
With this simple change my error rate has reduced, and when it happens the correct "timeout" error is given.