Enable i2c and install a RTC

edited March 8 in General

How can we enable i2c and add a RTC module ?

Tagged:

Comments

  • I edited config.txt and saw i2c was enabled but it seems I can't instert the rtc_ds1307 module and it seems that /etc/modules isn't parsed like it should. And there is no modprobe either so how do we load kernel modules ?

  • @kalkov can you guys add the hwmon kernel module to your next build ? It's needed RTC-ds1307

  • insmod /boot/modules/rtc-ds1307.ko

  • edited June 23
    I am trying to activate the RTC on my Raspberry Pi 3 B+. (DS1307 connected on the I2C port)
    I am getting an error when I check the new_device.
    The error is "/system/bin/sh : cat: new_device: I/O error"

    What is the correct procedure to make the RTC work ?
  • edited June 23
    The /boot/config.txt contains the following entries related to I2C -

    dtparam=i2c1=on
    dtparam=i2c_arm=on
    dtoverlay=i2c-rtc,ds1307


    When i run the i2cdetect -y 1 command, I am able to see the memory location 68. But it is not turning to UU after running the echo command.
  • I've a similar problem with ds1307. If i do the insmod command the lines in the i2c tools turn UU but after that i type hwclock -r e.g. it says /dev/misc/rtc: no such file or directory. Any ideas? the config.txt is also edited. I tried the rtc-ds1307 < 0x68 /sys/class... command too.

  • My ds1307 works fine using just this line:
    dtoverlay=i2c-rtc,ds1307

    I did update all files in boot partition with files from latest raspbian; all except for uboot, kernel, of course.

Sign In or Register to comment.