Support for Xiaomi Mi 3C

Please let me know how to interchange ports, as I am using default in 19.07.6

Dear @anjmis04
I had compared the 19.07.5 Mi-Nano build on the Mi-3C with the latest stock firmware with regards to WiFi performance.
I have tested at different locations in my home the following parameters:

  1. Bandwidth
  2. Signal strength
  3. Latency (loaded an unloaded) and jitter

The result of my measurements was that I couldn't see any noticeable difference.
Based on those results I had started this new thread to re-open the development of OpenWrt for Mi-3C.
Now we only need to do the following:

  1. Configure the configuration files for the router (renaming "Mi-Nano" to "Mi-3C")
  2. Configure the ports (correct port setup is stated in the first post of this thread)
  3. Compile the build and test it with the participants of this thread
  4. Ask OpenWrt team to include Mi-3C support

Is there anyone who wants to be participate in those steps?

1 Like

I search right now how configure the ports.
I is not on .dts ...

1 Like

ok i found
target/linux/ramips/base-files/etc/board.d/02_network

Dear @eduardo010174
excellent!
Are you able to change the port assignment as I had posted in the first post of this thread?
If I can support you, please let me know.

Dear @eduardo010174
the file, which you need to change is the following:

In the function:

ramips_setup_interfaces()

You need to add and adapt following lines for the Mi-3C:

	xiaomi,miwifi-3c)
		ucidef_add_switch "switch0" \
			"2:lan:2" "4:lan:1" "0:wan" "6@eth0"
		;;

Please verify if my thoughts are correct.

1 Like

humm try add first support in openwrt 19.07 with swconfig
or add directly support on master with dsa

Dear @eduardo010174
sorry, I didn't understand what you wrote me, because I am new with OpenWrt.
I would propose to do the required changes and to compile the firmware. Then we can test it.
And if it works then we can ask for a pull request.
But I am not sure if the process of application for considering a further router is different.

ok i try first add support for 19.07

1 Like

Thank you very much! :slight_smile:

But it's my first commit in openwrt, it will take work.

Like me. This is also my first approach to learn about OpenWrt.
By the way: The chipset in the Mi-3C is the Mediatek MT7628N.
And that one is already supported in the kernel.
So we do not need to dig so deep into it.
I think it should be sufficient just to add the correct lines, as proposed above, into the file linked above ... and that should do the job.
But maybe I am too simple minded :slight_smile:

1 Like

OpenWrt 19.07-SNAPSHOT Not tested ...
possible real brick
create full backup first
https://drive.google.com/file/d/1szgakJ7Z-VReZ5YZY47s9zqzUDCTJT5a/view?usp=sharing

my first build.
@minax007 @anjmis04 @earth08

2 Likes

reply pls if ports is correct. i copy your @minax007.

I am going to test it, even if it bricks,
also I would suggest to check network config of Mi Router 4C since both are hav9ing same port config and good news is that for Mi 4C openwrt is official.

Edit: I flashed the router, it got bricked and I recovered firmware, waiting for another build to try.

I just installed the firmware and bricked the router, recovered by breedweb again. waiting for another build.

Dear @eduardo010174
this is fantastic news! :+1: :+1: :+1:
Thank you very much!
I am actually wondering why it led to bricking the device.
Normally just changing the port association should lead to a brick. It should only lead to incorrect port assignment.
Please let me know which further changes you have made. Did you take the Mi-Nano configuration as baseline?
I am looking forward to test further builds.

Dear @anjmis04, Dear @eduardo010174,
this is the port setup for the Mi Router 4C (found in the file I had refered before):

	xiaomi,mi-router-4c)
		ucidef_add_switch "switch0" \
			"4:lan:1" "2:lan:2" "1:wan" "6@eth0"
		;;

This is the one for the Mi-Nano:

	xiaomi,miwifi-nano)
		ucidef_add_switch "switch0" \
			"0:lan:2" "2:lan:1" "4:wan" "6@eth0"
		;;

And this the one I had proposed for the Mi-3C because of the interchange of WAN and LAN1:

	xiaomi,miwifi-3c)
		ucidef_add_switch "switch0" \
			"2:lan:2" "4:lan:1" "0:wan" "6@eth0"
		;;

But I couldn't find any documentation from which I could have learned what the logic of assignment is.
I assume that the logic is the following:


4:lan:1         means        "Port address 4" is assigned to "LAN1"
2:lan:2         means        "Port address 2" is assigned to "LAN2"
0:wan           means        "Port address 0" is assigned to "WAN" 

But I am not shure what '6@eth0' means. As it is for all three routers listed above the same, I think that we do not need to care :slight_smile:

1 Like

I agree with you. Can you compile with this config?

1 Like