RevPI Connect-4 no RTC on Balena Cloud

Topics about the Software of Revolution Pi
ThatGuyJack
Posts: 7
Joined: 28 Apr 2025, 13:15

RevPI Connect-4 no RTC on Balena Cloud

Post by ThatGuyJack »

Hi all, I've got a RevPI Connect-4 Which is flashed with the balenaOS image and the RTC isn't showingup/working.

There doesn't seem to be a RTC device in the usual location (/dev/rtc*) and theres no mention in journalctl or dmesg about a rtc.

timedatectl returns this:

Code: Select all

               Local time: Mon 2025-04-28 12:07:45 UTC
           Universal time: Mon 2025-04-28 12:07:45 UTC
                 RTC time: n/a
                Time zone: n/a (UTC, +0000)
System clock synchronized: yes
              NTP service: n/a
          RTC in local TZ: no
And hwclock returns this:

Code: Select all

hwclock: can't open '/dev/misc/rtc': No such file or directory

Any Ideas on a solution?
User avatar
nicolaiB
KUNBUS
Posts: 1020
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by nicolaiB »

Hi

Which image are you using? If it is the stock pi4 image, then you can enable the rtc via a custom overlay definition.

Nicolai
User avatar
Michael
KUNBUS
Posts: 10
Joined: 05 Dec 2018, 17:22

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by Michael »

Hi Jack,
Thank you for pointing out the solution you found. I am posting it here in the forum so that others can also find it easily. Use the following variables to ensure that i2c is switched on and the appropriate RTC type is specified
BALENA_HOST_CONFIG_dtparam = "i2c_arm=on"
BALENA_HOST_CONFIG_dtoverlay = "i2c-rtc,pcf2129"
Michael
ThatGuyJack
Posts: 7
Joined: 28 Apr 2025, 13:15

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by ThatGuyJack »

Hi, only just seen this again, Managed to find it myself late last week came to the same solution!

Might be worth adding it to the docs!

Cheers
Jack
ThatGuyJack
Posts: 7
Joined: 28 Apr 2025, 13:15

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by ThatGuyJack »

Sorry to bring this up again, Is there any documentaion on using the Relay output when using balena OS?

Trying to get it setup for a remote power cycle setup and it seems that the balena OS image doesn't have the default config to enable the OI operations.

is this a unique thing for each REVPI 4 or can we generate one then copy that to all the deployments in the future?
User avatar
nicolaiB
KUNBUS
Posts: 1020
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by nicolaiB »

Hi Jack,

the digital output is internally connected to GPIO16 (digital input is GPIO 6) and can be accessed via the usual gpio tools (like gpiod).

Nicolai
ThatGuyJack
Posts: 7
Joined: 28 Apr 2025, 13:15

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by ThatGuyJack »

Hi, does this also apply for the relay? (https://revolutionpi.com/documentation/ ... lay-output)

thanks
Jack
ThatGuyJack
Posts: 7
Joined: 28 Apr 2025, 13:15

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by ThatGuyJack »

Managed to get a working config.rsc from another revpi connect 4
Screenshot 2025-05-08 at 14.31.59.png

Still unable to use piTest from a container so might be missing something there?
ThatGuyJack
Posts: 7
Joined: 28 Apr 2025, 13:15

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by ThatGuyJack »

incase its useful running pitest gives me this output
Screenshot 2025-05-08 at 14.59.02.png
User avatar
nicolaiB
KUNBUS
Posts: 1020
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RevPI Connect-4 no RTC on Balena Cloud

Post by nicolaiB »

piControl needs other device tree related configuration. The easiest solution is

BALENA_HOST_CONFIG_dtoverlay="revpi-connect4"

which also takes care of the rtc, ios etc.

Nicolai
Post Reply