Solved->SUCCESS->Xiaomi MI 4C USB mod

Hello guys,
To make long story short I'm modifying this router based on MT7628AN for usb. as per datasheet, I soldiered necessary connections to unused pins and made serial TTL output but it don't detect usb devices at all. dmesg show nothing when i insert usb devices, lsusb show error -99 that i cannot find description for. allso serial TTL somehow have disabled RX that i can see console but cannot activate console to send command. I used finished openwrt firmware that i updated with usb support and i compiled it from zero with full usb support and i always get same result ( 21.02.3 ). Any help, suggestion or comment is appreciated.

Did you actually enable both the EHCI- and OHCI-controllers in the device-tree, or did you just think that compiling the kernel-modules is enough?

3 Likes

Hello, tnx on reply.
You mean in on board config in DTS File ?

Yes, you need to enable the controllers there as well.

1 Like

&ehci {
status = "okay";
};

&ohci {
status = "okay";
};

ill report any results.

login as: root

BusyBox v1.33.2 (2022-04-16 12:59:34 UTC) built-in shell (ash)


| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

OpenWrt 21.02.3, r16554-1d4dea6d4f

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.

root@OpenWrt:~# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux 5.4.188 ohci_hcd Generic Platform OHCI co ntroller
Bus 001 Device 003: ID 12d1:14ac HUAWEI Technology HUAWEI Mobile
Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.188 ehci_hcd EHCI Host Controller

Well this can be called success.
Do i report this mod to anyone or submit to someone to update page https://openwrt.org/toh/xiaomi/xiaomi_mi_router_4c or i just leave it be ?

You probably should take a look at Applying for OpenWrt wiki account and update the relevant Wiki-page. I suppose another option would be to document what you did in this thread and hope someone else will take it upon themselves to update the Wiki-page.

I would also recommend you to take good pictures of exactly which pins you soldered to and what you soldered to them -- it'll help, if someone else wants to do the same.

2 Likes

Solved
Hardware mod******
On picture are shown all soldier points for desired pins with markings.

Also you must connect 15kOhm resistors to ground from D+ and D- lines.

Software mod******
Simple hardware mod don't enable USB, you must enable OHCI and AHCI in board description file and compile appropriate firmware.
Board description file is on location
/{your openwrt source location}/openwrt/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts
In this file change:

&ehci {
	status = "disabled";
};
&ohci {
	status = "disabled";
};

to

&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

Enable usb kernel module support in "make menuconfig", compile firmware file and flash it.

NOTICE***
I'm not responsible for any accidents, bricked devices or mischiefs. You take your own responsibility.
You can use 5V power supply from router for powering on USB, but take care because its only 1A of current charge if you connect some power hungry USB peripheral it will make router unstable.

4 Likes

Wikified. see here https://openwrt.org/toh/xiaomi/xiaomi_mi_router_4c#hardware_mod_-_usb_port

The photo is under the photo section.

Thanks @nikola.kojovic and all.

Then we have a chance to do the same on Xiaomi-4A gigabit, seems the 3 pins are candidated, i donot have time to test this, sorry.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.