Xiaomi WiFi Router 3G

Possibly this behaviour could be changed with modifying u-boot env...
From where do you get this information?

Got it from here: https://wiki.openwrt.org/toh/xiaomi/mir3 (Not the 3G model itself, but its predecessor. I'm pessimistically assuming that this is the same case for the 3G.)

Unfortunately, due to Xiaomi's restrictive bootloader which locks you out from the serial console (!) after first boot, if you totally brick every OS and Kernel partition on this device without enabling the serial console, and the bootloader doesn't pick up the recovery image off a thumb drive, there's no easy way to get the device back up and running again.

This can apparently be circumvented by setting uart_en=1 inside nvram. Looks like this can be done via SSH to me.

In fact, this is not needed. If both kernel0 and kernel1 are present, check the value of the environment variable xiaomi.r3g.bootfw If it exists and the value is 2, start kernel1, otherwise start kernel0.

Hi guys, I'm having many 2.4 GHz disconnections with lastest builds... I'm the only one?
Log is full of 'disconnected due to excessive missing ACKs'.

How far are your stations away from ap?
Had you enabled disassoc_low_ack?

I'm also having problems with 2.4Ghz, putting HTMODE to NONE solves it for me, although this will disable n-speeds. Your issue seems to be the one reported here

Thanks, I will try with htmode none.

Thank you for the working link! Although I actually didn't need to reflash kernel0.bin (I failed to notice that the instructions on OP preserve the image in that partition), I'll save might I do something even dumber in the future :P.

In case anyone happens to have a problem similar to mine, it might be caused by flashing the wrong image in one of the partitions (given the logs I posted earlier, I probably flashed the kernel1.bin in the rootfs0 partition). If you have access to a serial port, then you just need to redirect the bootloader to boot the kernel0 partition (the one with the original Xiaomi kernel) and then force it to reflash the developer firmware, by doing the following:

  1. During the device boot process, around some 2-5 seconds in, choose option 4 ("enter uboot command line" or something similar);
  2. When inside the prompt, you can type printenv to show all uboot environment parameters;
  3. If you followed the install instructions (on opening post or OpenWrt Wiki), you probably have flag_try_sys1_failed=1 set (to prevent booting from kernel0). Change the flag to 0 with setenv flag_try_sys1_failed=0 (you can be "extra" sure and also setenv flag_try_sys2_failed=1 to prevent booting from kernel1, but it doesn't seem to be necessary);
  4. Commit the changes with saveenv;
  5. Before rebooting, plug a USB drive containing the Mi developer ROM (I used the miwifi_r3g_firmware_c2175_2.25.122.bin), otherwise it will fail to boot from kernel0 and set the failed flag again;
  6. Turn off the device, and turn it back on while holding the reset button until it starts flashing orange (like in the step 12 in the first post);
  7. I then simply followed the instructions from the first post (step 8 onwards).

Hope this helps someone!

Lastly, about the 2.4 GHz issues: I'm using a custom build made using ImageBuilder (r6796-56ae9f9), and so far I am not having any issues with disconnections in this frequency (using 20 MHz bandwidth; no "missing ACKs" messages in log), although it does not work at all when I leave the channel on "auto" (something about a failed scanning in system log).

Today i took a look in my u-boot env vars and uart_en is set to 0.
I used the command fw_printenv from inside OpenWrt shell.
I had set it to 1 with fw_setenv uart_en 1 if i need serial access it in the future.

Hi guys,

I got a new Mi 3G router yesterday. My internet works with PPPoE, which I did properly and internet started working. However, the download speed starts with 4-5 Mbps and then drops to 2 Mbps whereas upload speed stays around 8 Mbps of my plan. Then I installed OpenWRT (latest snapshot) and configured it successfully with the same results ( < 2Mbps down, ~ 8Mbps up).
My old router still gives proper 8 Mbps up/down speeds, so ISP isn't an issue.
When I connected Mi 3G router as client to the old router, the download speeds are perfect. Only when I make it as WAN router, does the problem arise.
I'm doing all the testing with my PC connected via LAN using Gbps port & cable.

I have tried various MTU settings from 1400 to 1500 and none of them have worked. I also tried below command and got packet loss:
ping -c100 -s 1450 <wan public ip>

My old router has MTU as 1480 and I have never had to change it.

What am I missing here?

Did you have configured sqm or qos?
Dont think that the cpu is the bottleneck...
MTU should be left default because it should be set automatically on the pppoe interface.
If you use your old device as router and the mir3g only as switch the cpu of your new router did noting with your traffic... Had you tested to plug your old routers lan port to your new one on wan port?
(Modem ->) wan -> old router -> lan -> wan -> new router

I haven't configured anything other than the wan pppoe settings on the router. Even wifi is not configured yet. I couldn't find any settings related to qos on the router. Maybe it isn't installed.
MTU was set to default with fresh installation and that hadn't worked.
I have tried the setting as you have described and that works perfectly. The new one gives good LAN and Internet speeds when it is just a switch.

Hello!

I had to flash using U-boot/tftp - sysupgrade/mtd did not work because of the new flash-layout used in LEDE/OpenWRT. I do not like those chinese apps on my mobile phone, too. First thing I tried, was flashing a new build image using ssh that did not work out as expected and I had to solder the serial-header on the board. After that I used U-Boot option to flash (press 2 after reboot) set device ip and server ip and image name (I used the mixed image kernel+intramfs) and U-Boot flashed to 20000 hex and 60000 hex. That worked. I have build-in all parts in the image, this was the easies way for me ... One thing I wonder is, if using sysupgrade will now work?!

All,
I am totally a newbie to 3G router and LEDE.
I tried to follow some of the above tutorials to get LEDE onto my 3G router, but I even fail at step: http://d.miwifi.com/rom/ssh which leads me to a not found page.....
Also I have no idea where to download miwifi_ssh.bin, lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin......
I only found openwrt-ramips-mt7621-mir3g-squashfs-sysupgrade.tar which is not containing these files mentioned above.

Any tutorial I should use that makes me getting a step ahead?
Bernd

try https:// instead of http://

@Calle: I tried. I used another browser (which leads me to xiaomi-login) but in any case: "no access".....
BUT: I kept on changing http to https in the subsequent pages (where getting errors) and surprisingly it worked!
THANKS!

.... so far. I got the "miwifi_ssh.bin"
trying next steps now....

now...... I see an device on the WAN-interface call OpenWRT and at the LAN-ports one acting as a gateway at 192.168.1.1.
BUT I cannot access it at all. neither with http://192.168.1.1 nor by ssh (conncetion refused) nor by telnet (conncetion refused).....
any idea?

Trunk builds did not include webinterface...

Try failsave mode failsafe_and_factory_reset

@juppin: I reboot many times and finally ssh worked...... if did opkg update and install luci......
that finally worked!
THANKS!

I have the problem that the settings are not saved! I think something is wrong with nand layout. Any idea how to fix this?