Firmware: RUT9M_R_00.07.18.3
Hi, I have a weird issue that when issuing ubus call modbus_client.rpc serial.test jsons for writing a single number, the response is always
{
"error": 0,
"result": "OK"
}
but there is no write happening on the modbus device!
I have tried with both modbus_client enabled and disabled on the webui; I also tried disabling the uci modbus client with
uci set modbus_client.main.enabled='0'
but still no luck.
Any ideas how to troubleshoot this odd behaviour?
For reference here are the commands I’m using
- successful read command
ubus call modbus_client.rpc serial.test '{"id":204,"timeout":1,"function":4,"first_reg":1,"reg_count":"125","data_type":"hex","no_brackets":1,"serial_type":"/dev/rs485","baudrate":19200,"databits":8,"stopbits":1,"parity":"even","flowcontrol":"none","broadcast":1}'
- A commands that returns OK, but doesn’t write:
ubus call modbus_client.rpc serial.test '{"id":204,"timeout":1,"function":6,"first_reg":22,"reg_count":"1","data_type":"hex","no_brackets":1,"serial_type":"/dev/rs485","baudrate":19200,"databits":8,"stopbits":1,"parity":"even","flowcontrol":"none","broadcast":1}'
I have also tried the following variations:
"function":16
"data":['${value}']
"data_type":"16bit_int_hi_first"
Any ideas what to try next? Many thanks