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
    FairFaX
    Offline

    Junior Member

    Posts: 25
    Threads: 4
    Joined: Mar 2019
    Reputation: 0
    #11
    03-05-2020, 05:06 PM
    (03-04-2020, 09:48 PM)BlueWave Wrote: 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.

    Not sure what you mean by step by step. I've tried to run it, and there were only one step to set up RTC device - I choose DS1307 - script made some things and end without errors.

    There is one important point. Script is adding dtoverlay=i2c-rtc,ds1307 in config.txt, which I cannot use, because I have BWS power supply and pin 5/GPIO3 is already occupied.
    So I set up dtoverlay=i2c-rtc-gpio and connect RTC to GPIO 23/24 - pins 16/18 of PI 3B+ - those are default for i2c-rtc-gpio overlay.
    It seams to work correctly, because I can receive correct date from 'hwclock -r' command even after whole night of PI turned off.

    Looks like there is some other problem there, with synchronizing system time with hardware clock.
    Daniel_BlueWave
    Offline

    BlueWave Team member

    Posts: 1,158
    Threads: 45
    Joined: Jul 2019
    Reputation: 52
    #12
    03-05-2020, 07:22 PM
    The RTC handling is purely Raspbian OS related thing. It has nothing to do with OpenAuto Pro application. We suggest to check default setup without BWS power supply and, as suggested, make sure i2c is enabled in the PI configuration.
    This setup should be base to narrowing issue. Give a try.
    tthenrie
    Offline

    Member

    Posts: 92
    Threads: 26
    Joined: Jul 2019
    Reputation: 8
    #13
    03-27-2020, 02:45 AM (This post was last modified: 03-27-2020, 03:02 AM by tthenrie.)
    I have a adafruit Ulitimate GPS Breakout attached to my rpi4B. It has a rtc built in that reads from the GPS satellites. I have gpsd installed on my rpi to run the GPS and the gpsd daemon automatically sets the rpi clock to gps time and adjusts it to local time according to the raspi-config settings for locality. I didn't have to do any special configuration to my rpi to get it to read correct gps/rtc time on OAP.

    However, I can't use the hwclock utilities. I get the error message:

    "hwclock: Cannot access the Hardware Clock via any known method."

    Using hwclock -r --verbose, it indicates "no usable clock interface found."

    I suppose that's because I did not configure one of the three rtc choices available as indicated above. Still, I get the right time displayed on OAP. Smile
    MoDTXL
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: Feb 2020
    Reputation: 1
    #14
    04-09-2020, 08:27 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?


    Did you get it working?

    When I set up my RTC today I had a similar problem. The RTC seemed to work fine but the system did not start the time on start up. I tried a lot of stuff but couldn´t get it working even following all the guides. Most of them show the same way of setting it up.

    After a long time of searching I found this post. Using the way with the udev rule as per description there really did the trick for me. Now the RTC is working fine and syncing the time with the system at startup.
    frankpintosr
    Offline

    Passionate Carputer Enthusiast

    Posts: 131
    Threads: 11
    Joined: Apr 2019
    Reputation: 13
    #15
    04-25-2020, 12:15 AM
    (04-09-2020, 08:27 PM)MoDTXL Wrote:
    (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?


    Did you get it working?

    When I set up my RTC today I had a similar problem. The RTC seemed to work fine but the system did not start the time on start up. I tried a lot of stuff but couldn´t get it working even following all the guides. Most of them show the same way of setting it up.

    After a long time of searching I found this post. Using the way with the udev rule as per description there really did the trick for me. Now the RTC is working fine and syncing the time with the system at startup.

    I am having issues getting my RTC to work also... I used my own scripts and tried the steps manually.  I tried a different RTC module.  I tried a fresh imaged sd card. I used the bwsrtc command too.  Below is what I did. 

    Using jumpers I physically connected the RTC to my RPI4b (image attached)
    Booted a fresh install of OpenAuto Pro 7.0
    Went through Raspian setup gui
    Reboot
    Exit OAP
    From CLI I ran sudo sh -c "apt-get -y update && apt-get -y dist-upgrade"
    Reboot
    Exit OAP
    From CLI I ran sudo bwsrtc and selected option 2 for DS3231
    Reboot
    Exit OAP
    From CLI I ran hwclock -r  received an error:  "hwclock: Cannot access the Hardware Clock via any known method."
    From CLI I ran hwclock -r --verbose, it indicates "no usable clock interface found."
    [font=Tahoma, Verdana, Arial, sans-serif]From CLI I ran [/font]sudo i2cdetect -y 1  which returned the below
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    70: -- -- -- -- -- -- -- --                       


    Attached Files Thumbnail(s)
       
    Thanks, Frank
    Carputer Detail   Parts List
    2004 Chevrolet Tahoe Z71 w/ Bose & Onstar
    MoDTXL
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: Feb 2020
    Reputation: 1
    #16
    04-25-2020, 04:21 PM (This post was last modified: 04-25-2020, 04:22 PM by MoDTXL.)
    (04-25-2020, 12:15 AM)frankpintosr Wrote:
    (04-09-2020, 08:27 PM)MoDTXL Wrote:
    (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?


    Did you get it working?

    When I set up my RTC today I had a similar problem. The RTC seemed to work fine but the system did not start the time on start up. I tried a lot of stuff but couldn´t get it working even following all the guides. Most of them show the same way of setting it up.

    After a long time of searching I found this post. Using the way with the udev rule as per description there really did the trick for me. Now the RTC is working fine and syncing the time with the system at startup.

    I am having issues getting my RTC to work also... I used my own scripts and tried the steps manually.  I tried a different RTC module.  I tried a fresh imaged sd card. I used the bwsrtc command too.  Below is what I did. 

    Using jumpers I physically connected the RTC to my RPI4b (image attached)
    Booted a fresh install of OpenAuto Pro 7.0
    Went through Raspian setup gui
    Reboot
    Exit OAP
    From CLI I ran sudo sh -c "apt-get -y update && apt-get -y dist-upgrade"
    Reboot
    Exit OAP
    From CLI I ran sudo bwsrtc and selected option 2 for DS3231
    Reboot
    Exit OAP
    From CLI I ran hwclock -r  received an error:  "hwclock: Cannot access the Hardware Clock via any known method."
    From CLI I ran hwclock -r --verbose, it indicates "no usable clock interface found."
    [font=Tahoma, Verdana, Arial, sans-serif]From CLI I ran [/font]sudo i2cdetect -y 1  which returned the below
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    70: -- -- -- -- -- -- -- --                       


    It looks like the RTC does not get detected. But when I look that your attached picture it also looks like the ground pin wrong. I did it like in this thread. Please check the picture below amybe you can try it like this.

    [Image: attachment.php?aid=255]
    gdubb66
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: Aug 2020
    Reputation: 0
    #17
    01-09-2021, 08:31 PM
    remove SDA & SCL wires from RPI 7inch screen....rtc works perfectly!!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)

    Pages ({1}): « Previous 1 2



    • 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