Plans for OpenWrt to support TP-Link TL-WR902AC?

TP-Link has recently released the TL-WR902AC - a successor to the TL-MR3020 portable router (I am a big fan of the MR3020 which I use it as a private network and local VPN endpoint when I am travelling). I would love to see this new router supported by LEDE, if possible. Does anyone know if this is likely to gain support sometime soon and/or if there are any major issues blocking support?

The new device adds 802.11ac support with both 2.4G and 5G radios. According to WikiDevi, it uses a Qualcomm Atheros QCA9531 SoC and has 8MB flash + 64MB RAM, and has a default firmware OS that is Linux 2.6.31 based. Like the older model, it also has a USB A port for 3G/4G sticks or storage (or with OpenWRT/LEDE, pretty much any supported USB device). It retails for US$45.

Wikidevi info on the TL-WR902AC


Is there any news on supporting/ porting for this device?

As long as nobody provides any useful data to add support, there will be no activities in this regard.

How to gather useful data:

Support for TL-WR902AC v1 is ready in my stagging tree:;a=summary

@pepe2k - That's great news! Thanks! Will this eventually be merged into the main branch and integrated in a future major update (i.e. 17.01.3)?

In master, yes, but I won't backport it to 17.01 branch.

Snapshot support added today, firmware images are available at

Nice work, indeed!

However, I found that there is a catch: If you flash the device with the factory bin and then try to re-flash it via LUCI again with the factory image, it won't boot but instead go into a boot loop with this message:

Autobooting in 1 seconds
## Booting image at 9f020000 ...
Uncompressing Kernel Image ... Stream with EOS marker is not supportedLZMA ERROR 1 - must RESET board to recover

U-Boot 1.1.4 (Sep 5 2016 - 15:55:05)

ap143-2.0 - Honey Bee 2.0

When I modify the image, I found it is often better to flash the device with the factory image again instead of the sysupgrade image, in case the layout changes. With OpenWRT, this always worked.
Maybe that is a side-effect of the "metadata" image, such that factory can only be flashed by uBoot and sysupgrade by LEDE itself? Even if that was the case, LEDE should deny flashing the factory image again.

Factory image is dedicated only for flashing from vendor firmware!
And it's nothing new, it's always been like that.

No, this is definitely not right. Maybe it worked with other TP-Link devices (the older ones) which factory and sysupgrade images differ only in stripped (or not) padding. You should never use factory image to upgrade/re-flash LEDE/OpenWrt image, sysupgrade is for that, only.

No... and yes. When we finally switch (someday) to metadata-only sysupgrade images, you would need to use force mode to sysupgrade to image which doesn't contain metadata or device isn't included inside the metadata supported devices list. As we don't force metadata yet in ar71xx and for this board I didn't include any additional image check in platform_check_image(), you can actually upgrade to any image... maybe I will add at least header check so that people like you won't be able to (easy) break their devices.

Thanks, works great.
Set the router up as WPA2-supplicant media bridge with relayd, works like a charm.

Thanks for feedback!

I just found out that this device has another one LED... tiny one, inside RJ45 socket :smiley:

Yep, the commit in your staging tree is a quick win for me and my customers - I have to switch to the TL-WR902AC because the TL-MR3020 is EOL. I saw the other commit for the additional LED, too.

Again: Great work!

Hi - is the 5ghz radio supported?

Yes it is.

... and suddenly, the stability of this device increases ten-fold over stock f/w! Massive thanks :slight_smile:

One thing I've not manage to figure out ... any ideas how to access the status of the 3-posn switch? I can see there is some GPIO code for it in the commit, but being new to OpenWrt and Lede, don't know where to look for this (I found the LEDs and the WPS button - I assume I'm close?!)


Untested on the TL-WR902AC (I plan to get one of these soon, but haven't had time to do this yet)...

For boot-time detection of that switch, I am running a few scripts on my TL-MR3020 running LEDE 17.01.2 (I don't recall where I found the basis for this, but if you search for the MR3020 switch with OpenWRT, you may find similar things):

Don't forget to add execute permissions to the scripts.


check_mode_sw() {
	sw1='grep -qe sw1.*in.*hi /sys/kernel/debug/gpio'
	sw2='grep -qe sw2.*in.*hi /sys/kernel/debug/gpio'
	if $sw2 ; then
		if $sw1 ; then
	echo $swmode
mode=$( check_mode_sw mode )
echo "$mode"


case $1 in
		# Do your AP-mode stuff here
		# Do your WISP-mode stuff here
		# Do your 3G-mode stuff here


#!/bin/sh /etc/rc.common
start() {
	mode=$( slidesw_check )
	echo $mode > /boot_mode  # write the status to /boot_mode for troubleshooting and/or use with other scripts
	/sbin/boot_mode_script $mode 

You may need to tweak these things for the WR902AC. And if you want to do real-time (post-boot) detection of this switch, it should be possible to do this in the hotplug section.

Please report back about any successes and/or issues.

1 Like


Can confirm the switch works in the same way on the WR902AC ...

Share ETH:

root@lede:~# grep 'sw[12]' /sys/kernel/debug/gpio 
 gpio-14  (                    |sw2                 ) in  lo    
 gpio-17  (                    |sw1                 ) in  hi

Share Hotspot:

root@lede:~# grep 'sw[12]' /sys/kernel/debug/gpio 
 gpio-14  (                    |sw2                 ) in  hi    
 gpio-17  (                    |sw1                 ) in  lo    

AP/Rng Ext/Client

root@lede:~# grep 'sw[12]' /sys/kernel/debug/gpio 
 gpio-14  (                    |sw2                 ) in  hi    
 gpio-17  (                    |sw1                 ) in  hi 

What's the process for loading the factory image? When I try loading it via the TP-Link web GUI I get the following error:

Error code: 18011
Error occurred, please try again.

I also tried tftp server with no success.

I'm on:
Firmware Version: 3.16.9 Build 20160905 Rel.61455n
Hardware Version: TL-WR902AC v1 00000000

I got hold of the factory bin from the device page and flashed that using
the TP-Link stock web page. Subsequent flashing will require the sysupdate

Google doesn't shed any light on the error so I'm at a loss other than
re-download and try again after a factory reset of the device(?)

About that switch again ...

I've had a little play and have something (a little inelegant) that can start at boot and will monitor the position of the switch in real time (well, every second!) Thought I'd share ....

#! /bin/sh

while true; do
	val=$(grep 'sw[12]' /sys/kernel/debug/gpio | cut -c 59-61)
	val=$(echo $val | sed 's/hi/1/g;s/lo/0/g;s/\s//g' | awk 'func b2d(i, t,a,c){a=1;for(c=length(i);c>0;c--){t+=substr(i,c,1)=="1"?a:0 ;a*=2}return t}{printf "%d\n",b2d($1)}')
	case $val in 
			# Do Share ETH stuff here
			# Do Share Hotspot stuff here
			# Do AP / Range Extender / Client stuff here
			# Should never get here!
	sleep 1