Page 2 of 3
Re: Gargoyle Reset
Posted: Wed May 01, 2019 3:26 am
by ispyisail
my C7 v2 is
Code: Select all
Wed May 1 19:23:39 2019 user.notice root: the button was wps and the action was pressed
Wed May 1 19:23:39 2019 user.notice root: the button was wps and the action was pressed
Wed May 1 19:23:39 2019 user.notice root: the button was wps and the action was released
Wed May 1 19:23:39 2019 user.notice root: the button was wps and the action was released
Code: Select all
..
config button 'reset_button'
option button 'reset'
option action 'released'
option handler 'logger restore defaults ; /sbin/firstboot -y; reboot ;'
option min '3'
option max '90'
..
Re: Gargoyle Reset
Posted: Wed May 01, 2019 3:54 am
by Lantis
You can try to change it to work on the power button (you’ll also need a symlink from that button to the Gargoyle button handler like the other buttons), but I wonder if it won’t work on a power button?
If you just press the power button once, does that initiate a shutdown? If so, you probably can’t use it to be honest. Power buttons shouldn’t really be intercepted for other purposes.
As to your c7 v2, there should be two buttons I think. The wps button and a smaller button (usually recessed and can’t be accessed without a pen or a paper clip)?
Re: Gargoyle Reset
Posted: Wed May 01, 2019 4:38 am
by ispyisail
re:C7 v2
The button says "wps/reset"
Could not find any pin hole?
Could not find any reference to any pin hole rest with a google search?
https://www.tp-link.com/us/support/faq/497/
Re: Gargoyle Reset
Posted: Wed May 01, 2019 5:05 am
by ispyisail
If you just press the power button once, does that initiate a shutdown?
No, tired different times and only 10 seconds turns off router
You can try to change it to work on the power button (you’ll also need a symlink from that button to the Gargoyle button handler like the other buttons)
Having some trouble with this
I'm sure this is correct
Code: Select all
config button 'reset_button'
option button 'power'
option action 'released'
option handler 'logger restore defaults ; /sbin/firstboot -y; reboot ;'
option min '3'
option max '90'
but just guessing this one?
Code: Select all
ln -s /etc/rc.button/gargoyle_button_handler /etc/rc.button/reset
Re: Gargoyle Reset
Posted: Wed May 01, 2019 5:37 am
by Lantis
Change "reset" to "power" for the x86 machine.
Code: Select all
ln -s /etc/rc.button/gargoyle_button_handler /etc/rc.button/power
If the machine doesn't instantly power off when pressing it, that's probably a good sign that you can assign a different function to it.
If that's what the c7 says, then you should change "reset" to "wps" for it to function correctly i think. If that works, please let me know and i might need to mod the code.
It would be good to see some examples from other versions too (v1/3/4/5)
Re: Gargoyle Reset
Posted: Wed May 01, 2019 5:46 am
by ispyisail
viewtopic.php?f=13&t=7203&start=30#p45438
If you read down a couple of posts
For the Archer C7 v4 the button name is 'wps'.
Re: Gargoyle Reset
Posted: Wed May 01, 2019 4:42 pm
by ektus
The C7 should have a reset button on the back. At least mine has. It's not recessed, but very tiny. It's labeled WPS/RESET. With stock firmware, it initiates WPS if pressed briefly and reset if pressed for more than 5 seconds. The power button is a physical switch that interrupts the power supply.
Regards
Ektus.
Re: Gargoyle Reset
Posted: Wed May 01, 2019 7:27 pm
by ispyisail
It's labeled WPS/RESET. With stock firmware, it initiates WPS if pressed briefly and reset if pressed for more than 5 seconds.
yes, that is the button i'm taking about.
re:C7 v2
If my understanding is correct there are two command buttons with the C7 and none of then work (reboot and reset)?
Code: Select all
config button 'reboot_button'
option button 'rfkill'
option action 'released'
option handler 'logger reboot ; /usr/lib/gargoyle/reboot.sh ;'
option min '3'
option max '90'
config button 'reset_button'
option button 'reset'
option action 'released'
option handler 'logger restore defaults ; /sbin/firstboot -y; reboot ;'
option min '3'
option max '90'
'reset' needs to be changed to 'wps' and i don't know what button is 'rfkill'?
Re: Gargoyle Reset
Posted: Wed May 01, 2019 7:29 pm
by ispyisail
https://openwrt.org/docs/guide-user/net ... ifi_toggle
looks like there is no 'rfkill' on the C7
I'm not actually sure why you would want a "reboot" button over "wifi on/off" button?
Re: Gargoyle Reset
Posted: Wed May 01, 2019 10:46 pm
by Lantis
I think it used to be
Hold between 1-3 seconds = reboot
Between 3-99 seconds = firstboot
I think that's pretty sensible for a default setting yea? And then we can talk about wifi buttons after that in the forum.
I'll try to review the archer buttons. I just had a look at a photo of one and it had a physical switch which said "Wifi On/Off". does yours still have that? I believe that is the "rfkill" button.