I change button keypress in Oleg's firmware 22.214.171.124-3 (file rc/watchdog.c) with some other functionality:
Originally Posted by Martin1802
- reboot 3 sec, power led flashs shortly
- power down 5 sec, power led flashs longly
- reset to factory settings 15 sec, power led flashs too longly
- and super feathure - short press (0.25-2 sec) watchdog counting short keypresses, power led flashs too quickly, and than run script
where <count> - counts of press, and you can change button processing at any time and add any counts of functions ;
I write in script on one press WLAN ON/OFF:
und if you want to WLAN OFF on boot - write in /usr/local/sbin/post-boot script
echo "`date`: $1" >> /tmp/button.log
CHECK=`wl isup 2>&1| grep on`
if [ -z "$CHECK" ]; then
insmod wl && wl up && buttonlog "WiFi started up"
rmmod wl && buttonlog "WiFi shutdowned"
buttonlog "Button pressed count $1"
case "$1" in
buttonlog "No handlers for count $1";;