I have done almost everything from numerous tutorials to get the RTC to work, but when I run sudo hwclock -r, i still get the following error.
hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --debug option to see the details of our search for an access method.
My sudo i2cdetect -y 1 is detecting the RTC DS3231 as below:
pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
EDIT: What I have done till now
Connected the RTC to the RasPi 3. Enabled i2c in sudo raspi-config
My /etc/modules is now
snd-bcm2835
i2c-bcm2835
i2c-bcm2708
i2c-dev
rtc-ds1307
Added the following lines to /boot/config.txt
# Support for rtc ds3231
dtoverlay=i2c-rtc,ds3231
dtoverlay=i2c-rtc,ds1307
dtparam=i2c_arm=on
dtparam=i2c1=on
device_tree=
My /etc/rc.local has the following lines
echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
hwclock -s
But i do get an INVALID ARGUMENT ERROR when i run sudo echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-1/new_device.
At the end, sudo hwclock or hwclock gives the error : hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --debug option to see the details of our search for an access method.
Can somebody suggest me on a fix for this.
EDIT:
Tried the fix suggested on a fresh install of NOOBS v1.9.2 after sudo apt-get update and sudo apt-get dist-upgrade
ADDED on 03.Oct.2016
As per inputs from joan and Milliways,
I have added dtoverlay=i2c-rtc,ds3231 only, and got the hwclock to give date and time, bu the problem is that hwclock runs like internal clock now, it doesn't keep time across reboots.
Any inputs?

dtoverlay=i2c-rtc,ds3231=1line.sudo hwclock -rgave Thu 29 Sep 2016 11:48:27 BST -0.607987 seconds.dmesg|grep rtcgave [4.791545] rtc-ds1307 1-0068: SET TIME! [4.793978] rtc-ds1307 1-0068: rtc core: registered ds3231 as rtc0. – joan Sep 29 '16 at 10:53Due to power interruption, the device now blinks GREEN LED once on boot, and I think i have to reload the SD Card. I will correct that, and test with the oneline solution, and give an update by tomorrow. Thank you for the suggestions.
– Dr.Viper Sep 29 '16 at 11:00Then added just dtparam=i2c_arm=on dtoverlay=i2c-rtc,ds3231 to /boot/config.txt.
Same error continues. hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --debug option to see the details of our search for an access method.
– Dr.Viper Sep 30 '16 at 17:04i2cdetect -y 1report? – joan Sep 30 '16 at 17:36pi@raspberrypi:~ $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
– Dr.Viper Oct 01 '16 at 07:51