# Modbus RTU not working on Revpi Connect S

**URL:** <https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657>\
**Category:** balenaOS\
**Tags:** modbus\
**Created:** [December 18, 2024, 10:20am UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657 "2024-12-18T10:20:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justaus3r](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Justaus3r](https://forums.balena.io/u/Justaus3r)\
**Post date:** [December 18, 2024, 10:20am UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657/1 "2024-12-18T10:20:39Z")

</div>

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.

 ![image](https://global.discourse-cdn.com/balena/original/2X/6/6b64553013bce6019559d42985235cd4ba995ca6.png)

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.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [December 18, 2024, 11:51am UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657/2 "2024-12-18T11:51:20Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Justaus3r](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Justaus3r](https://forums.balena.io/u/Justaus3r)\
**Post date:** [December 18, 2024, 11:53am UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657/3 "2024-12-18T11:53:49Z")

</div>

Thank you for the quick response!.  
Yes `/dev/ttyUSB0` is available, see:  
 ![image](https://global.discourse-cdn.com/balena/original/2X/4/4ac08074f5c8f4c724bdf538332818c7a20ec90e.png)

---

<div class="post-metadata">

**Author:** ![amr](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@amr](https://forums.balena.io/u/amr)\
**Post date:** [December 18, 2024, 11:56am UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657/4 "2024-12-18T11:56:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [December 18, 2024, 12:43pm UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657/5 "2024-12-18T12:43:25Z")

</div>

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

Thanks!

---

<div class="post-metadata">

**Author:** ![Justaus3r](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Justaus3r](https://forums.balena.io/u/Justaus3r)\
**Post date:** [December 18, 2024, 2:15pm UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657/6 "2024-12-18T14:15:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [December 19, 2024, 10:13am UTC](https://forums.balena.io/t/modbus-rtu-not-working-on-revpi-connect-s/372657/7 "2024-12-19T10:13:50Z")

</div>

@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)

> <https://github.com/mpous/ming/blob/bcca651aa3138c35bf9faafa5824144e5c053355/docker-compose.yml#L50>

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