Modbus protocol C library. How can the slave/server change the registers?

Hey everyone,

I am using a C library to connect two devices via the Modbus protocol. A laptop the master/client and a Raspberry the slave/server. I can make all the requests from the Master, so I can manipulate and read all the registers and bits. The only problem is that I can't use the slave the Raspberry to change them without being instructed to from the master, so that the two devices can communicate. Do I need to modify the library to manually connect the registers to the I/O ports of my Raspberry?

Modbus library link:
https://github.com/stephane/libmodbus
 
Top