piknot
Posts: 1
Joined: Sun Jan 24, 2016 12:23 am

PiFace shim RTC not working

Tue Jan 26, 2016 1:12 pm

New to Pi and Linux so bear with me. I followed the user manual/guide and: https://www.element14.com/community/mes ... i-b#138941

Continue to receive:
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.

Tried:
Loading and testing the PiFace Shim RTC module
sudo modprobe i2c:mcp7941x
and then with root rights (= sudo bash)

echo mcp7941x 0x6f > /sys/class/i2c-adapter/i2c-1/new_device

exit (= to quit root rights' shell)

but I get:

bash: /sys/class/i2c-adapter/i2c-1/new_device: Permission denied

Thank you

DirkS
Posts: 10699
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: PiFace shim RTC not working

Tue Jan 26, 2016 1:33 pm

Which OS are you using? Raspbian Wheezy or Jessie?
What is the output of

Code: Select all

uname -a

bobinparis
Posts: 3
Joined: Fri Mar 25, 2016 3:05 pm

Re: PiFace shim RTC not working

Tue Mar 29, 2016 11:52 am

Hi everybody,
It was really painful to have this PiFace RTC working on Raspbian Jessie, we can find a lot of information on internet, but unfortunetely they are now out of date...
I leave here my solution that works fine for me, i wish it can help some of you !

-Update and Upgrade
pi@raspberry:~ $ sudo apt-get update
pi@raspberry:~ $ sudo apt-get –y upgrade
pi@raspberry:~ $ reboot

-Activate i2c
pi@raspberry:~ $ sudo raspi-config
Go to now 'Advanced Options', the "I2C", Enable Yes, Load Kernell Yes
pi@raspberry:~ $ reboot

-Install i2c package
pi@raspberry:~ $ sudo apt-get install i2c-tools

-Delete Fake Hardware Clock
pi@raspberry:~ $ sudo apt-get remove fake-hwclock
pi@raspberry:~ $ sudo apt-get purge fake-hwclock

-Edit /boot/config.txt
pi@raspberry:~ $ sudo nano /boot/config.txt
At the end of the file, add:
dtparam=i2c_arm=on
dtparam=i2c=on
dtoverlay=i2c-rtc,mcp7941x
pi@raspberry:~ $ reboot

-Edit /etc/modules
pi@raspberry:~ $ sudo nano /etc/modules
At the end of the file, add:
i2c-bcm2708
i2c-dev
i2c:mcp7941x
rtc-mcp7941x
pi@raspberry:~ $ reboot

-Edit /etc/rc.local
pi@raspberry:~ $ sudo nano /etc/rc.local
Add in the "IF" function that is already here:
If (...)
/sbin/hwclock -wu
else(...)
/sbin/hwclock -s
fi

exit 0

pi@raspberry:~ $ reboot

-Edit /lib/udev/hwclock-set
pi@raspberry:~ $ sudo nano /liv/udev/hwclock-set
Comment the first if function:
# if [ -e /run/systemd/system ] ; then
# exit 0
# fi

pi@raspberry:~ $ reboot

-Edit /etc/adjtime
pi@raspberry:~ $ sudo nano /etc/adjtime
Replace UTC with LOCAL
pi@raspberry:~ $ reboot

-Finally, you have to set your system date, set your hardware clock with and everything should be fine !!
pi@raspberry:~ $ sudo date –s ‘’25 MAR 2016 15:32:00”
pi@raspberry:~ $ sudo hwclock -w
pi@raspberry:~ $ sudo hwclock –r

Shutdown, unplug your network connection, wait a little, and turn it on !
By the way, sorry for my bad english and raspberry knowledges ! Maybe some instructions are not useful here but it works for me.

DirkS
Posts: 10699
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: PiFace shim RTC not working

Tue Mar 29, 2016 11:59 am

bobinparis wrote:pi@raspberry:~ $ sudo nano /boot/config.txt
At the end of the file, add:
dtparam=i2c_arm=on
dtparam=i2c=on
You only need one of these lines. They have the same function.
-Edit /etc/modules
pi@raspberry:~ $ sudo nano /etc/modules
At the end of the file, add:
i2c-bcm2708
i2c-dev
i2c:mcp7941x
rtc-mcp7941x
Try it with just i2c-dev. I would expect the others to be loaded by the device tree overlays.

Mikeymp66
Posts: 6
Joined: Thu Dec 12, 2019 11:03 pm

Re: PiFace shim RTC not working

Thu Dec 12, 2019 11:10 pm

It works on pi 3 and pi 3b + use info found at spell foundry and install is easy i/o address changed from 068 to 07f that is why scripts do not work . I just installed 2 of them and they work good . https://spellfoundry.com/sleepy-pi/sett ... an-jessie/ this link is what i used and installed both very fast.

Mikeymp66
Posts: 6
Joined: Thu Dec 12, 2019 11:03 pm

Re: PiFace shim RTC not working

Fri Dec 13, 2019 12:34 am

Sorry my last post said i2c changed from 068 to07f is wrong clock still installs at 068 no 07f but i just got 3 of them to work on pi 2b+ 3b and 3b+ with the web page that i referenced in last post. I gave up for two years but tried again and to my surprise they work I even have one more to use.Battery low will cause clock not to be seen check with dmesg for low battery.

Return to “Beginners”