OpenWrt for Xiaomi Mi Router 4C

I didn't install from serial port. I can't say anything. About missing step 2, it's just typo by me.

1 Like

Hi MacTavishAO because i dont know who to do step 1 above on windows
i still trying to find an other way
When I was looking for alternative methods I found this
Is it possible to give good results according to your opinion ,i still trying
i use this method with mikrotik devices

 NetOurIP
DHCPHandler: got packet: (src=67, dst=68, len=284) state: 3
Filtering pkt = 0
DHCPHandler: got DHCP packet: (src=67, dst=68, len=284) state: 3
DHCP: state=SELECTING bp_file: "openwrt-ramips-mt76x8-xiaomi_mi-router-4c-squashfs-sysupgrade.bin"
TRANSITIONING TO REQUESTING STATE
*** Unhandled DHCP Option in OFFER/ACK: 13
*** Unhandled DHCP Option in OFFER/ACK: 28
Bootfile: openwrt-ramips-mt76x8-xiaomi_mi-router-4c-squashfs-sysupgrade.bin
DhcpSendRequestPkt: Sending DHCPREQUEST
Transmitting DHCPREQUEST packet: len = 343
DHCPHandler: got packet: (src=67, dst=68, len=284) state: 4
Filtering pkt = 0
DHCPHandler: got DHCP packet: (src=67, dst=68, len=284) state: 4
DHCP State: REQUESTING
*** Unhandled DHCP Option in OFFER/ACK: 13
*** Unhandled DHCP Option in OFFER/ACK: 28
Bootfile: openwrt-ramips-mt76x8-xiaomi_mi-router-4c-squashfs-sysupgrade.bin
DHCP client bound to address 192.168.31.103
TFTP from server 192.168.31.102; our IP address is 192.168.31.103
Filename 'openwrt-ramips-mt76x8-xiaomi_mi-router-4c-squashfs-sysupgrade.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REQUEST, return our IP
T T T T T T T T T T
Retry count exceeded; starting again
BOOTP broadcast 1

the device is xiaomi_mi-router-4c
steps :-
1-power off
2-press rest button and hold
3-power on still hold the rest button until the led flashing
4- release the reset button

I use this method to flash stock rom. Btw set router ip to 192.168.1.1 and your ip to 192.168.1.2 to flash from tinypxe. I didn't test this method to flash openwrt. In theory it should work but I don't want to risk bricking other users' devices so I don't recommend it. But you are free to try.

1 Like

Hi there.

Anyone succeeded with setting up this router with this firmware in Client + AP (i will call it Master) mode? I want to use wifi as WAN (WWAN) and LAN (WLAN).

It does not work for me, that means: Master wifi disappears (other devices cannot find it 'on air').

I've read on some other threads, this may be related to some driver limitations on multi-SSID, but I am able to set two Master wifi (with different SSID), and both are 'on air'.

Any hints where to look further?

BR, Bartek

Hi, follow this guide. In the latest version of LuCI, you have to scan first to join a network. Set encryption algorithm to WPA2-PSK and you should be good to go. In case of master wifi disppears again try the oldest trick in the book which is rebooting the router.

Here is proof of me doing it:

2 Likes

Thanks!

I've got similar settings, scanned and joined network, but it seems that when wwan/"source"/hotspot/client wifi (however you call it) is down, it disables also Master network:

When the hotspot is not available or it is incorrectly defined in the wireless configuration file, OpenWrt will disable the AP
(taken from here: https://openwrt.org/docs/guide-user/network/wifi/ap_sta)

I am still having very unstable connection (ping vary from 32ms -> request timed out), but I think this is something I need to solve myself (better place for the router, etc).

BTW, for the sake of next users, "mistake" I've made: if you install openwrt via wifi (yes, it is possible, I had firmware 3.0.16 Stable), you need ethernet cable anyway, as wifi is disabled by default in openwrt!

Thanks MacTavishAO for providing support for this router!

Hi, I'm glad that you finally have it basically working. Also thanks for the heads up about wifi is disabled by default. I've ethernet cable and I didn't actually think of some users might not have ethernet cable. If I recall correctly, there is default WiFi configuration in build configuration and next builds will have WiFi enabled by default with OpenWrt SSID and no password.

Thank you too for appreciation of my work and you're welcome.

1 Like

New update is up. Enjoy!

Changelog:

  • Upstream OpenWrt sources.
  • Linux Kernel 5.4.66.
  • Package list is fixed.

Link:
Google Drive

3 Likes

Hello,

Successfully installed on my R4CM your Kernel 5.4.66 image
Working flawlessly as bridge wifi/lan

My model was a real chineese. No way to guess any password, just installed the Mi Wi-Fi app. The software detects the R4CM, you can set a password. Then you can log in the router and read the 'stok'.

You should add the md5sum of your image with the post announcing it.

Thank you

2 Likes

Great!

I flash the image and it working well!

When will have official image for this great and cheap router?

Best regards.

1 Like

I sent a patch to patchwork roughly a month ago. When OpenWrt team decides to merge it to the main repo, we'll have official images.

1 Like

Great!

Could you put here the url of the patchwork please?

Best regards.

Here.

Thanks!

Hope it will be accepted soon.

Kind regards.

thank u :heart_eyes:

Hi
i trying to run the "remote_command_execution_vulnerability.py" on windows python but i get this error after run the script


i get python for windows from her python for windows

i try same scrpit on Ubuntu live on usb memo, work fine
what i miss on windows python ??

pip3 install -r requirements.txt

i got error error

use cmd or poweshell.