# Getting started with RevPi Core and Balena OS

**URL:** <https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351>\
**Category:** Product support\
**Created:** [February 8, 2021, 4:05pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351 "2021-02-08T16:05:08Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![savnik](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@savnik](https://forums.balena.io/u/savnik)\
**Post date:** [February 8, 2021, 4:05pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/1 "2021-02-08T16:05:08Z")

</div>

I have tried creating a balena application with the code in this repo: [GitHub - balena-io-playground/revpi-core3-test](https://github.com/balena-io-playground/revpi-core3-test)  
First i have flashed the RevPi Core 3 with balena os 2.31.5Rev2.  
Then i have put the config.rsc in the balena boot partition root folder.  
The device is booted and online in balena. When accessing the terminal of the container I cd into `piControl/piTest`.  
In this folder I run following command to turn on the status LED A1 with red as explained here: [Revolution Pi : Tutorial 00 EN - Quickstart - YouTube](https://www.youtube.com/watch?v=awJ5oGReG8E) (6:39min).

`./piTest -w RevPiLED,2`

The result is failing silently:

![](https://global.discourse-cdn.com/balena/original/2X/3/30fca1fcbaac78044efead4f0ad8aef4093bbb87.png)  
The Status led is not changed.

Running `./piTest -d` shows the connected devices with success.  
Any suggestion on how to debug this problem?

---

<div class="post-metadata">

**Author:** ![robertgzr](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/robertgzr/32/1387_2.png) [@robertgzr](https://forums.balena.io/u/robertgzr)\
**Post date:** [February 9, 2021, 2:38pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/5 "2021-02-09T14:38:25Z")

</div>

Hi, did you see [Kunbus Revolution Pi RevPi Core 3 and DIO module - #9 by mcomisso](https://forums.balena.io/t/kunbus-revolution-pi-revpi-core-3-and-dio-module/36197/9)  
can you check the last post there to see if it helps?

---

<div class="post-metadata">

**Author:** ![savnik](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@savnik](https://forums.balena.io/u/savnik)\
**Post date:** [February 11, 2021, 7:49pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/7 "2021-02-11T19:49:48Z")

</div>

Hi, yes i did try it and when it did not work for me I tried to boil it down to the bare minimum for it to work by removing all the stuff about MQTT and revpimodio2. I then found the above repo which should be a bare minimum for testing the setup. I might miss some very obvious stuff since both the github repo and the other thread is having success with this.

---

<div class="post-metadata">

**Author:** ![ab77](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ab77/32/2870_2.png) [@ab77](https://forums.balena.io/u/ab77)\
**Post date:** [February 12, 2021, 7:44pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/8 "2021-02-12T19:44:57Z")

</div>

Hi there, just to confirm you’ve tried [these](https://github.com/balena-io-playground/revpi-core3-test/blob/8174e3046c3c4e4eb68ea059d277068b8c95fe41/README.md) steps and you are still observing the issue?

---

<div class="post-metadata">

**Author:** ![savnik](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@savnik](https://forums.balena.io/u/savnik)\
**Post date:** [February 13, 2021, 5:41pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/10 "2021-02-13T17:41:00Z")

</div>

After some debugging I have now discovered that it is only the status LED that i can’t get to work. The IO ports are working just fine if the DIO is on the left side of the core. There is a need for updating the config.rsc file if the DIO is on the right side. That is where my initial problem was.

---

<div class="post-metadata">

**Author:** ![mbalamat](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mbalamat/32/1245_2.png) [@mbalamat](https://forums.balena.io/u/mbalamat)\
**Post date:** [February 15, 2021, 1:50pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/11 "2021-02-15T13:50:16Z")

</div>

so does it work as expected now? What was the change you are referring to in the config.rsc file?

---

<div class="post-metadata">

**Author:** ![savnik](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@savnik](https://forums.balena.io/u/savnik)\
**Post date:** [February 21, 2021, 11:00am UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/13 "2021-02-21T11:00:52Z")

</div>

Yes the I/O part is working now. To my understanding the config.rsc file contains information on the IO modules and the position relative to the Core Module. A I/O module placed on the left side of the Core module will have a different config.rsc than if the I/O module is placed on the right side of the Core module. I have verified this with trying two different configurations in the picTory software that the config files are different.  
I’am still have a challenge getting the LED’s (A1 and A2) to respond on the core module.

---

<div class="post-metadata">

**Author:** ![rahul-thakoor](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rahul-thakoor](https://forums.balena.io/u/rahul-thakoor)\
**Post date:** [February 25, 2021, 10:00am UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/15 "2021-02-25T10:00:32Z")

</div>

Hey @savnik,

> To my understanding the config.rsc file contains information on the IO modules and the position relative to the Core Module. A I/O module placed on the left side of the Core module will have a different config.rsc than if the I/O module is placed on the right side of the Core module.

Thanks for the tip

I do not have a similar device to test,. Referring to the [piTest documentation](https://revolution.kunbus.com/tutorials/software-2/pitest/), I would suggest

- try to read the value of the `RevPiLED` variable using `./piTest -r RevPiLED` ?
- Are you able to use `piTest` to toggle other pins? eg `O_1`, `O_2` etc
- [Are you using a privileged container](https://www.balena.io/docs/learn/develop/hardware/)? can you please confirm if you have the following device: `/dev/piControl0`? piTest controls peripherals via this device based on [the source](https://github.com/RevolutionPi/piControl/blob/master/piControl.h#L59)
- I saw you commented on the [other forum thread](https://forums.balena.io/t/kunbus-revolution-pi-revpi-core-3-and-dio-module/36197/12)

> COPY config.rsc /etv/revpi/config.rsc  
> Hi, I’am trying to reproduce this in my own setup.  
> Is it a typo or intention in the path /etv/… ?

I believe it is. If you want to modify the file when building the image, it should be `COPY config.rsc /etc/revpi/config.rsc`

I hope this gives you enough to continue debugging.

Cheers

---

<div class="post-metadata">

**Author:** ![savnik](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@savnik](https://forums.balena.io/u/savnik)\
**Post date:** [February 28, 2021, 9:33am UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/18 "2021-02-28T09:33:34Z")

</div>

Hi @rahul-thakoor

We got the sample repo working here:

> <https://github.com/balena-io-playground/revpi-core3-test/pull/2/files>

Also implemented the comment about the position.

Yes Iam using a privileged container and the O\_1 and I\_1 is working perfect using both code and piTest tool. Also tested with the basic example linked from the git repo above.

`/dev/piControl0` is available in the container.

I will continue to try figuring out why the LEDs is not working. It can also be the test tool or config file which is causing my problem.

---

<div class="post-metadata">

**Author:** ![phil-d-wilson](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/phil-d-wilson/32/3730_2.png) [@phil-d-wilson](https://forums.balena.io/u/phil-d-wilson)\
**Post date:** [March 2, 2021, 4:09pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/19 "2021-03-02T16:09:29Z")

</div>

Hi Peter,

Thanks for the update. Please do let us know how your debugging goes.

Phil#

---

<div class="post-metadata">

**Author:** ![klutchell](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/klutchell/32/861_2.png) [@klutchell](https://forums.balena.io/u/klutchell)\
**Post date:** [March 5, 2021, 8:19pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/21 "2021-03-05T20:19:56Z")

</div>

Hey Peter, and progress updates on debugging your Digital I/O Module?

---

<div class="post-metadata">

**Author:** ![bluesky](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluesky](https://forums.balena.io/u/bluesky)\
**Post date:** [April 14, 2021, 7:55am UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/23 "2021-04-14T07:55:07Z")

</div>

Hi, I was able to run balenaOS on a RevPi with the help of this posts:

> [@Kunbus Revolution Pi RevPi Core 3 and DIO module](https://forums.balena.io/t/kunbus-revolution-pi-revpi-core-3-and-dio-module/36197/12):
>
> Just to complete this thread: this is my final Dockerfile: # Use the raspberrypi3 type, not the revpi-core-3 FROM balenalib/armv7hf-debian:jessie-run LABEL io.balena.device-type="raspberrypi3" ENV LANG C.UTF-8 # Add the RevolutionPi repository RUN export DEBIAN\_FRONTEND=noninteractive RUN echo "deb http://packages.revolutionpi.de/ stretch main contrib" \> /etc/apt/sources.list.d/revpi.list && echo "deb http://packages.revolutionpi.de/ updates/" \>\> /etc/apt/sources.list.d/revpi.list && sudo apt…

I’m able to read from the RevPi (AIO and DIO), but it’s not possible to write.  
So `piTest -w O_1,1` is not working and writing to the LED A1 and A2 is not possible either.  
Running the RevPi with the original image was working without problems.  
Any suggestion on how to debug this problem?

---

<div class="post-metadata">

**Author:** ![Hades32](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/hades32/32/6430_2.png) [@Hades32](https://forums.balena.io/u/Hades32)\
**Post date:** [April 16, 2021, 2:10pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/24 "2021-04-16T14:10:40Z")

</div>

Hey Peter,  
does your command return any error? Looking at [piControl/piTest.c at master · RevolutionPi/piControl · GitHub](https://github.com/RevolutionPi/piControl/blob/master/piTest/piTest.c#L562) I would expect to see _some_ output…  
Does `dmsg` or `journalctl` show any problems?  
Did you make any other changes to `config.rsc`?  
Is there any other differences on the available devices in `/dev/*` between the balena and the stock image?

---

<div class="post-metadata">

**Author:** ![savnik](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@savnik](https://forums.balena.io/u/savnik)\
**Post date:** [April 17, 2021, 9:34am UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/26 "2021-04-17T09:34:07Z")

</div>

Hi,  
No it does not return an error. It returns like it was successful.  
dmsg and journalctl does not show anything abnormal.  
No the only change to config.rsc was the side the module was attched to. But i did test with both.  
All devices looks to be available in `/dev/*`.  
As written above I got the I/O part working so it is only the status leds

---

<div class="post-metadata">

**Author:** ![bluesky](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluesky](https://forums.balena.io/u/bluesky)\
**Post date:** [April 18, 2021, 6:35pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/27 "2021-04-18T18:35:54Z")

</div>

Same behavior on my device. All the things are normal, but writing to LED or output is not working. Seems like the container has no rights to write, but strangely there are no errors when it is not working.

---

<div class="post-metadata">

**Author:** ![cmfcruz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/cmfcruz/32/6878_2.png) [@cmfcruz](https://forums.balena.io/u/cmfcruz)\
**Post date:** [April 27, 2021, 9:20am UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/28 "2021-04-27T09:20:52Z")

</div>

Hi, the supervisor is using the LED and this may interfere with how your service can use the LED device. Some users have been asking for this feature to allow their service to control the LED. We have created an issue to track it here: [Allow the ability to tell the supervisor to not use the on device LED · Issue #1375 · balena-os/balena-supervisor · GitHub](https://github.com/balena-os/balena-supervisor/issues/1375).

A [particular workaround](https://forums.balena.io/t/controlling-onboard-leds-on-rpi-4/126102/7) from the community is to modify the `/etc/resin-supervisor/supervisor.conf` file in the HostOS and setting `LED_FILE=/dev/null`. This should allow your service to use the onboard LED device. I hope this helps while a permanent configuration path is not yet available.

---

<div class="post-metadata">

**Author:** ![andrea\_er](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@andrea\_er](https://forums.balena.io/u/andrea_er)\
**Post date:** [November 15, 2024, 1:47pm UTC](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/30 "2024-11-15T13:47:55Z")

</div>

> [@Getting started with RevPi Core and Balena OS](https://forums.balena.io/t/getting-started-with-revpi-core-and-balena-os/251351/23):
>
> Hi, I was able to run balenaOS on a RevPi with the help of this posts: I’m able to read from the RevPi (AIO and DIO), but it’s not possible to write. So piTest -w O\_1,1 is not working and writing to the LED A1 and A2 is not possible either. Running the RevPi with the original image was working without problems. Any suggestion on how to debug this problem?

Hi,  
I have downloaded the config.rsc from github but in the device section there are only 2 elements (RevPiCore and RevPi DIO, not AIO). I immagine you cloned the DIO section.  
Can you help me to configure AIO module in config.rsc ?  
Thank you.
