pymodbus icon indicating copy to clipboard operation
pymodbus copied to clipboard

Fragmented TCP messages are not handled correctly

Open andersjohnsen opened this issue 4 years ago • 6 comments

As seen here

https://github.com/riptideio/pymodbus/blob/c5772b35ae3f29d1947f3ab453d8d00df846459f/pymodbus/framer/socket_framer.py#L160

if a modbus TCP packet is split between two or more fragments, the frame will be reset in between and will thus fail parsing. As TCP is a fully streaming protocol that supports splitting and merging data at will, this is leading to unreliable behavior. Simply removing the resetFrame call (and perhaps the log?) appears to fix the issue.

andersjohnsen avatar Jan 18 '22 08:01 andersjohnsen

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Feb 18 '22 02:02 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Feb 23 '22 02:02 github-actions[bot]

I'm not sure why this issue has been closed prematurely, this is a substantial bug in the Modbus TCP implementation.

Jon-Salmon avatar Mar 15 '22 09:03 Jon-Salmon

This is caused by a bot, which is closing issues, if no activity happens on this issue. Will reopen it.

swamper123 avatar Mar 15 '22 09:03 swamper123

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 16 '22 02:04 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 17 '22 03:05 github-actions[bot]