Support for Xiaomi Wifi R3P Pro?

@Soni96pl

Think I got a similar problem that you had. There was a power outage during a sysupgrade and now the router refuses to boot and is stuck in a some kind of power down loop every 5 seconds.
All the NICs lights are working and the main router light is blinking a yellowish light until 5 seconds when everything powers down and I loose connection.

I will see if a doing a flash over UART is possible since the symptom seams to be that it looses total power and thus I get disconnected.

@Lazorne try doing a flash over UART like you said. if your kernel (or 'system' filesystem) is broken (due to a half-completed write, as you indicated by the power failure) it's probably in a bootloop (ie, comes up partially, brings up the NICs either as part of the bootloader or part of the kernel, then realizes it can't make it and reboots). i somewhat wish we had a cleaner way of "recovery" (apart from telling everyone to go out and buy a UART)...
anyway, don't worry about flashing over an UART... it's easy. i must have done it over a hundred times :wink:

Sadly my USB UART connector was broken...
Does anyone have a guide to flash it with a Raspberry PI with Raspbian? Since I can connect the corresponding pins directly.

I just tried the snapshot version of r3p openwrt and I felt the wireless is a little bit worse than the closed one. I had 1000ms ping to 192.168.1.1 every 10 ping with open source driver but all within 2ms ping with closed source driver.

I wonder how often snapshot update their mt76 driver. The kmod-mt76 and mt7615 they use in snapshot is from 10-10. And there is still quite a lot of working going on in openwrt/mt76.

See https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=commit&s=mt76%3A+update

@Lazorne see this. i wrote it a while ago :wink:

is anyone else seeing this sort of thing? it might be good to file a bug with mt76/mt7615 if that's the case. unfortunately(?) in my school setup we have a number of APs (in addition to the R3P, which is the main router) and because of where my office is i'm rarely directly connected to the R3P's AP (so, i can't really tell).

@ZZYSonny you're right in saying there's still quite a lot of working going on with mt76. i've seen a couple of unexplaine panic/reboots and at least on one occasion the mt7615 "hung" and i had to reboot the router. probably weren't seeing that on the closed-source driver. but, having built it i think the closed-source driver is a complete pile of brokenness that just happens to work well :wink: if you prefer it, though, you could take over the build/release of closed-source mt7615 (for example, release a kmod for 18.06.05 and 19.07.0-rc2 (which are probably going to be the most-used versions for a while) (oh wait.. there doesn't seem to be R3P support in 18.06.05... wtf?)

So I have gotten a connection and manged to choose one of the boot options. The problem is that the router reboots before I can to do any input other the the boot selection.

So if I choose option 1.
There is not enough time to put in the file name and ip addresses.

I have some times manged to just press enter all the way past the three steps:
Set Router IP: Defaults to 192.168.1.1
Set Server IP: 192.168.1.3 (default, and my raspberry has that configured already)
Set Filename: Have not manage to do any input here before reboot. But sometimes it defaults to a file name called test.bin

So I renamed my kernel file to test.bin but alas it still not working.
I have manged to pull the test.bin file from localhost so it should be up and port 69 is open.

Is there any command I can do from ssh to stop the reboot process from happening so I can input a file name?

Edit Update:
Those times I manged to boot into option 1 I only get TIMEOUT_COUNT=10, but it does get an ARP Reply from the PI since it prints the PIs MAC Adress.

Yet I can't ping it so there must be something else I'm missing the router says its ip is 192.168.1.1 and it's trying to connect to the server 192.168.1.3 that I have on my pi. But I can't find it with ping.

@Lazorne honestly it's been a while since i connect with UART or did a tftp boot. can you provide a boot log? i'm pretty sure all those options (boot file name, etc) are all configurable.

also, you're going to want to have a "closed" network: ie, have the router's LAN port (not WAN) connected directly to the raspberry pi's ethernet. make sure your raspberry pi's ip address is what you think it should be. (btw, i don't know how you would try to ping your raspberry pi from the router... i don't remember the boot menu having a "ping" option)...

also check your route (from the raspberry pi) to make sure it knows how to reach the router (which interface to use)... the raspberry PI also shouldn't be using DHCP (since presumably you don't have a DHCP server anywhere) so it should be configured to use a static IP address (the one you chose).

those are some general hints... it can be a bit of a b*tch to find exactly what is wrong...

Sadly I do all of the above

  1. Got a static connection 192.168.1.3
  2. Got LAN port connected

Ok Ping is out but the route still can't find its way I can't connect. I can pull from the tftp localy.
I'm thinking of reinstalling raspbian and reconfigure everything since I have installed/uninstalled a metric s*it ton of different ssh clients and tftp servers

ttyAMA0 is the interface name on my PI

This is a small part of what I have tried so far:

Used atftpd server
Used tftpd-hpa server
Tried to send the files with atftp directly
Configured the firewall to open port 69
A lot of SSH clients

So far screen and picocom has worked best

The router does find the PI's mac adress but It can't grab the file

The problem is that SSH connection is dropped every 5 seconds when the router is rebooting or it throws me out. So it's a matter of connecting the right time and get lucky to press a button to enter SDRAM via TFTP.

I'll provide you with a log shortly

this here is the problem. your ssh connection shouldn't be dropping (where are you ssh'ing to? the raspberry pi? why would that drop the connection because the router is rebooting? it shouldn't care)

how's your network setup while you're doing this? do you have a 2nd router somewhere that you're using?

I agree that the SSH should not throw me out that's why I tried multiple of clients all with the same result. The SSH session dies because it stop receiving data and thus closes itself down.

How EVER!

Good news I managed to do it, if anyone else has the same problem here is a quick guide for now. I can write a better one later.
The final solution was a reinstall and this worked (you need to be in sudo mode for most of this):

  1. Installed and used tftpd-hpa server (& tftp)

  2. Reconfigured the tftpd-hpa config to point towards the download folder and changed all files in it to give full permissions to anyone who tried to grab or modify them.

  3. Installed ufw firewall and opened port 69 (you also could do it with IPtables or another firewall)

  4. Install screen and used it for ssh later

  5. Plugged in the UART connections to the corresponding locations (RX -TX, TX-RX, GND-GND) the device shows up as TTLAMA01 and connected the ethernet from PI to LAN port 1.

  6. I was on openwrt when it crashed so the router defaults to 192.168.1.1 and tries to default communicate 192.168.1.3 over tftp. So I changed my IP to 192.168.1.3.

  7. Since I had a ssh breakage and reboot problem I quickly pressed 1 and enter enter enter, if there is no value in the bin file input it defaults to test.bin

  8. Renamed the kernel file to test.bin and made sure it was in the Download folder

  9. Rebooted the PI

  10. Started the tftpd-hpa server, ssh from screen into the router ttlAMA01 (spammed 1) manged to get it to try to pull test.bin. The router pulled the file at last and started openwrt.

Victory!

1 Like

:slight_smile: i'm glad it worked. but clearly you were doing something strange :wink: (why a firewall??)

Hello Guys,
I had a mi router R3P and it was brick when I upgrade firmware.
I used usb serial adapter TTL and I don't know this error .
Can you watch video and help me fix ?
Thank you

@supperball it looks like your cables aren't connected properly. definitely something to do with the serial connection being broken.

once you fix that (did you solder properly?) it's pretty straightforward to recover

1 Like

Connect Tx to Rx and Rx to Tx. Connection speed 115200

1 Like

erratic characters are because the speed is not good

1 Like

I confirm also : brick repair with UART need speed 115200.
With speed by default 9600 you have the same of Youtube of Supperball video.

1 Like

Hi all,
Thanks for your work.
I tried to install openwrt on this router (Micron NAND chip without bad block).
Now, the router light is orange and turn white after 5-6 sec and then it seems to restart.
I have linked RJ45 directly from my computer to the router but can't acces ssh on it...

Could you confirm that means it is bricked ?

EDIT: I think so as the reset button procedure doesn't change anything.
This is an opportunity to discover UART :slight_smile:

I am not familiar with the process and have a few questions:

  • The "*initramfs-kernel.bin", is it file is from Xiaomi ?
  • Will it be possible to install OpenWRT with that method or it is just to come back to Xiaomi original firmware ?

Thanks a lot,

1 Like

Could you confirm that means it is bricked ?

Hello,
Yes it's brick.
It is not 'easy' but possible to unbrick... Good luck.
Remember : speed for UART is 115200 (two days to find ...)

1 Like