Adding OpenWrt support for Archer A6 v3

If read carefully then FCC ID:TE7A6V3.
So this link shows more info.

1 Like

I am not so good with Linux, have worked on Ubuntu server few years back.
Sure can try it out. Please let me know what needs to be done

I am assuming the CPU for your board, MT7621DAT is the same as MT7621A

Here is the commit for a very similar board, start studying the DTSI file to understand how the kernel is configured in this situation. (in this commit they converted a DTS into a common code DTSI which is included for more than one board).

probably you need a UART cable to access bootloader and root shell

start collecting info such as:

what bootloader there is and the options for booting
kernel log
flash partitions cat /proc/mtd
dumping the "factory" partition hexdump -C /dev/mtdX

I checked the code on github but not able to understand it :sweat_smile:

So basically....if you look at the DTSI file

each block of

something {
...
...
}

is called a node and represents defining a subdevice that is part of the router
within all the nodes is information that the kernel needs to use it

for example the compatible values like
compatible = "gpio-keys";

this tells a driver for the kernel that the following items in the node are all buttons/switches, like the reset button

everything in the "keys" node is a button
the "gpios" value tells another driver which pin number is for the button
and whether it is activated when the input is a HIGH or LOW (3V or GND)
the "linux,code" value tells the driver which software event to map that button to

However, GPIO stuff should be done later
you need to make a DTS using the things you know about the board with less nodes

the important ones being:
the root node (with the model and SOC compatible)
spi0 (for flash)
switch0 (for ethernet)
pcie0 (for wifi)
pcie1 (for another wifi interface if you have it)

it's possible that one of the wifi interface is not through a PCI device

A lot of this information can be found through the kernel log
otherwise looking around /sys in the shell provided by UART
or just knowing what's on the board by tracing pinouts (or just looking at them on the board)

You can also look at the DTS for Archer A6 v2 for some information
but the names of many things will be different...I mean this for basic things like how many wifi interfaces, what kind of ethernet interface and how they are defined, but you cannot use the same information exactly.

1 Like

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