MT7603EN/MT7612EN Wifi Troubles on Netgear R6220

I uploaded my compilation of 18.06.01. I added the .config i used as a make file, so you can get an idea which packages are included (luci, relayd, ...). Use this firmware ON YOUR OWN RISK. According to the explanation of dksl, my firmware only works for r6220, which shows one erase block before 0x2e00000 address.

1 Like

I made a build a while back just for this use case

1 Like

I happened to try this and it worked for me. I can share the bootlog if anyone needs. badblock errors still exist but it's not messing with MAC IDs. My poor 5GHz performance improved tenfold too.

Good news, the patch posted by Jo-Philipp Wich in a comment of the bug report can solve the issue. I've tested it and worked for me.

5 Likes

Can someone recompile this and publish it? I'm very curious to try it out.

1 Like

Sure. Ill start building now

I saw that bug report and was curious how to do a "local build" I've tried to search around on the forums but haven't seen any instructions.

I'd like to get this fix applied to my router, can anyone point me in the right direction?

I experienced a few reboots of the router for no reason. It just rebooted. My setup is very simple, just wan and wifi configured plus few ports forwarded, network is rather small (a few not very active users) and not very stressing (wan is slow and just web browsing). Other than that it works fine, it's the supported version.

@abishur: Creating a "local build" is not that difficult but requires some (basic) developer skills. You can follow the following manuals in order to set up your build system:
https://openwrt.org/docs/guide-developer/build-system/start
https://openwrt.org/docs/guide-developer/build-system/install-buildsystem
(if you don't have a Linux host there is a manual on how to install a virtual environment as well: https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide)

After installing your build system and downloading all sources of v18.06.2 (current version) you apply the patch provided by Jo-Philipp Wich using the 'patch' command. This is the code provided by Jo-Philipp:

diff --git a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch
index d50e689110..03b2b36db9 100644
--- a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch
+++ b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch
@@ -3578,7 +3578,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      if (!err) {
 +              MSG(INIT, "[mtk_nand] probe successfully!\n");
 +              nand_disable_clock();
-+              shift_on_bbt = 1;
++              shift_on_bbt = 0;
 +              if (load_fact_bbt(mtd) == 0) {
 +                      int i;
 +                      for (i = 0; i < 0x100; i++)

If you are not familiar with the 'patch' command a simple manual can be found here:
https://linuxacademy.com/blog/linux/introduction-using-diff-and-patch/

Going on just follow the manual on how to create an image: https://openwrt.org/docs/guide-developer/build-system/use-buildsystem

If you have OpenWrt installed on your router already you can use the file with the ending sysupgrade.tar directly using LuCI to update your router.

Hope this helps - otherwise cross fingers that the patch gets tested soon so it will be part of the next point release. :slight_smile:

BR
Rene

1 Like

hi. im back on openwrt after som 5-6 year i think..

i have read most of the post in this tread.. i have the issue with my r6220 that sometimes it makes the wifi go slow.. but i can't really finde large issue as i see it that should be an issue.

the only thing i can finde is an warning and a "Bad eraseblock" pastet in here

[  710.742065] ------------[ cut here ]------------
[  710.751297] WARNING: CPU: 0 PID: 0 at /build/openwrt-18.06/slaves/phase1/ramips_mt7621/build/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/mt76-2019-01-25-0b939dc7/mt7603/beacon.c:52 0x877479ac [mt7603e@87740000+0x8d40]
[  710.791470] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD xt_CT slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd gpio_button_hotplug usbcore nls_base usb_common
[  710.932813] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.95 #0
[  710.944757] Stack : 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000000
[  710.961389]         00000000 00000000 00000000 00000000 00000000 00000001 87c09d20 532616be
[  710.978014]         87c09db8 00000000 00000000 000062c8 00000038 80480738 00000008 00000000
[  710.994640]         00000000 80530000 000e3bcd 00000000 87c09d00 00000000 80550000 877479ac
[  711.011268]         00000009 00000034 876d1560 00000001 00000003 802994b8 00000000 80590000
[  711.027898]         ...
[  711.032754] Call Trace:
[  711.032789] [<80480738>] 0x80480738
[  711.044564] [<877479ac>] 0x877479ac [mt7603e@87740000+0x8d40]
[  711.055986] [<802994b8>] 0x802994b8
[  711.062917] [<80010090>] 0x80010090
[  711.069842] [<80010098>] 0x80010098
[  711.076766] [<8046975c>] 0x8046975c
[  711.083691] [<80070fd4>] 0x80070fd4
[  711.090617] [<8002e948>] 0x8002e948
[  711.097544] [<877479ac>] 0x877479ac [mt7603e@87740000+0x8d40]
[  711.108971] [<877478bc>] 0x877478bc [mt7603e@87740000+0x8d40]
[  711.120393] [<8002ea0c>] 0x8002ea0c
[  711.127328] [<877479ac>] 0x877479ac [mt7603e@87740000+0x8d40]
[  711.138747] [<80486b2c>] 0x80486b2c
[  711.145677] [<87743464>] 0x87743464 [mt7603e@87740000+0x8d40]
[  711.157103] [<86c33c30>] 0x86c33c30 [mac80211@86c00000+0x67e00]
[  711.168885] [<87747a6c>] 0x87747a6c [mt7603e@87740000+0x8d40]
[  711.180317] [<80032c94>] 0x80032c94
[  711.187245] [<80486c68>] 0x80486c68
[  711.194173] [<80033084>] 0x80033084
[  711.201098] [<8024ffec>] 0x8024ffec
[  711.208025] [<8000b4e8>] 0x8000b4e8
[  711.214946] 
[  711.218159] ---[ end trace a5bcf52963fbd76d ]---

and

[    2.865843] nand: Macronix NAND 128MiB 3,3V 8-bit
[    2.875203] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.890284] Scanning device for bad blocks
[    3.057757] Bad eraseblock 602 at 0x000004b40000
[    3.072110] Bad eraseblock 622 at 0x000004dc0000
[    3.187378] 6 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.200893] Creating 6 MTD partitions on "MT7621-NAND":
[    3.211298] 0x000000000000-0x000000100000 : "u-boot"
[    3.222275] 0x000000100000-0x000000200000 : "SC PID"
[    3.233199] 0x000000200000-0x000000600000 : "kernel"
[    3.244135] 0x000000600000-0x000002200000 : "ubi"
[    3.254728] 0x000002e00000-0x000002f00000 : "factory"
[    3.265852] 0x000004200000-0x000007e00000 : "reserved"
[    3.277584] [mtk_nand] probe successfully!
[    3.286462] Signature matched and data read!

This commit from x-wrt for the Netgear R6220 solved the problem of multiple flash layouts. The single image automatically adjusts the factory partition address.

Commit: https://github.com/x-wrt/x-wrt/commit/595d96c994476eede998e205b6791b638fb9459d

Any chances this could be sent to OpenWrt upstream.

How is this related to Wifi issues on R6220?

If you check the previous replies and discussions, it is clearly known that R6220 has three different flash layouts. And using the incorrect firmware generates a random MAC address for the interfaces and hence the unstable wireless.

ItĀ“s a trap :wink: ThereĀ“s an infinite number of flash layouts depending on the number of bad eraseblocks of YOUR device.
This is the correct solution:

2 Likes

How can i install the patch?
Is there a precompiled image i could download or do i have to do a local build myself ?

You can find precompiled images here: https://github.com/jayanta525/openwrt-netgear-r6220-100ins

I just bought this router and I experience lot's of reboot for no reason in 18.06.04. The WLAN interface MAC perfectly matchs address printed on packaging and WiFi performance looks good.
Do you think my issue could be related to the one describe here ?

Could you provide the log ? Also check your power to the router.

@danghuy1994 do you mean kernel log at boot ? Because logs are lost during reboot...
Regarding "power", I'm using the regular power adaptor... but I'm also using USB port with a smartphone for tethering.

Show whole log please.
I suspect to see bad erase blocks in kernel part of NAND.