Xiaomi WiFi Router 3G

I think I've found the guilty party. It was neither legacy_rates nor txpower. Not even disassoc_low_ack, which I've disabled in the third step. Nothing have changed after modification of these settings. Reboots happened usually every couple of hours, the shortest recorded interval between them was 15 seconds.

Despite the reboots I've decided to make a bold move and migrate all the rest of my devices from my old router/AP to the Xiaomi. It was broadcasting different SSID and on different channel than MIR3G (6th, and Xiaomi I was testing on 1st and later 9th), but was located maybe half a meter from it. After turning the old AP off Xiaomi haven't crashed for almost 28 hours and counting.

It seems there is some sort of nasty bug in the mt76 driver somewhere which makes it vulnerable to this sort of DoS attack, however it usually doesn't show in more natural circumstances.

I already built the images (kernel,system and sysupgrade.tar) if you run openwrt just upgrade with sysupgrade.tar. Of course you have to ise images inside mir3g directory which is our device's name.

1 Like

thank you, do not look at the end of the file, I'll try it to see how it's going to be done, thanks again for the help.

This may sound crazy but as stock rom is based on openwrt, can't we just reverse engineer it up to a point where it can be fully customized and become pure openwrt rom with all features

"Based on OpenWrt" doesn't mean a whole lot, if kernel and wireless modules have been replaced with an ancient vendor kernel full of (usually) proprietary stuff.

The state of mt7621 in general and the Xiaomi Mi 3g however should be pretty good in LEDE, so there's nothing left to learn from the stock firmware - development of the mt76 wlan drivers happens independent of that either way.

Hi! I'am in trouble. I flash latest lede firmware with 4.14 kernel. And opkg update doesnt finish, network lagging and can't flash breed bootloader :frowning:

Could not open mtd device . Bootloader can't open device for writing. cat /proc/mtd have Bootloader

Please help me :frowning:

To make bootloader mtd part writeable, install kmod-mtd-rw to allow writing to all mtd parts...

Dont understand why all want to install breed???

opkg update doesn´t finish??? it is better to do a sysupgrade with a full image instead of only packages with opkg...
check https://github.com/richb-hanover/OpenWrtScripts for the script to create a list with all installed packages before sysupgrade and restore your packages with that script after sysupgrade

1 Like

Thanks! You save me. It works!

Hey, HeadLess

Just wanted to say thank you for the compiled images. I used the kernel and system provided by openwrt and your sysupgrade because I don't really know how to properly setup openwrt since it's my first time using it.

Wonderful work, man. I switched from Padavan because I had some latency issues with it. Hopefully Openwrt/LEDE is better.

Just a quick question. Are people here having problems with automatic channel selection? The wifi completely stops working after I set it on auto it shows "Wireless is disabled or not associated" even when enabled.

It is strange but on my image it happens i didn't notice that since i don't use autmatic selection, because that is sucks. Maybe it tries to set a DFS channel but that is not working? i don't know.

Or maybe the full hostapd causing this? thanks for your inform...

Mon Apr 16 21:04:44 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy1.conf
Mon Apr 16 21:04:44 2018 kern.info kernel: [685639.459147] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Mon Apr 16 21:04:44 2018 daemon.notice hostapd: wlan1: INTERFACE-ENABLED
Mon Apr 16 21:04:44 2018 daemon.notice hostapd: wlan1: INTERFACE-DISABLED
Mon Apr 16 21:04:44 2018 daemon.err hostapd: nl80211: Could not configure driver mode
Mon Apr 16 21:04:44 2018 daemon.notice hostapd: nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Mon Apr 16 21:04:44 2018 daemon.err hostapd: nl80211 driver initialization failed.
Mon Apr 16 21:04:44 2018 daemon.notice hostapd: wlan1: interface state UNINITIALIZED->DISABLED
Mon Apr 16 21:04:44 2018 daemon.notice hostapd: wlan1: AP-DISABLED
Mon Apr 16 21:04:44 2018 daemon.notice hostapd: wlan1: CTRL-EVENT-TERMINATING
Mon Apr 16 21:04:44 2018 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan1 wasn't started
Mon Apr 16 21:04:44 2018 daemon.notice netifd: radio1 (7142): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process 2601 path ()
Mon Apr 16 21:04:44 2018 daemon.notice netifd: radio1 (7142): Device setup failed: HOSTAPD_START_FAILED

Also happens on the one provided by OpenWRT. I've always used automatic selection because I never bothered to set up the best channels.

It also happened that some channels refused to work. No idea why, since routers aren't really my thing. But it's good if someone can check it out.

It is something else. Becuse if you restart network service in system ->startup -> network restart (or the whole router) then it can come up. So it might be a hotplug or procd problem.

Some channels don't work bacause of DFS.

PS: if you open up the extension WEB ui router_ip:9092 user,pwd same as in luci there is a wifi analyzer in the WIFI-EXTRA menu. You can check the area for best channel.

Cool, I tried it and got a better channel. But 2.4Ghz performance is really lackluster from what I've seen. Is it normal?

Padavan/Linaro worked a bit better for me. I think I'll switch back or even go back to stock.

Too bad, I kinda enjoyed how much easier is to add things on OpenWRT.

Did you change the TX power from auto to the max (20)?

Yeah, I fiddled with the settings a bit more. But at 2.4GHz it's still very unreliable.

Legacy is off, TX is at max, N only, the channel is at 6 because it's the best one around. Still, it stutters on things like videos and streams. Speedtest shows high latency at around 150, which was only 30 on Padavan and 5GHz.

Mt76 is still a WIP but it's getting better with the work of Felix :slight_smile: as you can see in master there was an update even today that made it a lot more stable for me :wink:

2 Likes

Great news! I didn't switch from OpenWRT yet because I can use the 5GHz network just fine. Maybe I'll update in a week or two after more reports regarding stability.

It seems to be solved by now. I built today an image. DFS is working and logging in systemlog. So auto channel is working. I didn't have problems with wifi, but it might solves issues which you encounter. I'll update a 12. build after i test it a few day.

Does the Netgear r6620 benefits of the improvements done for the Xiaomi WiFi Router 3G as it has the same processor and WiFi?

Yes, the work on this driver has effect on all devices that use this driver...