Xiaomi WiFi Router 3G

just installed the latest snapshot of LEDE on my miwifi R3G and i confirm that when the wifi 2.4Ghz Chanel is set to AUTO it doesn't work. you have to set it manualy to any number to get it to work.

Thanks for the tips.

Does anyone know where to find this mediatek Openwrt version that we can see in this video @ 2:27 ?

is this an optimised version of Openwrt ?

That is "stock" firmware of that router.
ZBT uses OpenWRT 14.07

1 Like

Hello everyone,
I just got two of these awesome devices and easily managed to flash snapshot r5217, which does seem to work fine beside some small issues (I did not do any extensive testing, btw).

While you may be ok with the stock U-Boot, I was wondering if it would be possible to port a newer version or to add useful features like mtd or a web interface like pepe2k's u-boot_mod for ar9331.
Since U-Boot is GPL2-licensed, should we expect Xiaomi to release the source or do they believe in open source as much as Mediatek does?
The other option would be to grab everything (datasheets, u-boot sources for other mt7621 boards, etc) I can find online and try to make something out of that.

I also need to sort out JTAG connections if there are any (like test pads or on passive components) but after a first look at the board they do not seem to be there...
An alternative would be to install an SPI flash in the unpopulated layout, and put a backup bootloader in it in case we need to restore the NAND... If Xiaomi decided to even put the layout there, there must be a way to make it work.

I am a programmer and embedded electronics enthusiast myself but I haven't really ever dived into this kind of system programming and/or hardware reverse engineering, so any recommendation or advice is appreciated.

Thank you guys

Hi,
I'm looking for the best router for LEDE, to use it as a all-time-online linux box for file sharing, bittorrent, etc..
Is this the best I can find for under 100$ ?
it's 50$ on aliexpress/ebay.
It don't seems fully supported right now but I think it will be, it's a best seller on those websites.

Right now, this is not the best choice... It's still in the works and it's based on the mt76 wifi driver which is not yet production-ready (AFAIK, I don't really have an extensive experience with this driver).

You could look in these two sticky topics:


I looked there, too many opinions I could not decide. What do you suggest ?

ipq40xx (AVM Fritz!Box 4040) would be within that price bracket, it should have better CPU performance than mt7621, but might not quite reach its WAN to LAN routing performance.

@xaviiz

For the Moment it´s nice to play with the Xiaomi R3G - but it´s not ready for daily use -> sure it will be in future!

A good Pick is the Archer C7 v2 for example.... grab eBay for a second Hand Device.

For me is very stable.
Uptime 11 days with OpenVPN server (2 connected clients), SQM, samba, upnp, ddns, minidlna, MLdonkey running on USB HDD (Thanks to mstm).
2.4 GHz (Channel 1) -> 8 devices
5 GHz (Channel 36) -> 3 devices


The only problem are these warnings on kernel log

[732578.827072] WARNING: CPU: 0 PID: 3 at /home/craz/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/mt76-2017-10-12-37654d70/mt7603_mac.c:380 mt7603_mac_fill_rx+0x120/0x3a8 [mt7603e]
[732578.844173] Modules linked in: pppoe ppp_async pppox ppp_mppe ppp_generic nf_conntrack_ipv6 iptable_nat ipt_REJECT ipt_MASQUERADE xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CLASSIFY usblp ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uas slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow
[732578.915217]  cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress mt76x2e mt7603e ledtrig_usbport mt76 mac80211 cfg80211 compat ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ip_gre gre ifb ip_tunnel tun vfat fat ntfs nls_utf8 nls_iso8859_1 nls_cp437 sha1_generic ecb usb_storage leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd sd_mod scsi_mod gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc32c_generic
[732578.957223] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G        W       4.9.57 #0
[732578.964582] Stack : 00000000 00000000 80537b2a 00000043 803f4904 00000000 00000000 80530000
[732578.973015]         8fc50edc 804d5da7 8046e87c 00000000 00000003 80533824 81192500 8ed11a00
[732578.981444]         00000000 8006b8a8 00000001 80530000 804dbea4 804dbea8 80473464 8fc63c64
[732578.989875]         00000003 800a8290 81192500 8ed11a00 81211e20 00000000 8052bcc0 00c63c64
[732578.998307]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[732579.006735]         ...
[732579.009257] Call Trace:
[732579.011802] [<8000f884>] show_stack+0x54/0x88
[732579.016236] [<801d9abc>] dump_stack+0x8c/0xd0
[732579.020660] [<8002bdd4>] __warn+0xe4/0x118
[732579.024823] [<8002be9c>] warn_slowpath_null+0x1c/0x30
[732579.029960] [<8ed2bf94>] mt7603_mac_fill_rx+0x120/0x3a8 [mt7603e]
[732579.036127] [<8ed2ae30>] mt7603_queue_rx_skb+0x9c/0xe4 [mt7603e]
[732579.042213] [<8ed7cd6c>] mt76_dma_attach+0xa9c/0xc94 [mt76]
[732579.047969] ---[ end trace 4a9eaf10e6375c4c ]---

and

[998003.798462] WARNING: CPU: 1 PID: 11110 at /home/craz/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/mt76-2017-10-12-37654d70/mt7603_mac.c:1285 mt7603_mac_work+0x124/0x248 [mt7603e]
[998003.815737] Modules linked in: pppoe ppp_async pppox ppp_mppe ppp_generic nf_conntrack_ipv6 iptable_nat ipt_REJECT ipt_MASQUERADE xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CLASSIFY usblp ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda uas slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow
[998003.886763]  cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress mt76x2e mt7603e ledtrig_usbport mt76 mac80211 cfg80211 compat ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ip_gre gre ifb ip_tunnel tun vfat fat ntfs nls_utf8 nls_iso8859_1 nls_cp437 sha1_generic ecb usb_storage leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd sd_mod scsi_mod gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc32c_generic
[998003.929072] CPU: 1 PID: 11110 Comm: kworker/u8:1 Tainted: G        W       4.9.57 #0
[998003.936920] Workqueue: phy0 mt7603_mac_work [mt7603e]
[998003.942033] Stack : 8c4ccc00 804d0000 8046e87c 8ed2e998 00000009 00000505 8fc04a18 8c4ccc18
[998003.950468]         00000088 8006b8a8 8046e87c 00000001 00002b66 80533824 8046e7e8 8c701d54
[998003.958903]         804d0000 800a8290 00000001 80530000 804dbea4 804dbea8 80473464 8c701d54
[998003.967351]         804d0000 80043260 8fc04a18 8c701d8c 00000a2d 00000000 8ec91ea0 00701d74
[998003.975787]         8ed2d638 8fd4ca00 8fd4cb00 30796870 00000000 00000000 00000000 00000000
[998003.984220]         ...
[998003.986746] Call Trace:
[998003.989294] [<8000f884>] show_stack+0x54/0x88
[998003.993743] [<801d9abc>] dump_stack+0x8c/0xd0
[998003.998181] [<8002bdd4>] __warn+0xe4/0x118
[998004.002347] [<8002be9c>] warn_slowpath_null+0x1c/0x30
[998004.007492] [<8ed2d75c>] mt7603_mac_work+0x124/0x248 [mt7603e]
[998004.013422] [<8004107c>] process_one_work+0x200/0x348
[998004.018548] [<80041f74>] worker_thread+0x2d4/0x45c
[998004.023418] [<80046b40>] kthread+0xe0/0xf4
[998004.027587] [<8000a478>] ret_from_kernel_thread+0x14/0x1c
[998004.033148] ---[ end trace 4a9eaf10e6375c4d ]---

how to upgrade firmware LEDE on my MIR 3G ?

There on russian forum 4pda one user integrate SPI FLASH http://4pda.ru/forum/index.php?s=&showtopic=837667&view=findpost&p=65661552

Thank you w2w, I should have checked 4PDA earlier...

So, as far as I understand it:
-- on the MT7621 SoC, NAND and SPI buses are muxed on the same pins (therefore you can only use one at a time)
-- J10 and J11 jumpers need to be closed to enable and select the SPI flash as boot source
-- a 4.7k resistor should be soldered between pin 3 (WP) and pin 8 (VCC) of the SPI flash to disable write protection
-- we can use U-Boot from ASUS RT-N56U B1

So I soldered a blank W25Q64 (8MB) chip and discovered that you can't boot from NAND again unless you remove the SPI flash.
I also did not flash U-Boot on the SPI flash beforehand, thinking I could do it in-system using a SOIC clip; I still have to find a way to keep the MT7621 in reset (maybe through the PORST_N signal/ball).

no. you need compile u-boot for mt7621 and flash U-Boot on the SPI flash beforehand.
and you can register on 4pda and write QMS for 4pda user Sedy http://4pda.ru/forum/index.php?showuser=80862

I flashed breed using mtd write but now the led doesn't power on and it doesn't reply to 192.168.1.1

Hello! How do I perform sysupgrade, if sysupgrade file has .tar but not .bin extension?

You must use the .tar file

Did you follow the instructions in the first message?

https://github.com/lede-project/source/commit/f2107fc328ff7f9817fe9ca64f84bba9e32abfc6

No, I flashed BREED only so as to have a failsafe bootlaoder for recovery (ironic in hindsight :slight_smile: ) and would flash LEDE after that through BREED. Is it possible to recover without serial now? LED doesn't poweron, only the ethernet link status led (green) blinks when a cable is connected.

If not how do I recover with serial? I wrote breed to the Bootloader mtd partition

mtd write breed.img Bootloader

How does one flash lede using BREED? I've tried to do this a couple of times without success.