OpenWrt Forum Archive

Topic: Installing OpenWrt in Xiaomi Wifi Mini

The content of this topic has been archived between 8 Feb 2018 and 5 May 2018. Unfortunately there are posts – most likely complete pages – missing.

you can make backup of firmware and install it in other router?
(firmware Xiaomi Wifi Mini is modified, I would do the backup and install in another router Xiaomi Wifi Mini)
thanks

(Last edited by achillealb on 15 Apr 2016, 10:27)

gazambuja wrote:

@changeway I test your image and others, here the result:

Distance 1mt/3 feets enviroment with a lot of wifi signals.
Use Wifi Analyzer app over HTC M8 Android 6 to measure.

Format of test:
freq -> best signal / worst signal detected (in 60 seconds of monitoring)

Stock firmware from Xiaomi
2.4 --> -35 / -38
5   --> -39 / -42

Stable version - CC 15.05.01
2.4 --> -57 / -61
5   --> -55 / -58

Trunk - some commit with kernel 4.3 - http://git.openwrt.org/openwrt.git?p=op … ce6ea6df9c
2.4 --> -39 / -56
5   --> -47 / -54

Trunk r49161 (from few days ago... unstable on 2.4G)
2.4 --> -36 / -41
5   --> -48 / -51

Fork of changeway - https://github.com/changeway/openwrt_CC_for_MiWifi_Mini
2.4 --> -34 / -36
5   --> -45 / -47

thank you for this detailed test. can you check the version of stock firmware?

There is pretty big thread on 4PDA.ru http://4pda.ru/forum/index.php?showtopi … &st=20
Unfortunately I don't speak Russian and using of translator is very uncomfortable hmm
Anyway there are some info about Padavan FW, its compilation (with Prometheus tool) and some info about patching EEPROM to show right RSSI wink

Hello @changeway
Just a short feedback: I have been using your firmware for a few days now. Runs stable, no problems on the 2.4 Ghz band whatsoever. Reception results are similar to what @gazambuja measured. Stock firmware (downgraded to english Version 2.2.100 ) had a higher troughput than your fork (might have other reasons, eg. congestion), but reception generally is on the same level.
Using CC 15.05 with my xiaomi the 2.4 Ghz Signal was too weak for my setting. 
Thanks for your fork!

Only problem: I can't add the necessary (kernel) packages for the usage of my hostless LTE modem. Well - I guess I'll use some spare time on the weekend and try to biuild my own FW with the packages included. Hopefully I suceed and if I do not brick my router (never built FW from scratch before hmm )

LameDuck wrote:

Hello @changeway
Just a short feedback: I have been using your firmware for a few days now. Runs stable, no problems on the 2.4 Ghz band whatsoever. Reception results are similar to what @gazambuja measured. Stock firmware (downgraded to english Version 2.2.100 ) had a higher troughput than your fork (might have other reasons, eg. congestion), but reception generally is on the same level.
Using CC 15.05 with my xiaomi the 2.4 Ghz Signal was too weak for my setting. 
Thanks for your fork!

Only problem: I can't add the necessary (kernel) packages for the usage of my hostless LTE modem. Well - I guess I'll use some spare time on the weekend and try to biuild my own FW with the packages included. Hopefully I suceed and if I do not brick my router (never built FW from scratch before hmm )

you have to change this file /etc/opkg/distfeeds.conf
change openwrt version from '15.05' to '15.05.1' in all the lines
eg
change
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7620/packages/base
to
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7620/packages/base

opkg update
opkg install <package-name> --force-depends

this has worked for me give it a try

Thanks @changeway for your afford

I have successfully compile your image and upload to router. I have one question: on your code only supported wifi mode is  AP mode ? What about WDS ?

(Last edited by kofec on 21 Apr 2016, 15:33)

kofec wrote:

Thanks @changeway for your afford

I have successfully compile your image and upload to router. I have one question: on your code only supported wifi mode is  AP mode ? What about WDS ?

Try enable menuconfig option
> MTK Properties > Drivers > MTK MT7620 wifi AP driver  >  WDS
> MTK Properties > Drivers > MTK MT76x2e wifi AP driver > AP Features  >  WDS

but this WDS feature may not compatible with luci gui.

These mt76xx vendor driver have lots of issues in openwrt.
My fork give a try for basic wifi function based on mediatek vendor driver.

Hi!

This openwrt version is safe? I try it, but when i go to 192.168.1.1 to Luci interface, the browser wrote, the signiture not retail openwrt, and not correct. Can i remove this interface, and use the original? If i can, how?


LameDuck wrote:

Hello @changeway
Just a short feedback: I have been using your firmware for a few days now. Runs stable, no problems on the 2.4 Ghz band whatsoever. Reception results are similar to what @gazambuja measured. Stock firmware (downgraded to english Version 2.2.100 ) had a higher troughput than your fork (might have other reasons, eg. congestion), but reception generally is on the same level.
Using CC 15.05 with my xiaomi the 2.4 Ghz Signal was too weak for my setting. 
Thanks for your fork!

Only problem: I can't add the necessary (kernel) packages for the usage of my hostless LTE modem. Well - I guess I'll use some spare time on the weekend and try to biuild my own FW with the packages included. Hopefully I suceed and if I do not brick my router (never built FW from scratch before hmm )

I enabled the luci-ssl feature in my example image. The default web service is "https". You may remove "luci-ssl" package under System/Software/Installed packages .

Bobszee wrote:

Hi!

This openwrt version is safe? I try it, but when i go to 192.168.1.1 to Luci interface, the browser wrote, the signiture not retail openwrt, and not correct. Can i remove this interface, and use the original? If i can, how?


LameDuck wrote:

Hello @changeway
Just a short feedback: I have been using your firmware for a few days now. Runs stable, no problems on the 2.4 Ghz band whatsoever. Reception results are similar to what @gazambuja measured. Stock firmware (downgraded to english Version 2.2.100 ) had a higher troughput than your fork (might have other reasons, eg. congestion), but reception generally is on the same level.
Using CC 15.05 with my xiaomi the 2.4 Ghz Signal was too weak for my setting. 
Thanks for your fork!

Only problem: I can't add the necessary (kernel) packages for the usage of my hostless LTE modem. Well - I guess I'll use some spare time on the weekend and try to biuild my own FW with the packages included. Hopefully I suceed and if I do not brick my router (never built FW from scratch before hmm )

Thx changeway!

Just one more question, I want install the kmod-fs-ext4, but i have an error. This is it. Its working with pandorabox, but not working with your openwrt version, but the wifi is great so i want use your version.

http://prohardver.hu/dl/upc/2016-04/174827_asd_2.jpg

(Last edited by Bobszee on 25 Apr 2016, 17:58)

You can try the hint manishgkasera originally gave to me (sorry for not thanking you earlier @manishgkasera).

you have to change this file /etc/opkg/distfeeds.conf
change openwrt version from '15.05' to '15.05.1' in all the lines
eg
change
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calm … kages/base
to
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calm … kages/base

opkg update
opkg install <package-name> --force-depends

this has worked for me give it a try

For me after that packages installed fine, but still no luck on the modem :-(

changeway wrote:

Hi All,
I have two Xiaomi Wifi Mini, and also found the 2.4G connection issue.
I did some research.
There are two project related to MT7621 and MT7612E
WITI : https://github.com/mqmaker/witi-openwrt/
Firefly : https://github.com/FireWRT/FireWRT-Open … ireWRT-SDK

and Mediatek driver for openwrt download
http://www.openwrtdl.com/wordpress/mt76 … B%E8%BD%BD
I believe these driver are released by MediaTek.

I got the mt7620 drivers and patches from these project, and try to merge them into OpenWRT CC.

I folk from openwrt github CC branch and use the mt7620 and mt76x2e driver, also patch luci wireless pages for wifi settings.
https://github.com/changeway/openwrt_CC … i_Mini.git

This is the image I use now
https://changeway.github.io/openwrt/ope … pgrade.bin

There are still issues for using this driver and default configure, but much better than openwrt rt2800 driver using on mt7620.
Any suggestion is welcome.


wow, thanks for adding the wifi drivers and patches to LUCI.

This afternoon I've been testing and works great. But I have had many problems when installing new packages, dependency errors with the kernel and have been unable to mount a pendrive.

For this reason I have recompiled (today 25.4.2016) using your repository. But there is the same error with the dependencies... :C


If someone wants to test this version I leave here. It is not the "clean" image, it comes with what I always use: luci with ssh, all that you need to make extroot.

PD: If you followed some tutorial to change the drivers, you can share it?. I would like to learn the process.

(Last edited by nextlvl on 25 Apr 2016, 23:12)

I have same error. I can't mount the hdd. Can we use this wifi driver for the retail openwrt cc 15.05.1? Because the all other part working on it.

LameDuck: Thx for the help but the hdd not working in this version.

nextlvl wrote:
changeway wrote:

Hi All,
I have two Xiaomi Wifi Mini, and also found the 2.4G connection issue.
I did some research.
There are two project related to MT7621 and MT7612E
WITI : https://github.com/mqmaker/witi-openwrt/
Firefly : https://github.com/FireWRT/FireWRT-Open … ireWRT-SDK

and Mediatek driver for openwrt download
http://www.openwrtdl.com/wordpress/mt76 … B%E8%BD%BD
I believe these driver are released by MediaTek.

I got the mt7620 drivers and patches from these project, and try to merge them into OpenWRT CC.

I folk from openwrt github CC branch and use the mt7620 and mt76x2e driver, also patch luci wireless pages for wifi settings.
https://github.com/changeway/openwrt_CC … i_Mini.git

This is the image I use now
https://changeway.github.io/openwrt/ope … pgrade.bin

There are still issues for using this driver and default configure, but much better than openwrt rt2800 driver using on mt7620.
Any suggestion is welcome.


wow, thanks for adding the wifi drivers and patches to LUCI.

This afternoon I've been testing and works great. But I have had many problems when installing new packages, dependency errors with the kernel and have been unable to mount a pendrive.

For this reason I have recompiled (today 25.4.2016) using your repository. But there is the same error with the dependencies... :C


If someone wants to test this version I leave here. It is not the "clean" image, it comes with what I always use: luci with ssh, all that you need to make extroot.

PD: If you followed some tutorial to change the drivers, you can share it?. I would like to learn the process.

(Last edited by Bobszee on 26 Apr 2016, 06:19)

Hi,

I'm using the optimal version. After installing openvpn using
opkg install openvpn-openssl,
when trying to run openvpn im getting
openvpn: can't load library 'libc.so.1'

Hi all,
after testing the firmaware of changeway and been looking for a solution to the problem of dependency kernel. To fix it, I compiled the drivers (kmod-mt7620 and kmod.mt76x2e) and modified luci with SDK 15.05.1. After using the Image Builder I created a new image removing the default drivers and inserting new ones.

Compiling with the SDK CC_15.05.1 there is no dependency problems.

But if I have taken the surprise,new version has 3 wifi interfaces. The interface of 2.4GHz it's well configured, but the 5GHz wifi is misconfigured.
It is solved by editing the /etc/config/wireless file and putting the correct wifi-device name, same as changeway version.

I leave the firmaware, a .zip with the packages (compatible with 15.05.1) and one example of the wireless config file.

/etc/config/wireless

config wifi-device 'mt7612e'
    option type 'mt7612e'
    option vendor 'ralink'
    option band '5G'
    option autoch '2'
    option radio '1'
    option wifimode '15'
    option bw '2'
    option aregion '7'
    option bgprotect '0'
    option beacon '100'
    option dtim '1'
    option fragthres '2346'
    option rtsthres '2347'
    option txpower '100'
    option txpreamble '1'
    option shortslot '1'
    option txburst '1'
    option pktaggre '1'
    option ieee80211h '1'
    option ht_opmode '0'
    option ht_gi '1'
    option ht_rdg '1'
    option ht_stbc '1'
    option ht_amsdu '1'
    option ht_autoba '1'
    option ht_badec '0'
    option ht_distkip '1'
    option ht_ldpc '0'
    option vht_stbc '1'
    option vht_sgi '1'
    option vht_bw_sig '0'
    option vht_ldpc '0'
    option ht_txstream '2'
    option ht_rxstream '2'
    option channel '48'
    option country 'US'

config wifi-iface
    option device 'mt7612e'
    option ifname 'rai0'
    option mode 'ap'
    option ssid 'OpenWrt-5GHz'
    option wmm '1'
    option apsd '0'
    option encryption 'psk2+ccmp'
    option key '12345678'
    option network 'lan'

config wifi-device 'mt7620'
    option type 'mt7620'
    option vendor 'ralink'
    option band '2.4G'
    option auotch '2'
    option radio '1'
    option bw '1'
    option country 'US'
    option bgprotect '0'
    option beacon '100'
    option dtim '1'
    option fragthres '2346'
    option rtsthres '2347'
    option txpower '100'
    option txpreamble '1'
    option shortslot '1'
    option txburst '1'
    option pktaggre '1'
    option ieee80211h '1'
    option ht_bsscoexist '0'
    option ht_extcha '1'
    option ht_opmode '0'
    option ht_gi '1'
    option ht_rdg '1'
    option ht_stbc '1'
    option ht_amsdu '1'
    option ht_autoba '1'
    option ht_badec '0'
    option ht_distkip '1'
    option ht_ldpc '0'
    option ht_txstream '2'
    option ht_rxstream '2'
    option wifimode '7'
    option region '1'
    option channel '4'

config wifi-iface
    option device 'mt7620'
    option ifname 'ra0'
    option mode 'ap'
    option ssid 'OpenWrt'
    option wmm '1'
    option apsd '0'
    option encryption 'psk2+ccmp'
    option key '12345678'
    option network 'lan'

OpenWrt image
packages.zip

(Last edited by nextlvl on 28 Apr 2016, 19:36)

Thanks nextlvl!

The packages seem to work perfectly with the standard 15.05.1 build for the WiFi mini (using your config).

Appreciate you taking the time to build and upload.

Cheers
Nik

Thx!

How can i instal this packages?

Hi nextlvl,
thanks for the effort, and the quality work.

I put your FW image on one of my mini's and 2.4G and 5G seem to be working fine.
i did not see the '3 wifi radios' , in fact 'iw list' does not return anything but 'nl80211 not found.'
(after using your config file) both radios seem to be happy, although luci does not correctly report associated devices.

one more remark, in the wireless file you posted the mt7620 is configured with option auotch '2' on line 54.
shouldn't that be option autoch '2'?

thanks again!


nextlvl wrote:

Hi all,
after testing the firmaware of changeway and been looking for a solution to the problem of dependency kernel. To fix it, I compiled the drivers (kmod-mt7620 and kmod.mt76x2e) and modified luci with SDK 15.05.1. After using the Image Builder I created a new image removing the default drivers and inserting new ones.

Compiling with the SDK CC_15.05.1 there is no dependency problems.

But if I have taken the surprise,new version has 3 wifi interfaces. The interface of 2.4GHz it's well configured, but the 5GHz wifi is misconfigured.
It is solved by editing the /etc/config/wireless file and putting the correct wifi-device name, same as changeway version.

I leave the firmaware, a .zip with the packages (compatible with 15.05.1) and one example of the wireless config file.

/etc/config/wireless

config wifi-device 'mt7612e'
    option type 'mt7612e'
    option vendor 'ralink'
    option band '5G'
    option autoch '2'
    option radio '1'
    option wifimode '15'
    option bw '2'
    option aregion '7'
    option bgprotect '0'
    option beacon '100'
    option dtim '1'
    option fragthres '2346'
    option rtsthres '2347'
    option txpower '100'
    option txpreamble '1'
    option shortslot '1'
    option txburst '1'
    option pktaggre '1'
    option ieee80211h '1'
    option ht_opmode '0'
    option ht_gi '1'
    option ht_rdg '1'
    option ht_stbc '1'
    option ht_amsdu '1'
    option ht_autoba '1'
    option ht_badec '0'
    option ht_distkip '1'
    option ht_ldpc '0'
    option vht_stbc '1'
    option vht_sgi '1'
    option vht_bw_sig '0'
    option vht_ldpc '0'
    option ht_txstream '2'
    option ht_rxstream '2'
    option channel '48'
    option country 'US'

config wifi-iface
    option device 'mt7612e'
    option ifname 'rai0'
    option mode 'ap'
    option ssid 'OpenWrt-5GHz'
    option wmm '1'
    option apsd '0'
    option encryption 'psk2+ccmp'
    option key '12345678'
    option network 'lan'

config wifi-device 'mt7620'
    option type 'mt7620'
    option vendor 'ralink'
    option band '2.4G'
    option auotch '2'
    option radio '1'
    option bw '1'
    option country 'US'
    option bgprotect '0'
    option beacon '100'
    option dtim '1'
    option fragthres '2346'
    option rtsthres '2347'
    option txpower '100'
    option txpreamble '1'
    option shortslot '1'
    option txburst '1'
    option pktaggre '1'
    option ieee80211h '1'
    option ht_bsscoexist '0'
    option ht_extcha '1'
    option ht_opmode '0'
    option ht_gi '1'
    option ht_rdg '1'
    option ht_stbc '1'
    option ht_amsdu '1'
    option ht_autoba '1'
    option ht_badec '0'
    option ht_distkip '1'
    option ht_ldpc '0'
    option ht_txstream '2'
    option ht_rxstream '2'
    option wifimode '7'
    option region '1'
    option channel '4'

config wifi-iface
    option device 'mt7620'
    option ifname 'ra0'
    option mode 'ap'
    option ssid 'OpenWrt'
    option wmm '1'
    option apsd '0'
    option encryption 'psk2+ccmp'
    option key '12345678'
    option network 'lan'

OpenWrt image
packages.zip

undef2 wrote:

Hi nextlvl,
thanks for the effort, and the quality work.

I put your FW image on one of my mini's and 2.4G and 5G seem to be working fine.
i did not see the '3 wifi radios' , in fact 'iw list' does not return anything but 'nl80211 not found.'
(after using your config file) both radios seem to be happy, although luci does not correctly report associated devices.

one more remark, in the wireless file you posted the mt7620 is configured with option auotch '2' on line 54.
shouldn't that be option autoch '2'?

thanks again!

The settings are as comes by default if openwrt is compile from source. This value 'auotch' I think it's AutoChannelSkipList and I have no idea what it does ...

About the associated clients I'm looking for not listed, it must be something with the drivers and Luci. I remember you that these patches are made by changeway and I'm just trying to understand a little what has been done.

If I find something, I'll tell you something. Anyway any help is welcome: D

Does anyone have tested this driver ?
mac80211 driver for MediaTek MT76x2 802.11ac chips - https://github.com/openwrt/mt76

Overview of my experience. Xiaomi Wifi Mini application:

  • 5 GHZ Radio as WAN (STA)

  • 2.4 GHZ Radio as AP

  • RaspberryPi running Raspbian with Kodi DLNA server option enabled connected to Xiaomi Ethernet LAN port

Experience with different firmware streaming 1080p from Kodi over Xiaoni 2.4 GHZ AP,

  • Chaos Calmer 15.05 - Constantly re-boots in high Wifi pollution environment. Had to move a building with less Wifi Pollution to install different firmware

  • Chaos Calmer 15.05.1 - Stable but 2.4 GHZ output power far to low.

  • Changway - Stable but could not configure 5 GHZ radio as WAN. iwinfo gave errors that it could not find interfaces (sorry, didn't save error messages)

  • Recent OpenWrt Development build (May 2 if memory serves correctly) - Sufficient 2.4 GHZ output power but hangs streaming 1080p movie on 2.4 GHZ AP.

  • StrangeOrange - Only firmware that works for me with my application

Hope this helps someone.

nextlvl wrote:

Hi all,
after testing the firmaware of changeway and been looking for a solution to the problem of dependency kernel. To fix it, I compiled the drivers (kmod-mt7620 and kmod.mt76x2e) and modified luci with SDK 15.05.1. After using the Image Builder I created a new image removing the default drivers and inserting new ones.

Hi nextlvl,

Thank you!

This image works fine for me (2,4 GHz, 5 GHz, LTE host-less USB modem for internet). A lot of strange dmesg output from the mediatek driver, but connections are stable. From Vernonjvs post it seems that there is some progress on the 2,4 GHz issue on "native" OpenWRT, but for the moment I'll stick to your build.

Hello!

I actually don't know if I should open a new thread, so Im just going to post it here~

After a power outage my router didnt boot up anymore (with StrangeOrange's build,the orange LED led up, but after some seconds it just turned off). So I just used a USB Stick, put changeway's build on the usb stick, named it miwifi.bin. Now the router doesnt even get to the blue led, it just goes through the orange led "state" and turns off afterwards. Flashing through the USB stick (seemingly) doesn't work. I cant reach the router via ssh in failsafe mode as well (At least it seems so). Is there something else I can do, or did I just brick it?

Squeezebox server and play with this topic wink

Hi everybody,

Because of the weak signal with the stock openwrt, I tried the PandoraBox StrangeOrange firmware.
(XMWiFiMini-OpenWrt-PandoraBox-14.09r1696-StrangeOrange-Optimal-U4)

I want to connect my MIWifi to another wifi in order to do a repeater.
I dont need the 5Ghz then scanned and connect to my other wifi (WEP, channel 9) but it doesnt get connected...
("Wireless is disabled or not associated")
If I removed every wifi, the "scan" function doesn't work. I need to add at least one AccessPoint in order to be able to scan.

Anyway, Do you have any idea/firmware for making a repeater of a WEP protected wifi ?

It is working with the OpenWRT stock version, I didn't success with the MIWifi stock one...

Wireless file:

config wifi-device 'rai0'
        option type 'mt7612'
        option hwmode '11a'
        option channel 'auto'
        option txpower '100'
        option htmode 'VHT80'
        option country 'CN'
        option noscan '1'
        option txburst '1'

config wifi-iface
        option device 'rai0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt-5GHz-59795A'
        option encryption 'none'

config wifi-device 'ra0'
        option type 'rt2860v2'
        option hwmode '11g'
        option txpower '100'
        option htmode 'HT40'
        option country 'CN'
        option noscan '1'
        option txburst '1'
        option disabled '0'
        option channel '9'

config wifi-iface
        option network 'wwan'
        option bssid '12:66:**:51:59:**'
        option ssid '**SSID**'
        option encryption 'wep-open'
        option device 'ra0'
        option mode 'sta'
        option key1 '**KEY**'
        option key '1'

Network file:

config globals 'globals'
        option ula_prefix 'auto'

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option macaddr 'ba:db:ad:fa:ca:de'
        option ipaddr '10.0.0.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option force_link '1'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'
        option macaddr '53:3f:ac:e2:fa:ce'

config interface 'modem'
        option ifname 'eth0.2'
        option proto 'static'
        option delegate '0'
        option ipaddr '192.168.1.2'
        option netmask '255.255.255.0'
        option layer '1'

config switch
        option name 'mt762x'
        option reset '1'
        option enable_vlan '1'
        
config switch_vlan
        option device 'mt762x'
        option vlan '1'
        option ports '0 1 2 3 5 6t 7t'

config switch_vlan
        option device 'mt762x'
        option vlan '2'
        option ports '4 6t 7t'

config interface 'wwan'
        option proto 'dhcp'

Thank you,
Regards,

(Last edited by alexis57 on 15 May 2016, 05:55)