Xiaomi WiFi Router 3G

Thank you tanonn for your work in this case.
At the moment i can only mention, that I went back to stock firmware.
Now I saw your new compiled files and I will give them another try, but unfortunately I will go on my holidays and so this must wait untill end of August. I will give you a feedback, if your files also work in my router.
Thanx again

A stable version was released.

1 Like

@Fabio_Conde: are you referring to the version from Tue Jul 31 11:27:19 2018 that can be found under https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/ beginning with mir3g-?

Or are the stable builds located somewhere outside the daily snaphshot directory?

The non-snapshot releases are available here: https://downloads.openwrt.org/releases/

So you're referring to 18.06.0-rc2 from Mon Jul 16 05:53:16 2018?
I wonder because you are posting today that a stable version was released, but this one is almost 2 weeks old.

No, this one:

https://downloads.openwrt.org/releases/18.06.0/targets/ramips/mt7621/

1 Like

It's likely 2.4Ghz is a hardware related problem considering:

  1. any router with mt7603en exposes 2.4G reliability problems, not to mention performance also is bad.

  2. stock firmware was not much better either, i.e. 2.4G unreliable and weak there too.

@tanonn, if you could provide us a tweaked version of this release, it will be wonderful !!
Or does exist a simple way to edit ubi partition size ??

It is described in this thread how you could modify the ubi partition size...
It is not that hard, but if you build the image ensure to checkout the 18.06.0 tag and use the config.ceed file from the release downloads for mt7621... Else the kmod packages from the release build does not work without the force depends option of opkg.

Apologizes my ignorance but:

Tweak for what? Whats the advantage to change ubi partition size?

There are some devices with bad blocks in the upper part of nand flash... Stock fw does work because system 1 does use only the lower part and openwrt not because here all available nand flash is used...

No one knows why the nand driver (of uboot or openwrt???) can not handle this on a fw update or boot up...

1 Like

https://bugs.openwrt.org/index.php?do=details&task_id=1710

@Ultraboss

  • Setup openwrt build system as described here

  • clone openwrt 18.06.0 source with git clone -b v18.06.0 https://github.com/openwrt/openwrt.git

  • go to source dir with cd openwrt

  • install package feeds with ./scripts/feeds update -a && ./scripts/feeds install -a

  • dl config.seed and rename to .config with wget http://downloads.openwrt.org/releases/18.06.0/targets/ramips/mt7621/config.seed && mv config.seed ./.config

  • expand config with make defconfig

  • edit Mir3G device tree with nano target/linux/ramips/dts/MIR3G.dts

here you search for this:

partition@a00000 {
  label = "ubi";
  reg = <0xa00000 0x7580000>;
};

and change 0x7580000 to 0x63E0000 for ~85% of the old ubi partition size...

  • save modification

  • then start the build with make download world -j4

If build is finished, you will have the 18.06.0 compatible image in the folder bin/target/ramips/mt7621

1 Like

Thanks @juppin for your detailed information.
Does it also produce a sysupgrade.tar file ? So I'll be able to flash it via Luci

Yes, this will build the same images as the 18.06.0 release build but with modified ubi partition size for mir3g...
All packages, especially kernel modules, of the normal release build should also work on this self build image because you used the same config...

1 Like

I'm on 18.06.0 now and have problems with Wifi Channel=AUTO on 2.4 GHZ.
ACS fails. Instead of finding a channel the device stays down.
Country is set so DE, 802.11r is enabled, wpa2-psk,force ccmp(aes), width=20Mhz, allow legacy 802.11b rates disabled, wmm enabled. Nothing Special.

Wed Aug  1 17:22:01 2018 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Wed Aug  1 17:22:01 2018 daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
Wed Aug  1 17:22:01 2018 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->ACS
Wed Aug  1 17:22:01 2018 daemon.notice hostapd: wlan0: ACS-STARTED
Wed Aug  1 17:22:09 2018 daemon.err hostapd: ACS: Unable to collect survey data
Wed Aug  1 17:22:09 2018 daemon.err hostapd: ACS: All study options have failed
Wed Aug  1 17:22:09 2018 daemon.err hostapd: Interface initialization failed
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: wlan0: interface state ACS->DISABLED
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Aug  1 17:22:09 2018 daemon.err hostapd: ACS: Possibly channel configuration is invalid, please report this along with your config file.
Wed Aug  1 17:22:09 2018 daemon.err hostapd: ACS: Failed to start
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Aug  1 17:22:09 2018 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Wed Aug  1 17:22:09 2018 kern.info kernel: [19267.111995] device wlan0 left promiscuous mode
Wed Aug  1 17:22:09 2018 kern.info kernel: [19267.116682] br-lan: port 2(wlan0) entered disabled state
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: wlan0: AP-DISABLED
Wed Aug  1 17:22:09 2018 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Wed Aug  1 17:22:09 2018 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Wed Aug  1 17:22:09 2018 daemon.notice netifd: radio0 (12877): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process 1724 path ()
Wed Aug  1 17:22:09 2018 kern.info kernel: [19267.231293] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

On the shell it looks like this:

~#  /usr/sbin/hostapd -d -P /var/run/wifi-phy0.pid -B  /var/run/hostapd-phy0.conf
Configuration file: /var/run/hostapd-phy0.conf
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
wlan0: interface state COUNTRY_UPDATE->ACS
wlan0: ACS-STARTED
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed
wlan0: interface state ACS->DISABLED
wlan0: AP-DISABLED
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: interface state DISABLED->DISABLED
wlan0: interface state DISABLED->DISABLED
wlan0: AP-DISABLED
wlan0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data: Interface wlan0 wasn't started

And this is the config file:

cat /var/run/hostapd-phy0.conf
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=DE
ieee80211d=1
hw_mode=g
supported_rates=60 90 120 180 240 360 480 540
basic_rates=60 120 240
beacon_int=100
channel=acs_survey


ieee80211n=1
ht_coex=0
ht_capab=[SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1]

interface=wlan0
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
nas_identifier=50642B96BDA8
wpa_passphrase=12345678
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=OpenWrt-2
bridge=br-lan
mobility_domain=e611
ft_psk_generate_local=1
ft_over_ds=1
reassociation_deadline=1000
wpa_disable_eapol_key_retries=1
wpa_key_mgmt=WPA-PSK FT-PSK WPA-PSK-SHA256
okc=0
disable_pmksa_caching=1
ieee80211w=1
group_mgmt_cipher=AES-128-CMAC
bssid=50:64:2b:96:bd:A8

The problem existed in the snapshots from about 4 weeks ago already, so this is nothing that came with the release.
Is anyone else seeing problems with ACS on 2.4 GHz? I know that the 2.4GHz-driver is not the best one, but does this mean that ACS doesn't work at all? When setting the channel manually everything works.

Auto channel does always select the lowest possible channel... You should choose a channel manually.

If 1234 is your real passphrase / key this will not work because you need minimum 8 characters.

I know that selecting a channel manually ist the best option, but on this device I really want the auto channel as I move it here and there and do neither wan't to operate on a channel that is already in use nor do I want to set it manually each time.
The feature is broken and should be fixed.

Got me, my real password is 12345678 :wink:

Yeah, but auto channel selection isn't really auto...
It will or should be always channel 1 on 2.4 g wifi.

maybe, but it should not lead to an interface that is down.
On other devices the ACS on 2.4 is working, why not here?