Getting started with RevPi Core and Balena OS

I have tried creating a balena application with the code in this repo: GitHub - 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 (6:39min).

./piTest -w RevPiLED,2

The result is failing silently:


The Status led is not changed.

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

Hi, did you see Kunbus Revolution Pi RevPi Core 3 and DIO module - #9 by mcomisso
can you check the last post there to see if it helps?

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.

Hi there, just to confirm you’ve tried these steps and you are still observing the issue?

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.

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

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.

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, 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? can you please confirm if you have the following device: /dev/piControl0? piTest controls peripherals via this device based on the source
  • I saw you commented on the other forum thread

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

Hi @rahul-thakoor

We got the sample repo working here:

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.

Hi Peter,

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

Phil#