-
Notifications
You must be signed in to change notification settings - Fork 577
Closed
Description
Hello,
i want to monitor the status of the power button in the beaglbone black, i found in google some info and i tested the following script:
!/bin/sh
BTN=/dev/input/event0
echo "Waiting for events..."
while true; do
BTNVAL=hexdump -e '8/2 "%x " "\n"' -n 16 $BTN | grep ' 74 ' | awk '{print $7}'
if [ "$BTNVAL" = "1" ]
then
echo "Power button detected"
break
fi
echo "(other event detected)"
sleep 1
done
echo "Sending shutdown..."
/sbin/shutdown -h now
echo "Finished!"
but i didn't work,
When i dumped the /dev/input/event0 nothing appears, why i'm not receiving power button events ?
I'm using a yocto generated linux distro with kernel 3.14.
Thanks
Metadata
Metadata
Assignees
Labels
No labels