hanwckf / rt-n56u

Padavan
3.26k stars 3.67k forks source link

Xiaomi Mi router 4 (MI-4 / R4) Padavan firmware support #669

Closed minax007 closed 3 years ago

minax007 commented 3 years ago

Dear @hanwckf

I would like to share with you the config files for the Mi-4 router (https://www.mi.com//miwifi4): configs.zip

This router is a different model than the Xiaomi router 4A or 4C.

The Mi-4 has almost the same system architecture as the Mi-R3G, which you are already supporting in your repository:

CPU: MediaTek MT7621A (880 MHz, 4 cores)
FLASH: 128 MiB (ESMT F59L1G81MA)
RAM: 128 MiB (ESMT M15T1G1664A)
2,4 GHz WiFi: MediaTek MT7603EN
5,0 GHz WiFi: MediaTek MT7612EN

The differences to Mi-R3G are:

RAM size: 128 MB instead of 256 MB
GPIO: Mi-Net button
LAN1/LAN2/WAN port assignments
No USB port

I have identified that following port assignments lead to a correct indication, which can be checked here: http://my.router/Advanced_Switch_Content.asp

_CONFIG_RAETH_ESW_PORT_WAN=4 CONFIG_RAETH_ESW_PORT_LAN1=2 CONFIG_RAETH_ESW_PORT_LAN2=1 CONFIG_RAETH_ESW_PORT_LAN3=3 CONFIG_RAETH_ESW_PORTLAN4=0

I would appreciate if you would support this router in your repository.


Dear Padavan users,

I would appreciate if anyone who has this router would test the functionality.

You can easily get Telnet-access to the Mi-4 router by this exploit: https://github.com/acecilia/OpenWRTInvasion Video: https://www.youtube.com/watch?v=VxzEvdDWU_s

The easiest way to install Padavan on this router is via BREED. Download link: https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin

Upload it via Filezilla in a Telnet session into the /tmp-folder of the router.

Then start terminal and install BREED: telnet 192.168.1.1 Telnet user: root Password: none (just hit enter) mtd -e Bootloader -r write /tmp/breed-mt7621-xiaomi-r3g.bin Bootloader

With BREED you can easily install the firmware.

Either you compile the TRX-firmware-file by your own with the config files, which are posted above.

Or you install the precompiled TRX-file found in the releases section of the link below: https://github.com/minax007/XIAOMI_MI-4_Padavan

The releases on this site include the minimum feature set. In case you need more features just fork the repository and change the CI.yml file according to your needs.

minax007 commented 3 years ago

If anyone wants to do a code review please compare the configuration files of the Mi-4 with the configuration files of the Mi-R3G as I have used those as a baseline.

minax007 commented 3 years ago

Dear @hanwckf I have created a pull request and have aligned the userspace configuration settings (=y/=n) as they are for the other routers in your repository.

minax007 commented 3 years ago

In case anyone wants to test the full feature set with English language support ... here is the build:

MI-4_20210613_7019d3e.trx.zip

Please unzip before installing.

minax007 commented 3 years ago

Dear @hanwckf thank you very much for accepting my pull request +1