Hi, I’m using the RUT956 as a modbus client to get some information from a device via modbus rtu and rs485.
Configuring the task in the webUI works as expected, but i need to add some steps to the process so I’m using the cli to get it done. However when I call the command: ubus call modbus_client serial.test '{"id":1,"timeout":30,"function":3,"first_reg":23297,"reg_count":"1","data_type":"32bit_uint1234","no_brackets":1,"serial_type":"/dev/rs485","baudrate":9600,"databits":8,"stopbits":1,"parity":"even","flowctrl":"none"}'
I got Coomand failed. Request timeout.
I had the opportunity of testing this command with the RUT955 on the cli and it works.
The firmware of the device is RUT9M_R_00.07.07.3 2024.06.25. I’m aware there is a newer version but unfortunately the latest firmware won’t let me install python pip module and as a result of this, no module at all.
I have tested pulling modbus data on 7.07.3 version and it worked as expected. As per checking, your command has the correct format. You just need to match the options in your request. First, try to configure modbus client in WebUI. Check if it is appearing using test button. Then, access the CLI and run uci show modbus_client. Cross check if it has similar options with your ubus command especially parity and baudrate.
Hi, I already tested and check each parameter, tested the comunication with another device different from the RUT956 and validated request response.
I also tested through the webUI and the request was succesful
Here i attach the proof of the behaviour I’m getting:
Can you provide a screenshot of modbus serial configuration and successful request for further troubleshooting? As I tried to do the same with my device but with no errors. (Note: I turned off instance before requesting via CLI)