How to enable rtc for wakeup-events

Hi,
im trying to send my balenafin to sleep using the integrated rtc ds1307, i followed this post after enabling the rtc i can successfully see it on the x68 address on bus 3 using i2cdetect with status UU, but when i try to run rtcwake i get the following error:

$ sudo rtcwake -s 10
rtcwake: cannot open /sys/class/rtc/rtc0/device/power/power/wakeup: No such file or directory
rtcwake: /dev/rtc0 not enabled for wakeup events

running cat /proc/driver/rtc gives me no errors and returns me the correct rtc time, using sudo hwclock -w or -r i can successfully interact with the rtc too

adding dtoverlay=i2c-rtc,ds1307,wakeup-source to /boot/config.txt doesn’t fix the issue either.

Hi

Just to confirm - you are using Raspbian on the balenaFin - is that right?

Can you provide a -mode option to rtcwake and try this again? If that doesn’t work let’s check whether wakeup-alarm are actually working. Try a manual sleep timer via something like:

sudo sh -c ‘echo "+00-00-00 00:00:10" > /sys/class/rtc/rtc0/wakealarm'

Note: You would need to put the fin manually to sleep for this to work. If that is working then rtc should be fine.

-N

Yes raspbian

supplying a mode to the rtcwake with rtcwake -m mem -s 10 gives a syntax error for some reason, im using raspbian v0.1.0 dowloaded from the official balenafin website
Now regarding the manual sleep, i dont have the wakealarm file in /sys/class/rtc/rtc0/
so i can’t even do it manually

Hi nitish any suggestions?