Hello everyone,
I’m having issues using UCI commands to configure the Modbus TCP server on the RUT200. I successfully completed this process once without errors, but now I can’t replicate it.
These are the UCI commands I’ve used so far:
"opkg update",
"opkg install modbus_server",
"uci set modbus_server.modbus.enabled='1'",
"uci set modbus_server.modbus.timeout='5'",
"uci commit modbus_server"
Then, I reboot the device. I’m not sure if the last command (commit
) is required, but it shouldn’t be a problem either.
The issue is that I also need to enable remote access. According to this forum post, I should use the following command:
uci set firewall.20.enabled='1'
However, I get an error because that rule doesn’t exist, even though it should. Also, when listing the UCI configuration, I get:
~ uci show modbus_server
modbus_server.modbus=modbus
modbus_server.modbus.keepconn='1'
modbus_server.modbus.enabled='1'
modbus_server.modbus.timeout='5'
Previously, I used to get:
So, I suspect something is not being configured correctly, but I’m not sure what.
If I access the WebUI, go to Services > Modbus > Modbus TCP Server, and click Save and Apply, all the missing UCI commands appear. However, I need a solution using only UCI commands (if possible).
Thanks in advance!