I am finding an issue with TP-Link Archer C6 V3.2 (using TP-Link Archer C6 V3 firmware v22.03.2) regarding the WPS button. If you press it, it is not detected:
root@OpenWrt:~# cat /sys/kernel/debug/gpio | grep in
gpio-488 ( |reset ) in hi IRQ ACTIVE LOW
gpio-508 ( |wps ) in hi IRQ ACTIVE LOW
WPS is in "hi" state when the button being pressed or not. No change. Reset button is detected correctly.
So, I wonder if there is an error with GPIO mappings. Someone has this information?
In GPL tar of Archer A6/C6 v3, wps button is defined as GPIO_BUTTON_WPS = 10
, but gpios = <&gpio 28 GPIO_ACTIVE_LOW>
in dts of OpenWrt.
(GPL_Archer A6&C6.tar.gz/c6u-gpl/mtk_ApSoC_5050/Uboot/board/rt2880/ralink_gpio_C6V3.c, DL page)
Thanks!! I have tested this and I can confirm that works:
echo "490" > /sys/class/gpio/export # As the GPIO base is 480, 480+10
echo "in" > /sys/class/gpio/gpio490/direction # input mode
cat /sys/class/gpio/gpio490/value # check status
When the button is released the status is '1', while it is pressed it turns to '0'.
I will be trying to modify this in the OpenWRT source code, then compile a firmware and verifies that all is OK.