RTC PCF8563
ネットが切れてるときでも時刻が必要になった。RPiにはRTCが無いのでボタン電池を電源にしたRX-8564をI2Cに繋いだ。でもRTCが動作しない...何故だろう?
I want to get the time, even if a net is not connected. RPi does not have RTC. I installed the RX-8564LC, the power supply is Li-battery CR2025, on the I2C bus.
But the RTC could not work... Why?
暫定対策案が記載されていました。↓ Thank you! http://sp-lab.extrem.ne.jp/archives/4008
こんな感じ
# hwclock -r
hwclock: select() to /dev/rtc0 to wait for clock tick timed out: No such file or directory
<One of factor was the bug of 'hwclock'. How to fix...> 実はhwclockのバグが要因の一つでした。hwclockをmakeし直します。
# wget https://www.kernel.org/pub/linux/utils/util-linux/v2.26/util-linux-2.26.1.tar.gz
# tar zxvf util-linux-2.26.1.tar.gz
# cd util-linux-2.26.1
# ./configure --without-python --without-systemd --without-ncurses > /dev/null
# apt-get install gcc
# make hwclock
# cp hwclock /sbin/.
<add '/etc/rc.local'> 設定ファイル1rc.localを編集します。
--- echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-1/new_device sleep 1 hwclock -s ---












