Opened 3 years ago

Last modified 19 months ago

#19503 new defect

Archer C7 V2 wireless switch on/off on rear side doenst work

Reported by: anonymous Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:


I am using archer C7 V 2 with r45474.
After operate the switch wireless on/off on the rear side of the router nothing happens.
I expected a message in systemlog. The wps/rest button is working fine.

root@OpenWrt:~# cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:

gpio-12 (tp-link:blue:wlan2g ) out lo
gpio-13 (RFKILL switch ) in 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

Maybe it is the function rfkill.

Attachments (1)

mach-archer-c7.c_fix_archer-c7-v2-rfkill.patch (540 bytes) - added by ninno 3 years ago.
Fix Archer-C7 v2 rfkill-switch

Download all attachments as: .zip

Change History (13)

comment:1 Changed 3 years ago by anonymous

I have tested the output of "cat /sys/kernel/debug/gpio" with both switch positions (on/off), no change...

Changed 3 years ago by ninno

Fix Archer-C7 v2 rfkill-switch

comment:2 Changed 3 years ago by ninno

The patch fixes the rfkill-issue for my model (TP-Link Archer-C7 v2).

The switch is not attached to GPIO13, but GPIO23 on that model.

Important: assuming this switch was already working on Archer-C7 v1 or Archer-C5, most likely this would break things on these models if TP-Link rerouted the Switch to that other GPIO for Archer-C7 v2.

Could someone having access to such models please verify if the switch is already working on them in current firmware?

comment:3 Changed 3 years ago by anonymous

Confimed, works with Archer c5 v1 too.

comment:4 Changed 3 years ago by ninno

Sorry to ask again, but i really dont want to break anything, and my initial question was a bit dump.
So for your Archer-C5 v1 the rfkill switch was:

1) working already without the patch, and the patch didnt break it?
2) not working without the patch applied, but the patch fixed it?


comment:5 Changed 3 years ago by anonymous

2.yes, working with patch, not working without patch

comment:6 Changed 3 years ago by tommy.ael@…

Patch confirmed, it's working. Tested on Archer c7 v2.0.

comment:7 Changed 3 years ago by ninno

Unfortunately it would break Archer C7 v1 where GPIO13 is correct, so cant be used as is...

comment:8 Changed 3 years ago by merpmerp

i applied the patch and the rfkill switch works but the "on" position turns wifi off and vice versa

This is on a Archer C7 v2

Last edited 3 years ago by merpmerp (previous) (diff)

comment:9 Changed 2 years ago by yatakama

Re-post from the forum:

I applied the patch to the 15.05 branch r46751 and I noticed that at boot time, regardless of the switch position, wifi is always turned on.
After boot, the first change in position is always interpreted as "pressed" and wifi is turned off. A subsequent change in position results in "released" and wifi is turned back on. No custom hotplug scripts are necessary for this, it works out-of-the-box.

So the logic is not "inverted", it's just that the initial position is ignored.
I'm not sure how this works on V1 but I suspect it's the same.

comment:10 Changed 2 years ago by xcom169

Hello all!
Rfkill support also needed for this in the menuconfig? I'll also test this on my device this week

Last edited 2 years ago by xcom169 (previous) (diff)

comment:11 Changed 2 years ago by anonymous

After patching it works on my C7 v2.

comment:12 Changed 19 months ago by anonymous

This is still broken in the current version. I believe the bug here is that for Archer C7 V1 the rfkill switch is GPIO13, while for V2 it's GPIO23.

It seems that V1 and V2 have different images anyway, so why is the V2 image using the GPIO configuration for V1? The patch presented in this report would break the switch for V1 but fix it for V2, and since the two use different images anyway shouldn't that be a non-issue?

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.