I’m pretty new in balena and in coding in general. My project is to run a Modbus server in Python on a RevPI connect using balena to communicate in Modbus with other modules. I tried this code from “pyModbusTCP - the easy way to a Modbus TCP server with Python - YouTube” and it works but when I replace the IP by the IP of the RevPI it doesn’t work. Moreover in the RevPI there is 2 ethernet port with I think one IP adress for each one but one the balena board I can only one IP. My request is not very clear but if someone can help me on something it will be appricated.
Now print(server_ip_address) does not print 192.168.1.200 but gives an error
Can you please tell how i can made my modbus server to run at IP address of 192.168.1.200
ALso i am not able to see the logs correctly however the client side of the modbus connection is working perfectly. I could read and write without problem. Its only the server side where i can niether see the logs nor the correct IP
So we modified the resin-sample file in systems-connection balena image. We have assigned it the ipv4 address 192.168.1.200.
We just connected the modbus client
client =ModbusClient(host = “192.168.1.200”, port =12345)
and it worked