Hi,
I am using Rock Pi 4B and want to be able to turn the system on after sleep (suspend/hibernate or any other state that would allow it). Previously, I have used MRAA library to set an interrupt, and called
system("shutdown now")
inside interrupt code. I did it according to the following post and according to the MRAA examples. I wrote a shell script, which executes the MRAA program. Shell script, in its turn, is called by a service on a start-up. So, with this method I was able to shutdown the system, but I cannot get out of this state via button press.
I researched few posts, such as: 1, 2, and 3. It looks like either I have to modify the DTS file and generate new OS image, or perhaps there is a method to set the pin as a wake-up source inside the OS.
While on Debian, when I go into directory:
cd /sys/kernel/irq/<PIN #>/
There is a field called
wakeup
When doing
cat wakeup
it shows
disabled
Though I didn't find this folder in Armbian, but I suppose they may share similar settings for the pins. Can anyone please help me to achieve my goal?
I came across another similar post, but unfortunately there was no solution there.