Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ramips: mt7621: add support for Xiaomi Mi Router 4A Gigabit v2 #11803

Closed
wants to merge 0 commits into from
Closed

ramips: mt7621: add support for Xiaomi Mi Router 4A Gigabit v2 #11803

wants to merge 0 commits into from

Conversation

e323w
Copy link

@e323w e323w commented Jan 15, 2023

Device is the same as Xiaomi Mi Router 4A Gigabit, except of:

  • 5G WiFi is MT7663
  • addresses of leds, wifi and eth ports are slightly changed
  • at the end of the flash, another Config partition was added, I'm not sure if we should preserve it, but I did it
  • patch ramips: mt7621-dts: mux phy0/4 to gmac1 does not seem to work for this device. with him on the wan port there is only Tx traffic, but no Rx. so I didn't add it
Specs:
  SoC:  MT7621
  CPU:  2 x 880 MHz
  ROM:  16 MB
  RAM:  128 MB
  WLAN: MT7603, MT7663

MAC addresses:
  WAN     ****  factory 0xe006 (label)
  LAN     *:f7  factory 0xe000
  2.4 GHz *:f8  factory 0x0000+0x4 (mtd-eeprom+0x4)
  5 GHz   *:f9  factory 0x8000+0x4 (mtd-eeprom+0x4)

Installation:

Factory firmware is based on a custom OpenWrt 17.x.
Installation is the same as for Xiaomi Mi Router 4A Gigabit.

Probably the easiest way to install is to use the script from
this repository: acecilia/OpenWRTInvasion#155

In a more advanced case, you can do everything yourself:
- gain access to the device through one of the exploits described
  in the link above
- upload sysupgrade image to /tmp
- overwrite stock firmware:
  # mtd -e OS1 -r write /tmp/sysupgrade.bin OS1

Recovery:

Recovery procedure is the same as for Xiaomi Mi Router 4A Gigabit.
Possible options can be found here:
https://openwrt.org/inbox/toh/xiaomi/xiaomi_mi_router_4a_gigabit_edition

One of the ways is to use another router with OpenWrt:
- connect both routers by their LAN ports
- download stock firmware from [1]
- place it inside /tmp/test.bin on the main router
- configure PXE/TFTP on the main router
- power off 4Av2, hold Reset button, power on
- as soon as image download via TFTP starts, Reset can be released
- blinking blue wan LED will indicate the end of the flashing process,
  now router can be rebooted
[1] http://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/r4av2/miwifi_r4av2_firmware_release_2.30.28.bin

in this branch, I split mt7621_xiaomi_mi-router-4a-3g-v2.dtsi into two files: mt7621_xiaomi_mi-router-4a-common.dtsi (with common nodes for all 4a* devices) and original mt7621_xiaomi_mi-router-4a-3g-v2.dtsi (with only 4a-v1 and 3g-v2 specific nodes). it was possible to use the original file, but then the configuration for 4a-v2 would use hacks, including deleting nodes, so why I added this division.

PR based on this work

Signed-off-by: Dmitry Sokolov e323w@proton.me

@github-actions github-actions bot added the target/ramips pull request/issue for ramips target label Jan 16, 2023
@csharper2005
Copy link
Contributor

And... Could you add Installation guide, MAC address table, recovery procedure (if you have it in place) to the commit message, please? https://openwrt.org/docs/guide-developer/device-support-policies

@csharper2005
Copy link
Contributor

ramips: mt7621: add support for 'Xiaomi Mi Router 4A Gigabit v2'

Quotation marks can be dropped.

@e323w
Copy link
Author

e323w commented Jan 17, 2023

@csharper2005 thank you for the review, I updated commit according to your comments.

@e323w e323w changed the title ramips: mt7621: add support for 'Xiaomi Mi Router 4A Gigabit v2' ramips: mt7621: add support for Xiaomi Mi Router 4A Gigabit v2 Jan 17, 2023
@hauke hauke closed this Jan 28, 2023
@hauke
Copy link
Member

hauke commented Jan 28, 2023

Thank you for the pull request, I merged it into master in 39e4f03. I do not know why this is marked closed.

@github-actions github-actions bot removed the target/ramips pull request/issue for ramips target label Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants