HardwareSet up: Pi Model B, with Raspian Stretch. Boots up. Now try to install RTC Ds3231 module (with yellow capacitor at back) and plugged into the GPIO pins. Software:
$ lsmod shows
part of the list shows:
rtc_ds1307 13908 0
hwmon 10552 1 rtc_ds1307
i2c_dev 6913 0
$i2cdetect -y 1
responds all blanks
Q: What went wrong?
After $ls mode I have
Module Size Used by
fuse 99603 3
binfmt_misc 7988 1
snd_soc_bcm2835_i2s 7480 0
snd_soc_core 179915 1 snd_soc_bcm2835_i2s
snd_compress 10384 1 snd_soc_core
snd_pcm_dmaengine 5894 1 snd_soc_core
snd_bcm2835 24427 1
snd_pcm 98501 4 snd_pcm_dmaengine,snd_soc_bcm2835_i2s,snd_bcm2835,snd_soc_core
snd_timer 23968 1 snd_pcm
i2c_bcm2835 7167 0
bcm2835_gpiomem 3940 0
snd 70032 7 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
uio_pdrv_genirq 3923 0
uio 10204 1 uio_pdrv_genirq
fixed 3285 0
8192cu 582217 0
cfg80211 543091 1 8192cu
evdev 12423 6
joydev 9988 0
rfkill 20851 3 cfg80211
rtc_ds1307 13908 0
hwmon 10552 1 rtc_ds1307
i2c_dev 6913 0
ip_tables 13161 0
x_tables 20578 1 ip_tables
ipv6 409035 24
pi@raspberrypi:~ $
I also have my Wifi set up so the time is from network protocol. This DIY module does not come with coin battery. Does it matter? All GPIO ports are enabled.
Anyway upon issue of
#timedatectl
root@raspberrypi:/sys/class/i2c-adapter# timedatectl
Local time: Wed 2017-10-18 12:57:19 +08
Universal time: Wed 2017-10-18 04:57:19 UTC
RTC time: n/a
Time zone: Asia/Kuching (+08, +0800)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
root@raspberrypi:/sys/class/i2c-adapter#
After issue command
i2cdetect-y 1
root@raspberrypi:/sys/class/i2c-adapter# 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@raspberrypi:/sys/class/i2c-adapter#
I had removed the fake hwclock
After issue $dmesg command I get the following
pi@raspberrypi:~ $ dmesg | grep ds1307
[ 4.871029] rtc-ds1307: probe of 1-0068 failed with error -5
pi@raspberrypi:~ $
I got the reference from https://ubuntu-mate.community/t/supporting-ds3231-rtc-source-synchronise-with-network-time/5711
i2cdetect -y 1
will never show ANYTHING, because it is NOT CONNECTED.i2cdetect -y 0
would show any device. What doesls /dev/i2c*
show?i2cdetect -y 1
will show "UU" for an RTC that's been claimed by a kernel module. You'll also see some messages in admesg
command for the I2C device.