BlueWave Studio forum
How to configure RTC in the OAP - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html)
+--- Forum: Real Time Clock (RTC) (https://bluewavestudio.io/community/forum-82.html)
+--- Thread: How to configure RTC in the OAP (/thread-778.html)

Pages: 1 2


How to configure RTC in the OAP - BlueWave - 05-06-2019

RTC is supported in the OpenAuto Pro since version 3.3



In case of update to 3.3 user is asked about type of the RTC device. After selection of proper type and restart it work immediately (in case if it is properly connected to the RPI).



In case user has flashed new image or missed that point during update: please execute command sudo bwsrtc and follow instructions on the screen.



Re: How to configure RTC in the OAP - dreamvictim - 05-09-2019

I flashed version 3.3 onto an SD card and when I try and execute command "sudo bwsrtc" I get "no such file or directory" how do I get it to work please?


Re: How to configure RTC in the OAP - lasewun - 05-11-2019

Hey guys,

So i've tried using your update script and even a clean install and using sudo bwsrtc.

I reflashed to a clean image and followed the instructions here
https://pimylifeup.com/raspberry-pi-rtc/
with the addition of adding rtc-ds3231 to etc/modules

Ive found everytime I dont gracefully shutdown (outright remove power supply) my rtc module resets to 2000-01-01
but if i shutdown gracefully then remove power its fine. <

This is the module im using for my setup
https://www.jaycar.com.au/rtc-clock-module-for-raspberry-pi/p/XC9044
Any advice? I'm getting to the conclusion the battery on the rtc module is being drained however ive tested with my multimeter and found it to still be holding a charge.

EDIT: found as soon power removed to rpi that hw clock resets.
Can someone link their working RTC module


Re: How to configure RTC in the OAP - lasewun - 05-11-2019

dreamvictim Wrote:I flashed version 3.3 onto an SD card and when I try and execute command "sudo bwsrtc" I get "no such file or directory" how do I get it to work please?

Try this mate
sudo apt-get install -y dos2unix && sudo dos2unix /usr/local/bin/bwsrtc && sudo bwsrtc


Re: How to configure RTC in the OAP - BlueWave - 05-14-2019

There is minor issue with line endings in this script therefore, for now you have to use solution presented by lasewun



We will fix it in next release.



Re: How to configure RTC in the OAP - WBR - 06-02-2019

One small observation: in case you are using the BWS power supply, you need pins 5 and 6 for shutdown/return from halt.
In that case, the /boot/config.txt file should contain
dtoverlay=i2c-rtc-gpio,ds3231

instead of
dtoverlay=i2c-rtc,ds3231



RE: How to configure RTC in the OAP - frankpintosr - 06-29-2019

Hi All,

Before you reply, FYI, I am a complete novice with any non-windows operating system Wink 
To make it a bit easier for myself I put together a git with my configured files and steps.  This process will make a backup before replacing the local file with the one from my git repository.  Maybe this could be useful for others too.   

https://github.com/frankpintosr/rtc_DS3231#real-time-clock-rtc-config-for-raspberry-pi-and-ds3231
#--------Real Time Clock (RTC) config for Raspberry Pi and DS3231 

#Replace your /boot/config.txt
sudo cp /boot/config.txt /boot/config.txt.backup
sudo wget -O /boot/config.txt https://github.com/frankpintosr/rtc_DS3231/raw/master/config.txt

#Replace your /lib/udev/hwclock-set
sudo cp /lib/udev/hwclock-set /lib/udev/hwclock-set.backup
sudo wget -O /lib/udev/hwclock-set https://github.com/frankpintosr/rtc_DS3231/raw/master/hwclock-set

#Remove fake hardware clock
sudo apt-get -y remove fake-hwclock
sudo update-rc.d -f fake-hwclock remove
sudo systemctl disable fake-hwclock

#Set RTC time from system
#Before proceeding with this step, ensure your RPI date and time are set correctly.  This will use 
#the system time to set the initial RTC date and time.

#Write the system time to the RTC
sudo hwclock -w
#Set the system time from the RTC
sudo hwclock -s

#Restart to test
sudo reboot now

#Check the date and time of the RTC
sudo hwclock -r



RE: How to configure RTC in the OAP - FairFaX - 03-03-2020

I've followed up with this topic, also with scripts shared by @frankpintosr, and I came to the conclusion, that looks like RTC is working, but only partially.
When I run command 'sudo hwclock -r' I can see the actual time, but when I restart PI and I turn off access to network, clock is not updated (even if hwclock -r shows proper time)

Any sugestions how to resolve it?


RE: How to configure RTC in the OAP - cantonebiat - 03-04-2020

(03-03-2020, 08:56 PM)FairFaX Wrote: I've followed up with this topic, also with scripts shared by @frankpintosr, and I came to the conclusion, that looks like RTC is working, but only partially.
When I run command 'sudo hwclock -r' I can see the actual time, but when I restart PI and I turn off access to network, clock is not updated (even if hwclock -r shows proper time)

Any sugestions how to resolve it?

make sure i2c is enabled in the PI configuration


RE: How to configure RTC in the OAP - BlueWave - 03-04-2020

There is a built-in command bws-rtc that will help you configure RTC step by step. Just execute it and follow instructions on the screen.