Rut956 and rut230 edit modbus via cli

Hi,

I am learning with the modbus protocol and will need to edit the rules via the CLI. Please. can you advise me on the basic commands for editing, writing the registry. adding registry and so on

thank you

Hello,

When it comes to configurations, including Modbus, you can change those using UCI commands. For example:

# view settings
uci show
uci show modbus_client

# set configurations
uci set modbus_client.1.period='10'

# after setting the configurations, you need to commit changes
uci commit

# after commiting, you need to restart the relevant service
/etc/init.d/modbus_client restart

In case you are looking to sent Modbus requests directly from the CLI/SSH, you can use UBUS commands:

ubus -v list modbus_client
ubus call modbus_client tcp.test '{...}'
ubus call modbus_client serial.test '{...}'

For more information about these commands, I suggest taking a look at these forum posts here and here. However, please keep in mind that in the newest firmware the services were renamed, and thus, Modbus Master and Slave are now named Modbus Client and Server, respectively.

Kind Regards,

Thank you, that’s what I needed

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.