BlueWave Studio forum
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Help
  • View Today's Post
  • More
    • BlueWave Studio
    • Shop
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Help View Today's Post
    More
    • BlueWave Studio
    • Shop
    BlueWave Studio forum OpenAuto Pro Real Time Clock (RTC) How to configure RTC in the OAP

    How to configure RTC in the OAP
    BlueWave
    Offline

    Administrator

    Posts: 2,750
    Threads: 64
    Joined: Jun 2019
    Reputation: 67
    #1
    05-06-2019, 05:21 PM
    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.
    dreamvictim
    Offline

    Junior Member

    Posts: 43
    Threads: 7
    Joined: Apr 2019
    Reputation: 2
    #2
    05-09-2019, 09:53 AM
    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?
    lasewun
    Offline

    Junior Member

    Posts: 13
    Threads: 2
    Joined: Feb 2019
    Reputation: 0
    #3
    05-11-2019, 10:59 PM (This post was last modified: 06-21-2019, 05:48 AM by BlueWave.)
    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
    lasewun
    Offline

    Junior Member

    Posts: 13
    Threads: 2
    Joined: Feb 2019
    Reputation: 0
    #4
    05-11-2019, 11:00 PM (This post was last modified: 06-21-2019, 05:47 AM by BlueWave.)
    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
    BlueWave
    Offline

    Administrator

    Posts: 2,750
    Threads: 64
    Joined: Jun 2019
    Reputation: 67
    #5
    05-14-2019, 04:18 PM
    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.
    WBR
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: Jun 2019
    Reputation: 0
    #6
    06-02-2019, 03:55 PM (This post was last modified: 06-21-2019, 05:47 AM by BlueWave.)
    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
    frankpintosr
    Offline

    Passionate Carputer Enthusiast

    Posts: 131
    Threads: 11
    Joined: Apr 2019
    Reputation: 13
    #7
    06-29-2019, 05:22 PM
    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
    #--------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
    FairFaX
    Offline

    Junior Member

    Posts: 25
    Threads: 4
    Joined: Mar 2019
    Reputation: 0
    #8
    03-03-2020, 08:56 PM
    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?
    cantonebiat
    Offline

    Junior Member

    Posts: 40
    Threads: 2
    Joined: Jul 2019
    Reputation: 2
    #9
    03-04-2020, 09:45 PM
    (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
    BlueWave
    Offline

    Administrator

    Posts: 2,750
    Threads: 64
    Joined: Jun 2019
    Reputation: 67
    #10
    03-04-2020, 09:48 PM
    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.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)

    Pages ({1}): 1 2 Next »



    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Help · BlueWave Studio · Shop

    Copyright © bluewavestudio.io. All rights reserved.

    Linear Mode
    Threaded Mode