Skip to content

Conversation

@gregorschatz
Copy link

I'm working on a Device with not configurable echo on UART of RS485, and needed to implement an SerialServer, so I used

from pymodbus.server import StartSerialServer
StartSerialServer(context=context, framer=ModbusRtuFramer, identity=identity,
                  port='/dev/ttymxc0', stopbits=1, bytesize=8, parity='N', 
                  timeout=.5, baudrate=9600,
                  handle_local_echo = True)

and added a new named parameter handle_local_echo like it already exists in ModbusSerialClient to solve the mass of conflikts in framing and parsing the own responses like new requests.

@janiversen
Copy link
Collaborator

Please solve the CI errors, then I will review it.

self.timeout = kwargs.get("timeout", Defaults.Timeout)
self.device = kwargs.get("port", 0)
self.stopbits = kwargs.get("stopbits", Defaults.Stopbits)
self.handle_local_echo = kwargs.get("handle_local_echo", Defaults.HandleLocalEcho) # handle_local_echo: bool = None ; handle_local_echo: bool = Defaults.HandleLocalEcho,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the comment it is confusing.

parity=self.parity,
stopbits=self.stopbits,
timeout=self.timeout,
# handle_local_echo=self.handle_local_echo,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should this mean ?

@janiversen
Copy link
Collaborator

Well I had a bit of time left, so wanted to give a hand with your errors, but you have not permitted that maintainers change the PR, so I cannot help you.

@janiversen janiversen mentioned this pull request Nov 11, 2022
@janiversen
Copy link
Collaborator

Closing this commits with committer id are moved to #1186, allowing us to modify the PR.

For future PRs please tick "allow maintainers to update", it makes life a lot simpler.

Thanks for the PR, it makes a lot of sense, hoping to see more PRs from your hand, and good luck with your device.

@janiversen janiversen closed this Nov 11, 2022
@gregorschatz
Copy link
Author

Thanks and sorry , I haven't made many pull requests yet, next time I will check Allow edits and access to secrets by maintainers.

@janiversen
Copy link
Collaborator

No problem, every beginning is difficult which is why we try to help. There are a lot to do in this project so feel free to submit more PRs, I am here if you need advice,
.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants