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.

LEDE has better support for Xiaomi? How about power of signal?

@kofec haven't heard of that, well, will at least have a look, thanks
@gazambuja I will check this firmware and report back. So far on OpenWRT trunk I see that 5G works well, but I know that 2.4G works really bad (my laptop reconnects every few minutes even though I'm sitting 3 meters away from router with direct visibility). I'll try LEDE to see what's the situation there, but I doubt I'll see any difference regarding wifi stability.

UPD: checked out LEDE, no difference wifi-wise - 5G stable, shows 80% in luci (I'm 3m away from router, clear visibility), if I connect to 2.4G it shows 47% and I get packet loss often, so basically 2.4G is unstable on it just like on OpenWRT trunk, no difference. Also my usb audio card does not work properly on both OpenWRT and LEDE trunks:

-----------------------------------------------------------

root@mi:~# speaker-test

speaker-test 1.1.0

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_direct.c:1159:(snd1_pcm_direct_initialize_poll_fd) unable to open timer 'hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0'
ALSA lib pcm_dmix.c:1106:(snd_pcm_dmix_open) unable to initialize poll_fd
Playback open error: -19,No such device

-----------------------------------------------------------

If I strace:

-----------------------------------------------------------
...

open("/dev/snd/timer", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
ioctl(3, _IOC(_IOC_READ, 0x54, 0x00, 0x04), 0x7fb24d20) = 0
ioctl(3, _IOC(_IOC_WRITE, 0x54, 0x10, 0x34), 0x7fb24d28) = -1 ENODEV (No such device)
close(3)                                = 0
writev(2, [{iov_base="ALSA lib pcm_direct.c:1159:(snd1"..., iov_len=64}, {iov_base=NULL, iov_len=0}], 2ALSA lib pcm_direct.c:1159:(snd1_pcm_direct_initialize_poll_fd) ) = 64
writev(2, [{iov_base="unable to open timer 'hw:CLASS=3"..., iov_len=64}, {iov_base=NULL, iov_len=0}], 2unable to open timer 'hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0') = 64

...
-----------------------------------------------------------

My sound devices:

-----------------------------------------------------------

root@mi:~# cat /proc/asound/devices
  0: [ 0]   : control
  8: [ 0- 0]: raw midi
 16: [ 0- 0]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer
root@mi:~# ls -l /dev/snd/
crw-rw----    1 root     audio     116,   0 Oct 30 19:01 controlC0
crw-rw----    1 root     audio     116,   8 Oct 30 19:01 midiC0D0
crw-rw----    1 root     audio     116,  24 Oct 30 19:01 pcmC0D0c
crw-rw----    1 root     audio     116,  16 Oct 30 19:01 pcmC0D0p
crw-rw----    1 root     audio     116,  33 Oct 30 18:03 timer
root@mi:~# Write failed: Connection reset by peer

-----------------------------------------------------------

So apparently the kernel or whatever responds "no such device" when alsa tries to write to the playback device 0x10 (16). Too bad. Going to switch to OpenWRT 15.05 release for now and try to ask for advice in LEDE IRC channels... Though I prefer forums more.

UPD: the sound issue is resolved by rebuilding the firmware with a modified kernel config - need to enable SND_PCM_TIMER flag, then build and flash the customized firmware.

(Last edited by f3flight on 4 Nov 2016, 07:27)

While no progress is being made on 2.4GHz (I need to maybe update the bug report on LEDE tracker "bugs.lede-project.org/index.php?do=details&task_id=257", can't find time for this), I'm going to try the EEPROM fix to improve 5GHz strength/speed (which is good enough as is, but I want to try and see if it increases my signal strength... I have to rebuild the firmware with modified MIWIFI-MINI.dts to allow writing to /dev/mtd2 which is read-only by default.

I can confirm that EEPROM patching adds a bit to the RSSI on router side (roughly 2dBm for my channels 36-48 just like andy.padawan said), signal increased from around -50 to around -48, which might positively affect speed, but I have no extra network device to measure performance, running iperf on the router itself won't show maximum speed since router's cpu gets overloaded by iperf - need to get an extra laptop, maybe later this week I'll be able to do speed comparison for default EEPROM vs patched EEPROM. This is all about 5GHz performance only, the change does not (should not) affect 2.4 in any way (unfortunately).

UPD: I realized that the Ethernet ports on the router are all 100Mbit/s. I got ~200Mbit/s between the router and my laptop when I ran iperf directly on the router, so it would be pointless to use 100Mbit/s port for tests. Looks like there is no real way to test the performance difference, since the router does not have any Gigabit ports, and running speed test wirelessly between two devices is not representative imo. I tried anyway and got around 100Mbit/s, twice less then between 1 device and the router. So probably 200Mbit/s is the router's limit (on 5G). And internet connection is limited to 100Mbit/s.

(Last edited by f3flight on 13 Nov 2016, 05:58)

Hello everybody! I tried to build and install
github.com/changeway/openwrt_CC_for_MiWifi_Mini on NEXX WT3020h with mt7620n chip but the router not booted.
Do I need to do additional kernel_menuconfig or menuconfig configuration the router to be able to boot?
Thanks for reply. Any info will be usefull.

f3flight wrote:

I can confirm that EEPROM patching adds a bit to the RSSI on router side (roughly 2dBm for my channels 36-48 just like andy.padawan said), signal increased from around -50 to around -48, which might positively affect speed, but I have no extra network device to measure performance, running iperf on the router itself won't show maximum speed since router's cpu gets overloaded by iperf - need to get an extra laptop, maybe later this week I'll be able to do speed comparison for default EEPROM vs patched EEPROM. This is all about 5GHz performance only, the change does not (should not) affect 2.4 in any way (unfortunately).

UPD: I realized that the Ethernet ports on the router are all 100Mbit/s. I got ~200Mbit/s between the router and my laptop when I ran iperf directly on the router, so it would be pointless to use 100Mbit/s port for tests. Looks like there is no real way to test the performance difference, since the router does not have any Gigabit ports, and running speed test wirelessly between two devices is not representative imo. I tried anyway and got around 100Mbit/s, twice less then between 1 device and the router. So probably 200Mbit/s is the router's limit (on 5G). And internet connection is limited to 100Mbit/s.

interesting results. can you share image you flashed and your eeprom modification? i've never got more than 150 Mbps. also this was multi-threaded iperf test or you used old iperf version? what about client device/driver and wifi mode? AN or AC?

one way to make sure your device cpu doesn't limit you in your test is to run both iperf server/client directly on router with localhost specified as client. i got somewhere around 400Mbps with cpu clock to 620MHz

I am using OpenWrt PandoraBox 12.09
Should i upgrade it?
Anyone can help me doing it?
I can go on menu Backup / Flash Firmware and do a Backup and put a new firmware there?

DONE...yes... so simple.

(Last edited by Reinner on 30 Nov 2016, 15:25)

Hello gents,
I been playing with the Xiaomi Wifi Mini,  I have tested the pandoraBox firmware (XMWiFiMini-OpenWrt-PandoraBox-14.09r1696) -->> http://en.miui.com/thread-208652-1-1.html and it work perfect , the only problem that i have mounting uSB (vfat) is not working I tried so many different ways  installing  and removing packages,  and all the time what I got is the following  message:

 daemon.err block: mounting /dev/sda1 (vfat) as /mnt/sda1 failed (-1) - Unknown error -1

In other hand I tried the Xiaomi Wifi Mini firnware from trunk https://downloads.openwrt.org/snapshots … pgrade.bin and with this firmwware I am able to get it working the USB part, mounting Vfat was  easy task ..
But with the problem that WiFi sensibility is not the optimal.

Just want to know if anyone have tried the XMWiFiMini-OpenWrt-PandoraBox-14.09rnnnn-StrangeOrange.bin and have  successfully mounted a USB drive  with vfat partition?

thanks for any advice..

(Last edited by luisgcu on 11 Dec 2016, 21:48)

Why so old format? Why not to use FAT32 od exFAT?

Benik3 wrote:

Why so old format? Why not to use FAT32 od exFAT?

I am still in learning process.. so I may would like to hear another option to share  the content using a regular USB thumb drive. 
I did that employing several other routers successfully following this guide:
///
https://wiki.openwrt.org/doc/howto/usb.storage
Another example is how to use an external usb stick with a FAT32 partition (but we'll keep ext4 support also). See also Storage.

opkg update
opkg install kmod-usb-storage block-mount block-hotplug kmod-fs-ext4 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
mkdir -p /mnt/usb
mount -t vfat /dev/sda1 /mnt/usb
as I mention before that way work fine with other routers hardware's using openwrt, but it wont work with pandorabox firmware.

(Last edited by luisgcu on 11 Dec 2016, 22:19)

luisgcu wrote:

Hello gents,
I been playing with the Xiaomi Wifi Mini,  I have tested the pandoraBox firmware (XMWiFiMini-OpenWrt-PandoraBox-14.09r1696) -->>and it work perfect , the only problem that i have mounting uSB (vfat) is not working I tried so many different ways  installing  and removing packages,  and all the time what I got is the following  message:

 daemon.err block: mounting /dev/sda1 (vfat) as /mnt/sda1 failed (-1) - Unknown error -1

try

mount /dev/sda1 /mnt/sda1

if it will be ok then put this inside startup script wink
it helped for me when i was on pandora
now on padavan so no issues at this point

d00lar wrote:
luisgcu wrote:

Hello gents,
I been playing with the Xiaomi Wifi Mini,  I have tested the pandoraBox firmware (XMWiFiMini-OpenWrt-PandoraBox-14.09r1696) -->>and it work perfect , the only problem that i have mounting uSB (vfat) is not working I tried so many different ways  installing  and removing packages,  and all the time what I got is the following  message:

 daemon.err block: mounting /dev/sda1 (vfat) as /mnt/sda1 failed (-1) - Unknown error -1

try

mount /dev/sda1 /mnt/sda1

if it will be ok then put this inside startup script wink
it helped for me when i was on pandora
now on padavan so no issues at this point

at the end I Moved to padavan.. and it work perfectly.. but lack of all the freedom to play with so many things  that openwrt provided..

luisgcu wrote:

at the end I Moved to padavan.. and it work perfectly..

Link to firmware, pls. No problems (any more) with disconnects of 2.4GHz ?

augustus_meyer wrote:
luisgcu wrote:

at the end I Moved to padavan.. and it work perfectly..

Link to firmware, pls. No problems (any more) with disconnects of 2.4GHz ?

Later today  I will share all  i have tested.

luisgcu wrote:
augustus_meyer wrote:
luisgcu wrote:

at the end I Moved to padavan.. and it work perfectly..

Link to firmware, pls. No problems (any more) with disconnects of 2.4GHz ?

Later today  I will share all  i have tested.

Mi little experiences with the Xiaomi Mini using this firmware -->openwrt-ramips-mt7620-miwifi-mini-squashfs-sysupgrade.bin  is a very low RSSI , USB  mount work perfect and samba share too.
I had another problem with the 2.4ghz is the frequent disconnects.. Not sure if are the same you mention, I noticed that while I do Speedtest .. it never finish and indicate networks problems.. the same problem  is present with the NEXX wt3020,  I manage to solve that problem  adding the following line to the config wifi-iface where the AP  mode is selected   -->  option disassoc_low_ack '0'

I also tested the pandora firmware, that work better, not problem with low RSSI.. but I never get   mount a fat32 USB drive.
http://en.miui.com/thread-208652-1-1.html
Because the USB issue with the pandora,  I  decided to try that PDAVAN firmware for the Xiaomi Mini, so far seems to be working  fine.
https://plol.eu/how-to-install-a-full-s … uter-mini/
http://www.4shared.com/zip/WbhftzeDce/Padavan.html
below  is link with instruction to install a VM and generate the  padavan firmware for several routers, included the Nexx wt3020 where I also notice  a weak rssi with the openwrt. Yesterday I just follow that guide and I was able to generarte a padavan firmware for the nexx wt3020, and it works ok, rssi is perfect and USB is working as well.
use google chrome to traslate the page.
http://prometheus.freize.net/
here is more stuff related to padavan..
https://bitbucket.org/padavan/rt-n56u/w … pplication

Padavan supported hardwares:
http://i269.photobucket.com/albums/jj71 … msdz8n.jpg

(Last edited by luisgcu on 23 Dec 2016, 02:37)

@luisgcu: Thank you very much for the extensive collection of "howtos".
I like the XIAOMIs, as besides price/performance they have a very good looking case.
Only real drawback: AFAIK no CE/FCC-certification, so not usable for commercial mods, to be re-sold.

LameDuck wrote:

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 )

Hello. I have the exact same problem with the modem. Do you managed to build your firmware which would work a modem?

augustus_meyer wrote:

@luisgcu: Thank you very much for the extensive collection of "howtos".
I like the XIAOMIs, as besides price/performance they have a very good looking case.
Only real drawback: AFAIK no CE/FCC-certification, so not usable for commercial mods, to be re-sold.

The Padavan firmware is working pretty good.. the USB share is perfect..  i use that a lot.. the 5ghz band is less crowded so less interference.
here is how I installed my xiaomi http://i269.photobucket.com/albums/jj71 … vbz9qt.jpg

When I try to save password for pppoe in lan settings, router stuck on Waiting for changes to be applied...

Do you have on LEDE firmware below issue ? Do you know how to solve it ?
[39175.994997] ieee80211 phy1: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue 2
[39176.004478] ieee80211 phy1: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue 2

hello,everybody,i am facing the program with can not connect to openconnect VPN server by openconnect client in OpenWRT 15.05.01,is there any one can help me to set up openconnect client,please?and route all trafic via vpn.

Thanks a lots.

Link doesn't work for me.
Also I didn't find revision r50057...

(Last edited by Benik3 on 18 Jan 2017, 15:09)

anarchy99 wrote:

because your service provider or someone/something between you and wan is doing content filtering. otherwise bit.do links always redirect without problem and can be used for stats check instead of registering at hosting site.

r50057 is from github, you can't find it on downloads page.

can you please point me to the github link

Sorry, posts 451 to 450 are missing from our archive.