Thanks a million!Lantis wrote:I'll do a build with a relevant patch and see how we go.
Solved: Archer C7 Wifi button
Moderator: Moderators
Re: Archer C7 Wifi button
Re: Archer C7 Wifi button
images are available from here:
http://lantisproject.com/gargoyle_custom/TestPolldev
These have kmod-input-polldev preinstalled
and the GPIO mod already done.
http://lantisproject.com/gargoyle_custom/TestPolldev
These have kmod-input-polldev preinstalled
and the GPIO mod already done.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Archer C7 Wifi button
Hello Lantis,
as mentioned earlier I have an Archer C5 (V 1.2) flashed with a C7 image. The sysupgrade does not work out of the box due to wrong HW ID. Couple of questions before I can proceed:
1) which image (factory or sysupgrade) should I use
2) can I use sysupgrade -vF to make it happen?
3) are there any differences between the images for C5 Verion 1.2 and C7 Version 2.0?
4) In case of "no" to 2), how can I test your new image?
as mentioned earlier I have an Archer C5 (V 1.2) flashed with a C7 image. The sysupgrade does not work out of the box due to wrong HW ID. Couple of questions before I can proceed:
1) which image (factory or sysupgrade) should I use
2) can I use sysupgrade -vF to make it happen?
3) are there any differences between the images for C5 Verion 1.2 and C7 Version 2.0?
4) In case of "no" to 2), how can I test your new image?
Re: Archer C7 Wifi button
I'm not equipped to answer any of those questions lol. I don't want to give you bad advice.
I can generate the v2 firmware but it will take time again.
I can generate the v2 firmware but it will take time again.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Archer C7 Wifi button
images available at the same link.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Archer C7 Wifi button
Hello Lantis,
I have tried both images, with and without preservation of settings. In none of the cases did the switch turn on/off the Wifi nor its corresponding LEDs. Only the last line in
changed to
Do you have any explanation?
I have tried both images, with and without preservation of settings. In none of the cases did the switch turn on/off the Wifi nor its corresponding LEDs. Only the last line in
Code: Select all
cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:
gpio-12 (tp-link:blue:wlan2g ) out lo
gpio-14 (tp-link:blue:system ) out lo
gpio-15 (tp-link:blue:qss ) out hi
gpio-16 (Reset button ) in hi
gpio-17 (tp-link:blue:wlan5g ) out lo
gpio-18 (tp-link:green:usb1 ) out hi
gpio-19 (tp-link:green:usb2 ) out hi
gpio-21 (USB2 power ) out hi
gpio-22 (USB1 power ) out hi
gpio-23 (RFKILL switch ) in hi
Code: Select all
cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:
gpio-12 (tp-link:blue:wlan2g ) out lo
gpio-14 (tp-link:blue:system ) out lo
gpio-15 (tp-link:blue:qss ) out hi
gpio-16 (Reset button ) in hi
gpio-17 (tp-link:blue:wlan5g ) out lo
gpio-18 (tp-link:green:usb1 ) out hi
gpio-19 (tp-link:green:usb2 ) out hi
gpio-21 (USB2 power ) out hi
gpio-22 (USB1 power ) out hi
gpio-23 (RFKILL switch ) in lo
Re: Archer C7 Wifi button
Can you please make the modification to the button handler file and then check that an event is logged when moving the switch?
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Archer C7 Wifi button
It seems to be working at a first glance:
But when I logread and then connect a wifi device, a connection of this device is recorded irrespective of the setting of the switch, i.e. with button "pressed" and "realeased".
Code: Select all
logread -f
Mon Sep 12 07:38:14 2016 user.notice root: the button was rfkill and the action was pressed
Mon Sep 12 07:38:24 2016 user.notice root: the button was rfkill and the action was released
Re: Archer C7 Wifi button
That is expected at this stage.
So to recap:
1. We have adjusted the button internal register to match its true external GPIO pin (from 13->23)
1.5. We added the polldev input kernel module which appears to be required for this device.
2. We have verified that the system now recognises that a movement of the switch is an event, and is capable of acting on it.
3. We now need to instruct the system on how to act when this event occurs.
So lets take care of part 3.
Now normally we are only dealing with a single button, so the pressed and released actions happen almost immediately. In your case we are dealing with a sliding switch so the actions happen separately. This means we can just tie different events to different actions instead of having to create a complicated handler script.
In your /etc/config/system file you need to add the following entry
At this point you can probably just run "/etc/init.d/system restart" to reload the system config and setup the button, but if that doesn't work, reboot the router.
The result should be that sliding the switch one way turns the wifi off, and the other way turns it on.
Note that if you turn off the router with the switch in a certain position, it will reset that position as the default "released" state. I don't think we can work around this issue.
Please let me know how this goes. This should be the resolution.
So to recap:
1. We have adjusted the button internal register to match its true external GPIO pin (from 13->23)
1.5. We added the polldev input kernel module which appears to be required for this device.
2. We have verified that the system now recognises that a movement of the switch is an event, and is capable of acting on it.
3. We now need to instruct the system on how to act when this event occurs.
So lets take care of part 3.
Now normally we are only dealing with a single button, so the pressed and released actions happen almost immediately. In your case we are dealing with a sliding switch so the actions happen separately. This means we can just tie different events to different actions instead of having to create a complicated handler script.
In your /etc/config/system file you need to add the following entry
Code: Select all
config button 'wifi_on'
option button 'rfkill'
option action 'pressed'
option handler 'wifi up'
config button 'wifi_off'
option button 'rfkill'
option action 'released'
option handler 'wifi down'
The result should be that sliding the switch one way turns the wifi off, and the other way turns it on.
Note that if you turn off the router with the switch in a certain position, it will reset that position as the default "released" state. I don't think we can work around this issue.
Please let me know how this goes. This should be the resolution.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Archer C7 Wifi button
Perfect. Everything works as it should, including the corresponding LEDs turning on/off as required.
Thank you very much.
Thank you very much.