Guide for installing a real time clock RTC in a raspberry pi on OMV 3 (jessie)

  • I have posted a few times in relation to installing a real time clock RTC on OMV on a Raspberry Pi. This guide is for OMV 3 (jessie) and the main things to note are:


    - it's quite easy to get RTC working (far simpler than on OMV 2)
    - No need to use or make changes to hwclock.sh


    Below are the steps to install and configure:


    1. Download, install and update OMV 3 on your RPi


    2. Configure RPi to use NTP (date section of OMV GUI - set time to correct timezone)


    3a. install RTC module on the RPi - the module is installed directly into the GPIO header at the corner. see attached image for correct position/pins


    3b. enable the ic2 interface using the rasp-config tool. To enable iC2:


    - Install raspi-config sudo apt-get install raspi-config
    - run rasp-config - sudo raspi-config, go to advanced and turn on ic2


    4. modify the file /boot/config.txt: sudo nano /boot/config.txt and add dtoverlay=i2c-rtc,ds3231 at end of file


    5. modify the file /lib/udev/hwclock-set: sudo nano /lib/udev/hwclock-set and comment out the following code - this section of code is near the beginning of the file)


    Code
    #if [ -e /run/systemd/system ] ; then
    #    exit 0
    #fi

    6. Final step is to remove fake-hwclock and configuration that uses it




    Code
    sudo apt-get remove fake-hwclock
    sudo rm /etc/cron.hourly/fake-hwclock
    sudo update-rc.d -f fake-hwclock remove
    sudo rm /etc/init.d/fake-hwclock


    7. clear syslog and reboot.


    8. after rebooting check hwclock is working using the command sudo hwclock -r The time returned by hwclock should be the same as system time. check they are sync'd


    That's it. Good luck.

  • A note on this as another forum member has tested the process above and had an issue. The solution was to enable iC2 through the raspberry pi config tool.


    instructions above have been updated to include the step to enable ic2

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!