Back again. Here is what I did:
Code: Select all
opkg list-installed |grep polldev
kmod-input-polldev - 3.18.75-1-85ebbd687615e332b5e1d1c2b6f80fc0
Code: Select all
switch is linked to gpio-13:
root@Gargoyle:~# cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:
gpio-12 (tp-link:blue:wlan2g ) out lo
gpio-13 (RFKILL switch ) in lo
....
gpio-22 (USB1 power ) out h
Code: Select all
assigning switch to gpio-23, testing on/off
root@Gargoyle:~# cd /sys/class/gpio/
root@Gargoyle:/sys/class/gpio# echo 23 > export
root@Gargoyle:/sys/class/gpio# echo in > gpio23/direction
root@Gargoyle:/sys/class/gpio# cat gpio23/value
0
root@Gargoyle:/sys/class/gpio# cat gpio23/value
1
Code: Select all
replaced the gargoyle_button_handler with the script from Lantis (amend "logger the button was $BUTTON and the action was $ACTION") in /etc/rc.button/gargoyle_button_handler
Code: Select all
checked whether rfkill is linked to the gargoyle_button_handler
ls -l /etc/rc.button/
lrwxrwxrwx 1 root root 23 Oct 25 2017 failsafe -> gargoyle_button_handler
-rwxr-xr-x 1 root root 528 Jun 19 09:54 gargoyle_button_handler
lrwxrwxrwx 1 root root 23 Oct 25 2017 power -> gargoyle_button_handler
lrwxrwxrwx 1 root root 23 Oct 25 2017 reset -> gargoyle_button_handler
lrwxrwxrwx 1 root root 23 Oct 25 2017 rfkill -> gargoyle_button_handler
lrwxrwxrwx 1 root root 23 Oct 25 2017 wps -> gargoyle_button_handler
Code: Select all
amended /etc/config/system by
config button 'wifi_on'
option button 'rfkill'
option action 'pressed'
option handler 'wifi up'
config button 'wifi_off'
option button 'rfkill'
option action 'released'
option handler 'wifi down
Code: Select all
rebooted
cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:
gpio-12 (tp-link:blue:wlan2g ) out lo
gpio-13 (RFKILL switch ) in lo
gpio-14 (tp-link:blue:system ) out lo
gpio-15 (tp-link:blue:qss ) out hi
gpio-16 (Reset button ) in hi
gpio-17 (tp-link:blue:wlan5g ) out lo
gpio-18 (tp-link:green:usb1 ) out hi
gpio-19 (tp-link:green:usb2 ) out hi
gpio-21 (USB2 power ) out hi
gpio-22 (USB1 power ) out hi
During these steps I did logreads, but no event was ever recorded upon switching the slider.
It seems that the assignment to gpio-23 is getting lost during reboot, so the system file and the gargoyle_button_handler loose their targets. Therefore tried again, but ran /etc/init.d/system restart instead of booting...no difference
Did I miss a step?