Support for Xiaomi Wifi R3P Pro?

@babyangelhp can you send me the FULL boot log? you had already posted this error message but i want to see how far it gets without this.

as for restoring stock... don't worry it's actually really easy to do (even if your system is completely messed up)... you just reverse the steps you took when telling the router to boot openwrt... unfortunately i don't have my UART handy (and it's a little hard for me to take the router offline)... maybe @pjgowtham or @andreykiselev can double check (it's in the uboot menu.. you basically set the flag_try_sys2_failed to 1 and flag_try_sys1_failed to 0.. then remember to save the settings and reboot)

now that you're on stock, to install openwrt you're going to setup a tftp server (on a pc), connect it (via ethernet) to the router, setup the IP settings (they have to be on the same subnet) and boot from it (again from the uboot menu)... there are online guides for setting up a tftp server.

anyway, once you've tftp booted (you're going to use the "initramfs" file, not "sysupgrade" or "factory") then you'll just do a sysupgrade and all should be well. oh and you'll need to make sure those flag_try_sys_failed settings are setup so your system is set to boot from sys2 (that is, sys1 should be "failed")

however, it would be nice (since you have an UART anyhow) to first install openwrt the "regular" way, save the bootlog, and then do the tftp thing (you won't need to restore to stock first). there's probably a bug there and it would be nice to at least have it filed or known.

@ilyas
I used the "initramfs" file and successfully installed openwrt on mi pro, but upon reboot the device immediately reverted to the stock firmware. After installing the "initramfs" file, do I need to install the "sysupgrade" or "factory" firmware?
I did the following:
Access ssh then use the command:
nvram set flag_try_sys1_failed = 1
nvram set flag_try_sys2_failed = 0
nvram set flag_boot_success = 0
nvram commit
Next I used the usb to install the "initramfs" file using tftp.
The installation was successful, but when the device reboots, it will return to the stock firmware.

@babyangelhp
right. so you're going to want to make sure you only boot (not install) the initramfs file. it sounds like you already did that. after you've booted that, do a sysupgrade using the "sysupgrade" file. then you should be fine.

Sorry is R3P will be included in official 19.07 build rota? Thx

Oh yes BTW can I check flash used from the packaging?

A short note here for those who (just like me) have problems with a UAS driver and USB3 external drives. The symptoms are that the device is recognized and you can see it with lsusb -t command. The driver lists uas, but the drive does not show up in /dev/sd*.

root@AndyNet:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M

At the same time, drives using usb-storage driver work well. Unfortunately, removing the kernel module or actually removing the module file does not solve the problem and the drive is listed without any driver at all. So, the solution is to set a quirk to hint the system to use a specific driver for the drive:

  1. Get the ID of the external drive with lsusb -v. There should be something like Bus 002 Device 002: ID 059f:105e LaCie, Ltd. Be careful to look for the actual device, not the USB hub.
  2. Edit /etc/modules.d/usb-storage and append quirks=DEVICE_ID:u, so in my case the line looks like usb-storage quirks=059f:105e:u
  3. Save and reboot. After reboot, check lsusb -t should list your drive with usb-storage driver instead of uas. And the drive should appear in /dev/.
  4. Enjoy!

A side note, I do have kmod-usb-core, kmod-usb3, kmod-usb-storage, and kmod-usb-storage-uas installed. And I do NOT have kmod-usb2 and kmod-usb-storage-extras.

3 Likes

Moved to open source (official) Openwrt today. Yey!

Some quick questions.

  1. 5Ghz speed seems to be 1/3 slower than the "closed" drivers. Is there any trick to fix that, or patience?
  2. Again on 5Ghz it seems that no other channel that 36 works (@80Mhz), at least for me. Is it a restriction? Am I doing something wrong?
1 Like

Hi @andreykiselev, Get reverse using the UART cable!

Now I came back again for the Xiaomi DEV ROM.

I am wanting to apply OpenWRT again but would not want to go through the same issues again.

I had the same problem that many reported here, after installation, when the router is restarted, all the initial version returns, does not save the changes, it is necessary to install LUCI again, etc.

I don't know what the problem is.

1 Like

There are one snapshots come with luci?

Is 160mhz channel possible?

@Adilson

the solution we recommend is to do a sysupgrade (after installation) to the same version ("sysupgrade" file) for cases where this happens. have you tried it?

@ilyas, you can have standard install log and the log by sysupgrade here!

hope it can help resolve "unable to mount the UBI partition" issue.

Hello,
I have not tried that. Is there a procedure that teaches all the steps? Can you induce?

I used the "sysupgrade" but my device flashes continuously and does not boot openwrt.
@ilyas

do you have a log? i'm not quite sure what you mean

@adilson for sysupgrade you can use the command-line (it's pretty simple... copy/ftp/scp the "sysupgrade" file to your router and then run sysupgrade with the filename as an argument). if that's not clear, you can also install luci and use the luci interface to "upgrade" your system (again, to the same version). the goal is just to shuffle the bits around the disk.

1 Like

I used the "initramfs" file and successfully installed openwrt on mi pro, but upon reboot the device immediately reverted to the stock firmware. After installing the "initramfs" file, do I need to install the "sysupgrade" or "factory" firmware?
I did the following:
Access ssh then use the command:

nvram set flag_try_sys1_failed = 1
nvram set flag_try_sys2_failed = 0
nvram set flag_boot_success = 0
nvram commit

Next I used the usb to install the "initramfs" file using tftp.
The installation was successful, I then used the sysupgrade file to update from Luci but my device got bricked and blinked in a yellow light

can you send me a log?

I have an error while trying to install luci-app-samba4. Does anyone know how to solve?

root@OpenWrt:~# opkg install luci-app-samba4
Installing luci-app-samba4 (git-19.251.37612-28545f8-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/luci-app-samba4_git-19.251.37612-28545f8-1_all.ipk
Installing libtirpc (1.1.4-2) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libtirpc_1.1.4-2_mipsel_24kc.ipk
Installing libpopt0 (1.16-2) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/libpopt0_1.16-2_mipsel_24kc.ipk
Installing librt (1.1.23-2) to root...
Downloading http://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/librt_1.1.23-2_mipsel_24kc.ipk
Installing libuuid1 (2.34-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/libuuid1_2.34-1_mipsel_24kc.ipk
Installing libcomerr0 (1.44.5-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/libcomerr0_1.44.5-1_mipsel_24kc.ipk
Installing terminfo (6.1-5) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/terminfo_6.1-5_mipsel_24kc.ipk
Installing libncurses6 (6.1-5) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/libncurses6_6.1-5_mipsel_24kc.ipk
Installing libreadline8 (8.0-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/libreadline8_8.0-1_mipsel_24kc.ipk
Installing libgmp10 (6.1.2-2) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/libgmp10_6.1.2-2_mipsel_24kc.ipk
Installing libnettle7 (3.5.1-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/libnettle7_3.5.1-1_mipsel_24kc.ipk
Installing libgpg-error (1.36-3) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libgpg-error_1.36-3_mipsel_24kc.ipk
Installing libgcrypt (1.8.4-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libgcrypt_1.8.4-1_mipsel_24kc.ipk
Installing libpam (1.3.1-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libpam_1.3.1-1_mipsel_24kc.ipk
Installing libexpat (2.2.7-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libexpat_2.2.7-1_mipsel_24kc.ipk
Installing libdbus (1.12.12-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libdbus_1.12.12-1_mipsel_24kc.ipk
Installing dbus (1.12.12-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/dbus_1.12.12-1_mipsel_24kc.ipk
Installing libavahi-dbus-support (0.7-3) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libavahi-dbus-support_0.7-3_mipsel_24kc.ipk
Installing libdaemon (0.14-5) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libdaemon_0.14-5_mipsel_24kc.ipk
Installing avahi-dbus-daemon (0.7-3) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/avahi-dbus-daemon_0.7-3_mipsel_24kc.ipk
Installing libavahi-client (0.7-3) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libavahi-client_0.7-3_mipsel_24kc.ipk
Installing libattr (2.4.48-2) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/libattr_2.4.48-2_mipsel_24kc.ipk
Installing attr (2.4.48-2) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/attr_2.4.48-2_mipsel_24kc.ipk
Installing samba4-libs (4.9.13-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/samba4-libs_4.9.13-1_mipsel_24kc.ipk
Installing samba4-server (4.9.13-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/samba4-server_4.9.13-1_mipsel_24kc.ipk
Configuring terminfo.
Configuring libpam.
Configuring libexpat.
Configuring libdbus.
Configuring dbus.
Configuring libavahi-dbus-support.
Configuring librt.
Configuring libdaemon.
Configuring avahi-dbus-daemon.
Daemon already running on PID 2161
Configuring libgpg-error.
Configuring libgcrypt.
Configuring libuuid1.
Configuring libavahi-client.
Configuring libattr.
Configuring attr.
Configuring libgmp10.
Configuring libtirpc.
Configuring libpopt0.
Configuring libcomerr0.
Configuring libncurses6.
Configuring libreadline8.
Configuring libnettle7.
Configuring samba4-libs.
Configuring samba4-server.
Configuring luci-app-samba4.
Collected errors:
 * resolve_conffiles: Existing conffile /etc/config/samba4 is different from the conffile in the new package. The new conffile will be placed at /etc/config/samba4-opkg.
root@OpenWrt:~# 

Not an error, actually. Message just states you already have an existing config file (/etc/config/samba4). If you don't need existing one just delete it and move /etc/config/samba4-opkg to /etc/config/samba4 to use config provided with package.

But if your existing config it tailored to your needs you're probably don't need to start over :slight_smile: So, just ignore this "error" message.

(Quite offtopic, I know)

2 Likes