Hi all,
Complete error message is...
echo: write error: Invalid argument hwclock: can't open '/dev/misc/rtc': No such file or directory
Would appreciate any help/info and suggestions!
Thanks,
Pete.
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
Hi all,
Complete error message is...
echo: write error: Invalid argument hwclock: can't open '/dev/misc/rtc': No such file or directory
Would appreciate any help/info and suggestions!
Thanks,
Pete.
Hi Pete,
I hope you have the RTC working by now. I got it working in the end but it took me quite some effort. Nevertheless i made a small step by step guide again it might be helpfull for other people.
In the picture above i see you are trying to run rc.local from /data. It should be located in /etc and should have the right permissions ofcourse. Furthermore before you use the command "i2cdetect -y 1" you always have to execute "modprobe i2c-dev" else i2cdetect won't work.
RTC.zipSteps to install RTC.txtconfig.txt
allright, so what is exactly defined in the rc.local file? For the hardware clock (expander pi I believe you have) the line in rc.local should look like this;
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
hwclock -s
In the /u-boot/overlays folder should be the following file;
ds1307-rtc-overlay.dtb
It should also be called in the config.txt eg like this (in the [all] section):
dtoverlay=mcp3208:spi0-0-present,i2c-rtc,ds1307-rtc
Last but not least, did you install the the module? If not:
opkg install kernel-module-rtc-ds1307
Hi,
rc.local =
/u-boot/overlays/ =
config.txt =
opkg kernel =
mesg =
[ 1.468997] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. [ 7.800661] F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0) [ 7.800672] F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock [ 7.808865] F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0) [ 7.808874] F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock [ 7.816481] F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0) [ 7.816489] F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock [ 7.824109] F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0) [ 7.824117] F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock [ 11.551147] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [ 11.564314] rtc-ds1307: probe of 1-0068 failed with error -5
Found some other errors while checking with mesg?
If i want to install via opkg install kernel-module-rtc-ds1307
I became the message:
No packages installed or removed.
The relevant section is here I think:
[ 11.551147] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68
[ 11.564314] rtc-ds1307: probe of 1-0068 failed with error -5
what does it do if you manually 'read' the clock? e.g. by simply typing the command
hwclock
(you did double check the content of the .dtb file right? ;-))
Hi,
I get the same no file or directory message...
I've either got something connected wrong or it's not working as intended?
.dtb file checked and double checked... All good! ;-)
It should 'just' work. To check myself I took an older image of my rpi setup on v2.58 release and checked again, the hwclock command returns the expected line with the time. Since you cannot execute the command from the prompt, it makes sense you also cannot execute it automatically via the rc.local so lket's step through the items 1-by-1;
- there is a (working) battery installed in the explander pi
- the expander pi is connected to the raspberry pi correctly
- .dtb file is correct and in the right place (you already checked that)
- config.txt has the line in the [all] section for the ds1307
dtoverlay=mcp3208:spi0-0-present,i2c-rtc,ds1307-rtc
Victron Venus OS Open Source intro page
Venus OS GitHub (please do not post to this)
Experiments, Modifications and Adaptions. Mods (Modifications) can be made to Victron Software by the Community. Please use the modifications space for enthusiasts who want to push what is possible, without official Victron Support.
28 People are following this question.