simonvetter / modbus

Go modbus stack (client and server)
MIT License
274 stars 88 forks source link

Modbus RTU Server #45

Open thegreatco opened 4 weeks ago

thegreatco commented 4 weeks ago

I need a library that can act as a server for Modbus RTU over RS-485. I already use this library for a Modbus client over RS-485. If I implement the server functionality for this library and submit a PR, are you open to reviewing and (hopefully) merging it?

simonvetter commented 3 weeks ago

Hi Pete,

thanks for your interest and offer!

Sure, go ahead and feel free to open a PR. I still have incoming changes that I've been meaning to merge for ages (e.g. file records) but I haven't been able to find time to work on this project lately, so don't expect a prompt review/merge though.

I remember digging into an RTU server implementation a few years back. One of the main issues was that because RTU has no proper framing, it must observe silence times to decide when the end of frame has been reached, and the serial library I've been using up to now isn't well suited to do that.

I've been able to work around that for the client part but the server will definitely need to handle it.

Happy to see someone else giving it a stab :)