root@RUT901:~# ubus call modbus_client.rpc tcp.test '{"id":1,"timeout":10,"function":1,"first_reg":1,"reg_count":"1","data_type":"bool","no_brackets":1,"ip"
:"192.168.2.175","port":"502","delay":0}'
{
"error": 0,
"result": "5"
}
root@RUT901:~# ubus call modbus_client.rpc tcp.test '{"id":1,"timeout":10,"function":1,"first_reg":1,"reg_count":"1","data_type":"bool","no_brackets":1,"ip"
:"192.168.2.175","port":"502","delay":0}'
{
"error": 0,
"result": "6"
}
root@RUT901:~# ubus call modbus_client.rpc tcp.test '{"id":1,"timeout":10,"function":1,"first_reg":1,"reg_count":"1","data_type":"bool","no_brackets":1,"ip"
:"192.168.2.175","port":"502","delay":0}'
{
"error": 0,
"result": "7"
}
root@RUT901:~# ubus call modbus_client.rpc tcp.test '{"id":1,"timeout":10,"function":1,"first_reg":1,"reg_count":"1","data_type":"bool","no_brackets":1,"ip"
:"192.168.2.175","port":"502","delay":0}'
{
"error": 0,
"result": "8"
}
root@RUT901:~# ubus call modbus_client.rpc tcp.test '{"id":1,"timeout":10,"function":1,"first_reg":1,"reg_count":"1","data_type":"bool","no_brackets":1,"ip"
:"192.168.2.175","port":"502","delay":0}'
{
"error": 0,
"result": "9"
}
Hello,
Starting from recent firmware versions (>7.13), there was a change in the usage of the ubus modbus command, and it’s now recommended to use the API calls for reading Modbus register data.
However, there’s a known workaround method involving two ubus calls that you can use to achieve similar functionality. This workaround has been outlined in the topics here:
Best regards,
much appreciated …
Made an update to version 7.14 and the command seems to be working okay now. not sure if its a glitch or a turn made in the newer version
Thank you for the update and taking a deeper look. It indeed seems to be working on 7.14 as on previous (<7.13) firmwares.
Kind regards,
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.