-
Notifications
You must be signed in to change notification settings - Fork 986
Server not handling garbage byte after frame #2664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sounds like a bug, the frame with the 0x0 should be discarded, let me have a look. |
Side question. Where is the best place to add a unit test for this such that raw bytes can be injected into the framer and pdu? I saw separate tests for each, but could not determine if there was an integration of both somewhere which is more inclusive. It was hoping to improve diagnosis and contribute in the future. Thanks. |
side response: in the test framework Framer is responsible for delivering a pdu, so bad bytes are part of the framer. |
Verified bug on v3.9.2 and on dev. |
Co-authored-by: Beau Herger <[email protected]> Co-authored-by: jan iversen <[email protected]>
Thanks for creating and maintaining this package.
We are using a
ModbusSerialServer
withPython 3.11
andpymodbus==3.9.2
.One of the connected clients is throwing a stray
0x0
at the end of messages occasionally. We suspect this is happening when it resets, but this is out of our control. The server does not deal with this effectively and an exception in throw.The "bad" message is not discarded and when the client starts polling again the buffer keeps filling up and the problem compounds to the point where the server is constantly throwing this exception as well as
Frame check failed
warnings and it has to be restarted.The text was updated successfully, but these errors were encountered: