Modbus RTU not working on Revpi Connect S

I have a Revpi Connect S connected to an Inverter using its Rs-485 interface. I want to read some holding registers from the inverter . But everytime i try to read the registers, it gives me error saying the CRC is invalid.

i have tried many modbus clients but all of them give me the CRC error.

From kunbus’s official docs, its says that the RS-485 serial device is available at /dev/ttyUSB0

What is the problem?. I tried modbus simulation between the Revpi and a Laptop using USB to serial connector and it worked. Any help is appreciated!.

Edit: It doesn’t matter but i should i also mention that the RevPi has BalenaOS so i am accessing it via Balena Cloud’s Web Repl.

1 Like

Hello @Justaus3r first of all welcome to the balena community.

Could you please confirm that dev/ttyUSB0 is available in your service of the device? Modbus CRC errors are usually related with the serial connection.

Thanks!

Thank you for the quick response!.
Yes /dev/ttyUSB0 is available, see:
image

Hi @mpous Thanks for the support. To add to the question background, It is a shared Modbus network and there are other devices that could correctly read the holding registers from the inverter

@Justaus3r could you please confirm that the container that is trying to access the dev/ttyUSB0 has privileged access to it?

Thanks!

If you are talking about the privileged setting defined in docker-compose.yml for each service, then yes it is set to true.

1 Like

@Justaus3r Could you please confirm what OS and device type are you using? In the other hand, what software are you using to access to the modbus registers?

In the past I used to add the devices section in the docker-compose (e.g. below)

but if you say that you have access to the ttyUSB0 that’s not necessary!