Rut956 and rut230 edit modbus via cli

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,