Current version of the OpenAuto Pro is 12
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to configure RTC in the OAP
#11
(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.
Reply
#12
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.
Reply
#13
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
Reply
#14
(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.
Reply
#15
(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."
From CLI I ran 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
Reply
#16
(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."
From CLI I ran 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]
Reply
#17
remove SDA & SCL wires from RPI 7inch screen....rtc works perfectly!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)