hwclock setting issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

hwclock setting issues

This post was updated on .

A few users reported issues when setting the hwclock on their LiV units.

The normal behaviour is:
-insert CR2032 battery into the DS3231 module, then plug the RTC module into its dedicated connector with the right orientation (battery up).  
-power up LiV and make sure LiV has a working Internet connection (e.g. you are able to ping external websites from LiV).
-LiV automatically gets the right date using NTP (you can see it with "date" command)
-in about 15 minutes LiV automatically sets the hardware clock to the right date (you can check this with "sudo hwclock -r")

If DS3231 is not detected with "sudo i2cdetect -y 1" command, use "dmesg" and look for errors from rtc-ds1307. If you see any errors "sudo apt-get update" and power cycle. Re-test with "i2cdetect" command.

If your LiV unit shows time as "Jan, 1 2000" when you use "date" command EVEN IF the unit has a working Internet connection and consequently it can not set up the hwclock with the correct NTP clock, try this:
1) sudo apt-get install ntpdate
2) sudo ntpdate -s ntp.ubuntu.com
3) date (make sure here that your LiV acquired the right NTP time)
If LiV did not acquire the right time:
- make sure you can ping ntp.ubuntu.com
- stop ntp daemon with "sudo /etc/init.d/ntp stop" and go back to step 2.
4) sudo hwclock -r (this should be the "Jan 1, 2000" date)
5) sudo hwclock —systohc
6) sudo hwclock -r (this should be the correct NTP time now)