Skip to content
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

RTU Server periodically only interprets the first byte of a request. #171

Open
DominiqueMeus opened this issue Sep 9, 2022 · 0 comments

Comments

@DominiqueMeus
Copy link

Hello,

I am running the rtuslave_example.py at 19200 bps to test a modbus master. Everything functions nicely except that periodically the RTU Server/slave interprets the first byte (slave id) as a complete packet and then complains about a CRC error.

I was able to patch this issue for my own testing by adding a time.sleep(0.001) in the _do_run function after the first blocking serial read (line 271) in modbus_rtu.py. However this function should probably be refactored so that it waits for another byte before it starts to parse a response.

I don't have the time to fix this myself but hopefully this can get patched or it will help someone with a similar problem.

Regards, Dominique

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant