I upgraded my system from 4.14 to 4.19 ipq806x (EA8500) and I noticed a differents in the gpio system.
I have soldered a reed switch in parallel to the WPS button.
To change the events for button pressed and released I change the file /etc/rc.button/wps
#!/bin/sh
#/ets/rc.button/wps
source /lib/functions.sh
do_button () {
local button
local action
local handler
local min
local max
config_get button "${1}" button
config_get action "${1}" action
config_get handler "${1}" handler
config_get min "${1}" min
config_get max "${1}" max
echo "${1} action = ${ACTION} handler = ${handler} $(date +%T) ${SEEN}" >> /tmp/Button_test
[ "${ACTION}" = "${action}" -a "${BUTTON}" = "${button}" -a -n "${handler}" ] && {
[ -z "${min}" -o -z "${max}" ] && eval ${handler}
[ -n "${min}" -a -n "${max}" ] && {
[ "${min}" -le "${SEEN}" -a "${max}" -ge "${SEEN}" ] && eval ${handler}
}
}
}
config_load system
config_foreach do_button button
return 0
to get an action I added in /etc/config/system this section
config button
option button 'wps'
option action 'pressed'
option handler '/usr/bin/temperature/wps_pressed.sh'
config button
option button 'wps'
option action 'released'
option handler '/usr/bin/temperature/wps_released.sh'
Everything worked fine until I upgraded to 4.19.
When the WPS button is pressed I loose access to my router (bytheway I'm using it with a wireless bridged setup away from my wired network) So it could be that only the wifi get's turned off.
By connecting a serial connection I still have access to the router so the router is not locked up.
How should I start troubleshooting from here.
I assume that the wps function is somewhere called and the wifi gets turned off. How could I verify this and eliminate this?
Thanks