Adding OpenWrt support for Xiaomi "Redmi Router AX6S"/"Xiaomi Router AX3200"

just want to ask since in his post, it looks like he only had 3 wires sticking out from the router. which pinouts are those 3 and which is the 1 pinout that don't need to be hooked in the serial

You need Tx, Rx and GND pins.

1 Like

I experience exactly the same, latest RB01 were the newer model with Telnet disabled so I had to flash with TTL. Older models show more disk space in OpenWrt status page than newer one. Flashed using this method - https://github.com/mikeeq/xiaomi_ax3200_openwrt#uart-flash

[ 0.755849] 10 fixed-partitions partitions found on MTD device 1100d000.snfi
[ 0.762904] Creating 10 MTD partitions on "1100d000.snfi":
[ 0.768390] 0x000000000000-0x000000080000 : "Preloader"
[ 0.774793] 0x000000080000-0x0000000c0000 : "ATF"
[ 0.780201] 0x0000000c0000-0x000000140000 : "u-boot"
[ 0.786238] 0x000000140000-0x000000180000 : "u-boot-env"
[ 0.792231] 0x000000180000-0x0000001c0000 : "bdata"
[ 0.797775] 0x0000001c0000-0x000000240000 : "factory"
[ 0.803914] 0x000000240000-0x000000280000 : "crash"
[ 0.809455] 0x000000280000-0x0000002c0000 : "crash_log"
[ 0.815330] 0x0000002c0000-0x0000006c0000 : "kernel"
[ 0.828460] no rootfs found after FIT image in "kernel"
[ 0.833684] 0x0000006c0000-0x0000075c0000 : "ubi"
.....
[ 1.605135] ubi0: attaching mtd9
[ 2.184203] ubi0: scanning is finished
[ 2.193720] ubi0: attached mtd9 (name "ubi", size 111 MiB)
......
[ 7.230535] UBIFS (ubi0:2): Mounting in unauthenticated mode
[ 7.236260] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 842
[ 7.270591] UBIFS (ubi0:2): recovery needed
[ 7.348962] UBIFS (ubi0:2): recovery completed
[ 7.353455] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[ 7.361285] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 7.371196] UBIFS (ubi0:2): FS size: 55488512 bytes (52 MiB, 437 LEBs), journal size 2793472 bytes (2 MiB, 22 LEBs)
[ 7.381629] UBIFS (ubi0:2): reserved for root: 2620859 bytes (2559 KiB)
[ 7.388241] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID E0D6C05C-5DF3-45BA-9C88-05B2915008E0, small LPT model

older model where Telnet were enabled, can we recover the lost space or is it hardware change

[ 0.756076] 10 fixed-partitions partitions found on MTD device 1100d000.snfi
[ 0.763131] Creating 10 MTD partitions on "1100d000.snfi":
[ 0.768618] 0x000000000000-0x000000080000 : "Preloader"
[ 0.775018] 0x000000080000-0x0000000c0000 : "ATF"
[ 0.780420] 0x0000000c0000-0x000000140000 : "u-boot"
[ 0.786457] 0x000000140000-0x000000180000 : "u-boot-env"
[ 0.792407] 0x000000180000-0x0000001c0000 : "bdata"
[ 0.797964] 0x0000001c0000-0x000000240000 : "factory"
[ 0.804094] 0x000000240000-0x000000280000 : "crash"
[ 0.809630] 0x000000280000-0x0000002c0000 : "crash_log"
[ 0.815501] 0x0000002c0000-0x0000006c0000 : "kernel"
[ 0.828548] no rootfs found after FIT image in "kernel"
[ 0.833772] 0x0000006c0000-0x0000075c0000 : "ubi"
.....
[ 1.604841] ubi0: attaching mtd9
[ 2.182240] ubi0: scanning is finished
[ 2.191627] ubi0: attached mtd9 (name "ubi", size 111 MiB)
.....
[ 7.263133] UBIFS (ubi0:1): Mounting in unauthenticated mode
[ 7.268897] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 842
[ 7.337394] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[ 7.345217] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 7.355139] UBIFS (ubi0:1): FS size: 99930112 bytes (95 MiB, 787 LEBs), journal size 4952064 bytes (4 MiB, 39 LEBs)
[ 7.365570] UBIFS (ubi0:1): reserved for root: 4719945 bytes (4609 KiB)
[ 7.372184] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID B8472A40-C071-45F2-A1C4-A7F8DE0174EE, small LPT model
[ 7.384324] mount_root: overlay filesystem has not been fully initialized yet

Or is there a way to resize it?

Different nand chips but will that make a difference?

new
[ 0.739005] mtk-snand 1100d000.snfi: chip is GD5F1GQ5xExxG, size 128MB, page size 2048, oob size 128

old - report more diskspace on status screen
[ 0.741004] mtk-snand 1100d000.snfi: chip is F50L1G41LB, size 128MB, page size 2048, oob size 64

Ok, got the space back

In OpenWrt SSH, I erased mtd9 and then using TTL re-installed sysupgrade

1 Like

Hello everyone,
I'm new owner of AX3200 RB01 device and i'd like to flash it to OpenWRT. My device is manufactured in 11/2021, with telnet disabled and 1.0.83 firmware. I've tried to 'upgrade' it to 1.0.71 (as in first step in @mikeeq 's UART Flash manual), but got message that "For security reasons, selecting to upgrade to firmware whose version number is lower than that of the current one is not permitted" . My question is: is there a reason to use 1.0.71 or fw will get overwritten anyway so version doesn't matter? Should i check anything before flashing updated device?
Regards,
Lukasz

Can't comment on 1.0.83 firmware, I used the process on 1.0.50 firmware and it worked, so it does not 100% have to be 1.0.71. All depends if they changed u-Boot in 1.0.83.

I haven't seen a new uboot deployed in a firmware update for these, to my recollection, but then again I've only examined the AX6S images. I can't be bothered setting up monitoring scripts to watch the EU update channel.

I'm not sure it really matters, I don't believe uboot gets updated on these models, and the older image would need to have a uboot image as well anyway. You can just change the downgrade parameter to 1 in the url and resubmit, or use the tftp recovery if you really want to downgrade the image.

1 Like

just want to ask if i can use this? this adaptor says 3.3v but the vcc is 5v indicated at the pinout

This should be OK. I think the 5v is a typo. Anyway you don't need this pin.

i tried following the guide here
but it throws off gibberish.
ssss

You shouldn't connect 3.3v

i only connected tx rx and gnd


111111111111111111111111111
image

1 Like

Did you make sure that Tx is connected to Rx?

yes, tx to the rx and vice versa

Wiring looks correct, maybe a problem with your UART/TTL device?

I used this.

Ok, got the space back

In OpenWrt SSH, I erased mtd9 and then using TTL re-installed sysupgrade

Ah, interesting. Same here, partition is smaller. Is there any way to do this without serial access/during runtime? Guess not, as it's mounted while running?

I am sure some clever OpenWrt techie might have a way to do it without having to reflash. Unfortunately I am not that techie :man_technologist:t2:.

1 Like

Firstly, thanks so much for the assistance you've offered in this thread, I really appreciate it.

I haven't built anything in a while and I'm trying to build openwrt 22.03.0-rc4 with the mediatek drivers. I've cloned your git and copied the luci-app-mtwifi, mt_wifi and mt7622 directories into the openwrt/package directory.

Should I change the >Kernel Modules >Wireless Drivers >kmod-mt7622 to built-in or leave it as a module?

Also, where are the open source drivers located so I can deselect them from the build? Are these the open source drivers and should I deselect them all from here?

Thanks again for your help! :slight_smile:

Edit: Should I disable Kernel Modules > Wireless Drivers > kmod-mt76 ? Is this the open source driver?

And what do you mean by "2. Add mtkwifi reload to the startup script"?

I've compile v22 rc5 with mtk driver but wifi doesn't work I don't know how to add mtkwifi reload
we need guide step by step :sweat_smile::sweat_smile:

Did you make the change here?

1 Like

no I don't touch anything inside just select mtk driver snd remove mt76 from menuconfig.