Hi folks,
I just bought a raspberry pi B+ and i'm trying to get my realtime clock working. I'm following this tutorial..
https://learn.adafruit.com/adding-a-rea ... i?view=all
I've gotten this to work with my older Pi without a problem, but this time around i can't get the hwclock methods to work :(
The new model B+ required an updated OS (2015-05-05-raspbian-wheezy).. wonder if this has something to do with it?
I've gotten as far as running i2cdetect and seeing the device occupying 0x68. I have rebooted the Pi afterwards.
the output im getting in the terminal window when i try hwclock -r is ..
]hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
thank you!
RTC and Raspberry Pi .. can't set time :(
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: RTC and Raspberry Pi .. can't set time :(
So you need to follow the instructions for a rev 2 Pi.
What do you get from
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
What do you get from
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
-
- Posts: 21
- Joined: Sat Jul 13, 2013 6:26 pm
Re: RTC and Raspberry Pi .. can't set time :(
thanks for the reply rick..
so i did this ..
upon entry nothing is returned. so i exit super
the i try to call the clock
.. and the following is returned
so i did this ..
Code: Select all
$ sudo -s
# echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
Code: Select all
# exit
Code: Select all
$ sudo hwclock -r
Code: Select all
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Input/output error
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: RTC and Raspberry Pi .. can't set time :(
Please post clear, detailed pictures of both sides of the RTC, showing your wiring and soldering.
-
- Posts: 21
- Joined: Sat Jul 13, 2013 6:26 pm
Re: RTC and Raspberry Pi .. can't set time :(
The RTC is integrated into a Raspberry Pi Alamode
http://www.makershed.com/products/alamo ... spberry-pi
It always worked fine with my other Pi. I'm going to swap the battery for the RTC but i know that it must still be good as its only around 1 year old : /
http://www.makershed.com/products/alamo ... spberry-pi
It always worked fine with my other Pi. I'm going to swap the battery for the RTC but i know that it must still be good as its only around 1 year old : /
-
- Posts: 21
- Joined: Sat Jul 13, 2013 6:26 pm
Re: RTC and Raspberry Pi .. can't set time :(
I changed the battery with no luck
-
- Posts: 21
- Joined: Sat Jul 13, 2013 6:26 pm
Re: RTC and Raspberry Pi .. can't set time :(
I figured out the problem. I didn't remove the "#" from the blacklist file.. the following worked
Thanks so much for your help. I really appreciate it.
Code: Select all
blacklist spi-bcm2708
blacklist i2c-bcm2708
- melrick
- Posts: 1
- Joined: Sat Oct 31, 2015 1:37 am
Re: RTC and Raspberry Pi .. can't set time :(
Does it work?
Please be positive and constructive with your questions and comments.