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

No support for RTU over TCP? #2607

Closed
silvioporto opened this issue Mar 14, 2025 · 4 comments
Closed

No support for RTU over TCP? #2607

silvioporto opened this issue Mar 14, 2025 · 4 comments

Comments

@silvioporto
Copy link

Did support for the FramerType.RTU_OVER_TCP get dropped? The documentation still says "support all standard frames: socket, rtu, rtu-over-tcp, tcp and ascii", but the only options in the FramerType class are "socket, rtu, ascii, tls".

@janiversen
Copy link
Collaborator

janiversen commented Mar 14, 2025

Try to read the documentation, that helps.

please add a url reference to where you found that doc, because it surely not pymodbus, since you miss an important framer.

Framertype.rtu with a tcp client, is magically rtuovertcp.

@janiversen
Copy link
Collaborator

Closing as pymodbus support the rtu_over_tcp protocol (not as a separate framer though, which is not needed).

@silvioporto
Copy link
Author

silvioporto commented Mar 14, 2025

I was referring to the "Common features" section in https://pymodbus.readthedocs.io/en/latest/ and also the "Client protocols/framer" table in https://pymodbus.readthedocs.io/en/latest/source/client.html. The way those are described made me think that there was a dedicated FramerType class for the RTU_OVER_TCP. I had tried to use a TCP client with the FramerType.RTU but didn't have any success, the way that the RTU over TCP frame is described (like here for example wasn't: https://www.fernhillsoftware.com/help/drivers/modbus/modbus-protocol.html#modbusRTUOverTCP) wasn't what I got with the TCP client with RTU framer, it didn't include the header with TID, PID, length that this website described. Thanks for the clarification though, the library is great, i'll keep trying.

@janiversen
Copy link
Collaborator

janiversen commented Mar 14, 2025

Well you did not read the header it says "protocol" not framerType.

TID, PID is not part of the RTU protocol nor RTU_OVER_TCP (as this is identical to RTU, just another transport).

Seems you have a misunderstanding of the standard, TID/PID is part of the socket protocol.... so either you need TID/PID and use framertype.socket or not and use framertype.rtu.

I suggest you read about "rtu over tcp" in the modbus standard, it a better starting point that a vendor specific documentation. The documentation is not modbus standard.

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

2 participants