I have the MT300N-V2 “mango” router. I have it configured to use the switch on the back to enable/disable WireGuard. It is not working correctly. It will stop WireGuard, but it will not start it back up. I have to start it from the web interface.
I did some poking around, and I think I have narrowed down where the bug is located. In the /usr/bin/switchaction script, on line 82, it tries to run this command to determine if the switch is left or right:
I do not see a change in /sys/kernel/debug/gpio before and after moving the switch. I get this either direction:
root@GL-MT300N-V2:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/10000600.gpio, 10000600.gpio:
gpio-0 ( |BTN_0 ) in lo
gpio-3 ( |BTN_1 ) in lo
gpio-11 ( |usb ) out hi
gpiochip1: GPIOs 32-63, parent: platform/10000600.gpio, 10000600.gpio:
gpio-38 ( |reset ) in hi
gpio-42 ( |gl-mt300n-v2:green:p) out lo
gpio-43 ( |gl-mt300n-v2:green:w) out hi
gpio-44 ( |gl-mt300n-v2:red:wla) out hi
I know the switchaction script is being executed when I flip the switch because I threw some debugging in there, so the switch itself seems functional.