-
Notifications
You must be signed in to change notification settings - Fork 67
fix port event bug (EPROT-6) #130
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
base: main
Are you sure you want to change the base?
Conversation
|
这有什么冲突请问 |
Thank you for contribution and patience. In spite the fix looks simple and clear, but it may cause a serious issue with other configurations. This behavior depends on the configured priority of the Modbus tasks, user application tasks, and other system tasks, and also the setting of |
|
Please additionally send your sdkconfig file. Thanks. |
|
sdkconfig.txt |
|
According to log your sdkconfig is misleading (in the code the response time is 1000 ms in the sdkconfig is 5000 ms). I guess you override it in master. The situation is typical modbus race condition when you set the response time to 1000ms but your actual slave processing time is a bit longer 1012 ms. This causes the response comes from slave a bit later when the master starts next transaction and as a result the master drops the transaction because new one is started the next response is also will be discarded because during the actual transaction the master gets two responses from slave. In this situation the fix above is just local solution because with a bit changed settings and priorities if the slave respond a bit later the result will be the same. This is misconfiguration issue and if you don't change the Please read the important-configuration-aspects. As I said before the fix you proposed is just a local solution that may cause master to discard the first response (expired) but receive the second one. This may cause the situation when the actual response will be skipped instead. Since the master poll code is shared between all masters the fix is not safe and can cause the additional issues later. |
|
现在的参数配置确实是1000,见以下代码, mb_communication_info_t comm = { |
|
The line |
|
好的,我试试,谢谢 |
|
刚才试了下,.ser_opts.response_tout_ms = 2300,CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=5000以及CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=2000以及,仍然可以复现该问题,在出现这行代码之后就不行了,mb_object.master: 0x3fcb171c, drop data received outside of transaction. |
|
Could you send me debug log when the issue happens and if possible the communication traffic between master and slave? |
|
modbus_log.txt |
|
@zyk6271, |
|
请问有进展吗 |
|
Sorry for the late reply. I have many other activities and the response may take some time. Request: [08:52:54.544]收←◆02 03 00 00 00 15 84 36 This issue is clear for me. Your slave sends the wrong data outside of transaction at any time (FF FF FF FF, can be expired response from slave). This causes the |
|
@zyk6271 , Sorry for the late response. The workaround for the issue was implemented and should solve the issue you observed. |
|
Hi,
I will test later and let you know the result.
Thanks for your work,
Rick
***@***.***
From: Alex Lisitsyn
Date: 2025-10-06 16:55
To: espressif/esp-modbus
CC: 少年老王; Mention
Subject: Re: [espressif/esp-modbus] fix port event bug (EPROT-6) (PR #130)
alisitsyn left a comment (espressif/esp-modbus#130)
@zyk6271 ,
Sorry for the late response. The workaround for the issue was implemented and should solve the issue you observed.
The component v2.1.1 includes the fix.
It is recommended to wait the feature freeze of esp-idf for stable results.
Please let me know if you have any comments.
Thanks.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|


Description
Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following: