Adding OpenWrt support for Archer A6 v3

Hi I just got this one too ... The price of this thing is unbeatable (30$ with tax here in India) but I don't know how well its supported. I will be opening this up soon and try to get the bootlogs (assuming it has the uart pins and i dont have to solder anything). But I think this one is promising. I returned the Linksys E5600 I had ( Adding OpenWrt support for Linksys E5600 ) because I just couldn't get it open without actually breaking the thing. I could see the UART pins from the bottom but I would have had to destroy it completely. That I believe has the same chip as this one.

My guess is that the MT7621 is now cheaply and widely available (ERX has been using that for a while maybe thanks to that) and now everyone is making cheap onemesh devices with this. Since MT7621 now supports hwoffload I think these cheap devices have potential. Like 30$ for a gigabit 2x2 AC mesh supported device with WPA3 is already cheap enough, if it gets openwrt then it cant get better than this. I sold my AC68U and ERX along with an AC Lite I had and just have this one and 841n v13 which ill be using as a backup.

Do note the current stock firmware is not great. This device has been available only for a short while so I don't expect it to be but the bandwidth control on it is worse than the 841n v13. I have a 50/50 fiber with an option to upgrade to 200/200 but I think this can handle that too with openwrt if it was ported.

Any devs here that have access to this one?

So this was my last post for this router Archer A6 v3 support

I have opened up the case (pretty easy two screws no sticker breaking) and got shots of the wifi chips. its already known about the config but here are snaps

As you can see the UART is there. I want to know how to connect this to a pi to collect bootlogs. Can someone direct me to an easy tutorial / steps to connect a pi to this board and collect the DTSI ? Help appreciated.

you cannot "collect" the DTSI, you collect information in order for you to write a DTSI and DTS yourself. Looking at the DTS of other similar boards helps a lot

For the UART pinouts, you need to solder pins to it, and then use a multimeter to figure out which pins are 3V and ground. You use ground pin but NOT 3V pin, and then guess which ones are TX and RX (mixing them up has no bad effect).

here is a video about soldering pins in general

Thanks... Will try something ...

Does current openwrt support MT7613BEN? Is it more likely MT7612 or MT7615 ? Can I use MT7612 driver to work with MT7613 ?

Serial Port config@115200

Can anyone tell is it possible to dump the device tree from TP-Link linux?

Both /proc/device-tree or /sys/firmware/devicetree/base are not available

3 Likes

It probably doesn't have a device-tree binary, but even if it does, decompiling it is a pain and it is not necessary or useful anyway.

what you need to do is:

  • find the models of the SOC chip and wireless interface chip
  • find a DTS file in the openwrt project that is "close enough"
  • copy that DTS and remove all device specific things (leds, keys, etc.)
  • build a ramdisk image and load it using serial console + TFTP

from there you can gather more information and fix whatever has errors in the kernel

The pictures are nice so far, but not of the SOC

it looks like the processor is under the aluminum heatsink

Yes processor is with Aluminium heaksink, can feel the heat. Flash size seems to be 16MB.

Trying with re650-v1 example posted earlier, couldn't understand how to update tp-link-safeloader.c, any documentation to refer to?

Also how to identify LED setting?

define Device/tplink_archera6-v3
  $(Device/dsa-migration)
  $(Device/tplink-safeloader)
  DEVICE_MODEL := ArcherA6
  DEVICE_VARIANT := v3
  DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
  TPLINK_BOARD_ID := ArcherA6-V3
  IMAGE_SIZE := 6016k
  SUPPORTED_DEVICES += archera6-v3
endef
TARGET_DEVICES += tplink_archera6-v3

Built the kernel, looks uimage is missing, got openwrt-ramips-mt7621-tplink_archera6-v3-squashfs-factory.bin

how to test in safe way? TFTP is first preferred method to boot to check issues right?

So what is the processor? If you don't know, remove the aluminum heatsink to see....

I don't know where to get the IDs for tp-link-safeloader.c
this is the last step
LEDs is also one of the last steps

first thing you need is an initramfs-kernel.bin
use make menuconfig to select Target Images --> ramdisk
then load with TFTP using the serial console NOT the reset button

you will not get a "uimage" at the end, it will be:

initramfs-kernel.bin
factory.bin
sysupgrade.bin

AFAIK not supported yet, but is similar to mt7615

I also think it is kind of similar to mt7615, but software engineer from Mediatek said that I should apply mt7663 drivers to work with mt7613 :man_shrugging:

CPU is MT7621

system type             : MT7621
machine                 : Unknown
processor               : 0
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 574.46
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VPE                     : 0
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 1
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 574.46
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VPE                     : 1
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 2
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 574.46
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
core                    : 1
VPE                     : 0
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 3
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 574.46
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
core                    : 1
VPE                     : 1
VCED exceptions         : not available
VCEI exceptions         : not available


Getting error, while trying the initramfs tftpboot
Bad Magic Number,01000000

tried running mktplinkfw2 on uimage partition dump of original FW. It is reporting header is not v2/v3.
Not sure how to proceed further.

Tell us what you're doing exactly, or post both the commands and the result together

Yes, it is similar to mt7615 but much more similar to mt7613.

Something like mt7612 and mt7602 is here with mt7663 and mt7613

Setup the TFTP server @192.168.0.5. No switch in-between.

Copied the initramfs.bin file generated form Linux build to TFTP folder and named it as as test.bin. Router expects boot file as test.bin.

Then ran following commands form u-boot command prompt:

tftpboot
bootm

@lukasz92 @arktrin Yes, everything here is supported, and MT76x3 use the same driver, see this commit

1 Like

@vrpatil SHOW YOUR LOGS, very hard to help you otherwise

so did it work or no?

bootm command requires you to put the load address from tftpboot, but because you don't share your output, I have no idea what it is. It might be
bootm 0x81000000

also if it doesn't work, you can try to make tftpboot load it at a different address
tftpboot 0x80800000
bootm 0x80800000

Thanks! Sounds inspiring :grinning:


MT7621 # tftpboot

 NetLoop,call eth_halt !

 NetLoop,call eth_init !
Trying Eth0 (10/100-M)

 ETH_STATE_ACTIVE!!
*** Warning: no boot file name; using 'test.bin'
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'test.bin'.

 TIMEOUT_COUNT=10,Load address: 0x84000000
Loading: checksum bad
checksum bad
T T T T T T T checksum bad
checksum bad
T Got ARP REPLY, set server/gtwy eth addr (a4:ba:db:b2:5c:08)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########
done
Bytes transferred = 5031914 (4cc7ea hex)
LoadAddr=84000000 NetBootFileXferSize= 004cc7ea
MT7621 # bootm
## Booting image at 84000000 ...
Bad Magic Number,01000000
MT7621 #

Tried with loading at 0x80800000, same as above.

MT7621 # tftpboot 0x80800000

 NetLoop,call eth_halt !

 NetLoop,call eth_init !
Trying Eth0 (10/100-M)

 ETH_STATE_ACTIVE!!
*** Warning: no boot file name; using 'test.bin'
TFTP from server 192.168.0.5; our IP address is 192.168.0.1
Filename 'test.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80800000
Loading: Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REPLY, set server/gtwy eth addr (a4:ba:db:b2:5c:08)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########
done
Bytes transferred = 5031914 (4cc7ea hex)
LoadAddr=80800000 NetBootFileXferSize= 004cc7ea
MT7621 # bootm 0x80800000
## Booting image at 80800000 ...
Bad Magic Number,01000000