Gargoyle Reset

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Gargoyle Reset

Post 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'
..

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Gargoyle Reset

Post 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)?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Gargoyle Reset

Post 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/

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Gargoyle Reset

Post 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

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Gargoyle Reset

Post 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)
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Gargoyle Reset

Post 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'.

ektus
Posts: 241
Joined: Sun Aug 11, 2013 2:26 am
Location: Germany

Re: Gargoyle Reset

Post 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.

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Gargoyle Reset

Post 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'?

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Gargoyle Reset

Post 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?

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Gargoyle Reset

Post 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.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply