OpenSprinkler Forums Hardware Questions OpenSprinkler Beagle (OSBo) NOOB needs help with RTC service Re: Re: NOOB needs help with RTC service



Messing about it seems there’s 2 RTC’s on the OSBo, there is a built on one that I am not sure the details on but when you load the OpenSprinkler one it comes up as /dev/rtc1, as a result you will have to manually tell hwclock to use the OSBo RTC with the –rtc /dev/rtc1 switch.

[32426.321034] rtc-ds1307 1-0068: SET TIME!
[32426.339351] rtc-ds1307 1-0068: rtc core: registered ds1307 as rtc1
[32426.362582] rtc-ds1307 1-0068: 56 bytes nvram
[32426.376331] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68

here is my /etc/rc.local, it tries to set time via internet and if that fails it loads time from RTC.

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
ntpdate -b -s -u
if [ $? -ne 0 ];then
echo Setting system time from OSBo RTC
hwclock --rtc /dev/rtc1 -s
hwclock --rtc /dev/rtc0 -w
echo Updating Internet time on OSBo RTC
hwclock --rtc /dev/rtc1 -w

I went ahead and created us beagle users a setup page on the wiki: