Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to configure RTC in the OAP
#1
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.
Reply
#2
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?
Reply
#3
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-modu...i/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
Reply
#4
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
Reply
#5
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.
Reply
#6
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
Code:
dtoverlay=i2c-rtc-gpio,ds3231

instead of
Code:
dtoverlay=i2c-rtc,ds3231
Reply
#7
Information 
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_DS32...and-ds3231
Code:
#--------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
Thanks, Frank
Carputer Detail   Parts List
2004 Chevrolet Tahoe Z71 w/ Bose & Onstar
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)