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

MODBUS broadcast request (slave ID: 0) leaves system in illegal state with the error "receive buffer initialization fail." #45

Open
BestBot7 opened this issue Apr 5, 2024 · 0 comments

Comments

@BestBot7
Copy link

BestBot7 commented Apr 5, 2024

I tried to send the modbus broadcast request i.e; slave id = 00, using the sample code of esp-idf modbus. the master sends the request and enters into an illegal state as shown in the figure and does not allow any further requests until reboot. As per the MODBUS protocol standard, the slave only receives request and processes it but doesn't respond since it is the broadcast request. But the freemodbus is making the master enter into illegal state. What is the exact problem for this error of modbus master entering into an unknown state? I suspect that the master is checking the port for any packet received from slave end. Since there is no packet on the port, it gives this error "receive buffer initialization fail." But the master goes into unknown state even without connecting to any slave. The log images of both modbus master and slave are attached for reference. Let me know the issue and ways to fix it.

MODBUS Master logs with broadcast request:

image

MODBUS Slave logs:

image

Thanks in advance!

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