Writing to custom modbus register not stored in /tmp/regfile

I have succesfully set up custom modbusregisters in my RUT241 eSim model (start address 1025, length 32). I write a value to /tmp/regfile and can succesfully get value in response by publishing 0 65432 0 127.0.0.1 502 5 1 3 1025 8 to the /request topic.

However i was expecting a write request (i.e. 0 65432 0 127.0.0.1 502 5 1 6 1025 111) to put 111 in /tmp/regfile, but i don’t see anything coming in /tmp/regfile, while i do get the response 65432 OK.

Should modbus writes to custom registers show up in /tmp/regfile?

Hello,

Your provided MQTT publisher’s write request should indeed put the decimal value 111 into the custom block’s first register (1025). However, this change will not be displayed in /tmp/regfile.

To verify whether the correct value was successfully written to register 1025, you can check using a Modbus Client or QModMaster software. In brief, numeric values written to a custom Modbus register via an MQTT publisher will not be reflected in /tmp/regfile.

More useful information regarding custom modbus register block can be found here.

Best regards,

Many thanks, that explains it.

I was trying to accomplish enabling and disabling a certain vpn profile by reading the modbusregister 1025 through a script. My Rut241 eSIM does not have apt-get installed so i cannot install ruby and the modbus-cli package. I was trying to circumvent that by reading a custom modbus register in /tmp/regfile, but alas, not possible. I also tried Event Juggler, but ‘modbus’ or reading a modbus register is not an action type.

If any other way to activate a vpn profile based on a modbus register value is possible (with added usage of scripts) i would like to hear about it :slight_smile: