pablofsmelo
I'm trying to connect a Modbus client to OpenPLCV3 but I'm having difficulties. There appears to be a permission error on the connection socket. As I use both on my Raspberry  (V2 and V3) to compare the tests, I eventually have problems with the server's runtime. I always use some command to kill that port and everything works fine.

When I connect my Modbus Client to OpenPLC v2, I can connect perfectly. Using this same client to connect to V3, I can not establish the connection. It is worth mentioning that v2 and v3 are not running simultaneously, this is, time I test with one version, time with another. I have already tried to kill the server's execution port, Modbus port, re-install all packages from scratch and test another Modbus client, but I did not succeed.

Can you tell me if Modbus is working perfectly for Raspberry PI in OpenPLC version 3? If so, what could be happening?

Thank you.
Quote 0 0
thiagoralves
It should work better on v3 actually. The code is much more polished. What is the error you’re getting?
Quote 0 0
pablofsmelo
Here is the error
Quote 0 0
thiagoralves
It looks like you're running v3 without sudo (root) permissions. Linux OS forbids any application to open any socket below port 1024 if they're not running as root. If you don't want to elevate OpenPLC v3 permissions, just go to settings and change the port to 5020 (instead of 502).
Quote 0 0