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, 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.
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.
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.
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
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, 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?
Hey Peter,
does your command return any error? Looking at piControl/piTest.c at master Ā· RevolutionPi/piControl Ā· GitHub 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?
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
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.
A particular workaround 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.
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.