Porting to TP-Link RE210

Hi, I'm new here and trying my hand at porting to a TP-Link RE210 WiFi Extender. I found out after I bought it that while it has a single ethernet port, it doesn't work as an access point.

I've git cloned to a case sensitive HFS disk image as mentioned in the developer guides.
I've looked at the wiki page for add new device.
I've gotten UART access to the RE210.
When I get into the U-Boot menu, printenv doesn't get me anything about boot arguments. And the login doesn't work with any of the typical username/passwords I've seen:
root/root
admin/admin
admin/password
admin/5up
root/sohoadmin - Taking a firmware image and running binwalk even gets me the shadow file which shows up on pages which have this password, but it still says login incorrect.

Could somebody tell me what my options are now? Is there a way to pass along init=/bin/sh to the kernel in a different way? I heard somebody mention to somebody else an initramfs. How do I make one of these that would work with this device?

Thanks!

Well, you dont really need shell in the stock FW at all.
Simply download the GPL source and search for the board identifier, for GPIOs the best place is U-boot source.

Would it be safe to assume that the DEV_NAME=re210v1_en in the GPL source is the board identifier?

Since there appears to be only one version of RE210 then it should be it

For anybody curious, I made an initramfs by splicing and stripping down config files from other similar devices. I got it to boot over TFTP. I think it's aware there's WiFi, but the ethernet interface is entirely broken. (Atheros PHY?!)

Then my FTDI dongle broke (fails to enumerate). Then I got hospitalized for a week and a half for surgery. While my body heals, I await a batch of new FTDI boards.

I didn't get a chance to dump the ART partition before the dongle broke, but it looks like that's where I'm supposed to find stuff for both wifi, the wifi MAC addr, and the Atheros MAC addr?

Hi @hchung,

I hope you are doing well. What CPU does that device have? I would love to port OpenWRT to the RE200, maybe I could use part of your work (and maybe you could help me a little bit) if its similar?

My device has a MT7620A, I think this is the same CPU as in your device. The Archer c2 (which is supported) has the same CPU as these devices, so maybe there is some interesting stuff there aswell.

Hi @Flole,
Sorry for the delay, been busy with some family stuff so I haven't made much progress. The CPU is a MT7620A, so it's the same.

It ought to make it easy for you to use the same config as me for a start. I can try to provide what changes I have so far. Let me know what's the best way to do so.

My current problem is trying to understand the uboot source code and find where it explains how it finds the Atheros GigE controller. Without it, I have no ethernet. :frowning:

I downloaded the GPL Sources for my model (they are also the sources for the RE220 so that one is probably very very similar aswell) and tried to simply compile what looks like a complete but old openwrt (just without tplinks proprietary stuff I guess). Unfortunately I need to try this again on an older OS as it's not compiling like this.

My device does not have a Gigabit Network Port (so no Gigabit network controller either), I might be able to simply use what you have now. What modifications do I need to do to that (you might have notices some while digging through the code)? Probably change the LED GPIOs (if you even implemented those) but that's the only thing that comes to my mind at the moment. The Flash layout should be automatically detected, right? Then I could give it a try to at least see how far it gets. If you could upload it on GitHub that would be great, or I could send you a link to upload it to my cloud if you don't want to make it public yet for some reason.

I uploaded my changes to https://github.com/hanzelnut/openwrt, look for the "tplinkRE210" branch. I don't have the LED GPIOs set and the flash layout may need to be verified with yours. I don't have it looking into the md partitions for the MAC addresses yet either. Basically, it tries to boot. I pieced it together from other similar devices

Hey, I'm trying a similar thing on my RE200. Actually, my image configuration looks very similar to yours, however, I can't get my kernel to print anything to the console.
What commands are you using in U-Boot to boot from TFTP?

Thanks

I'm using (Load system code to SDRAM via TFTP.) and just the defaults that were there.

Oh! Can you check for the uart, which one it's set to?
In the .dts file, look for:
bootargs = "console=ttyS0,57600n8";

At one point in time, I think I saw some devices have it set to ttyS1 instead. Also verify that's the baud rate you want.

1 Like

Thanks for the quick reply. I tried with ttyS0 and ttyS1, no output at all. I also tried your suggestion with both options, no success.
I think that my image generation options are not yet correct...
EDIT: Yep, I accidentally compressed the kernel image twice, now it boots and gives output on serial! Thanks for your help.

@andyboeh I guess we are working on the same thing, I haven't had much time to work on this thing yet, does it boot up properly for you? If it's already working then I don't have to reinvent the wheel, WiFi should work out of the box and probably Ethernet aswell considering this board is pretty much all standard, then just the LEDs are left in case someone actually needs those, but that's about it with hardware on this board.

Yeah, I'm basically done. The 2.4G/5G LEDs don't work and flash from stock only works via Serial. See my thread for details: Port to TP-Link RE200

I'm at a loss as to how to configure the gigabit ethernet port.
It seems MDIO is likely the bus(?) that the ethernet controller is on, but I don't see anything in the configs about how to detect it or where it is.

I think there's two configs regarding two ports, setting an enable on both u-boot and linux:
build/products_config/re210v1_en/kernel.config:CONFIG_P4_MAC_TO_PHY_MODE=y
build/products_config/re210v1_en/uboot.config:P4_MAC_TO_PHY_MODE=y
build/products_config/re210v1_en/kernel.config:CONFIG_P5_MAC_TO_PHY_MODE=y
build/products_config/re210v1_en/uboot.config:P5_MAC_TO_PHY_MODE=y

products_config/re210v1_en/kernel.config:CONFIG_MAC_TO_GIGAPHY_MODE_ADDR2=0x4

products_config/re210v1_en/kernel.config:CONFIG_MAC_TO_GIGAPHY_MODE_ADDR=0x5

products_config/re210v1_en/uboot.config:MAC_TO_GIGAPHY_MODE_ADDR=0x5

products_config/re210v1_en/uboot.config:MAC_TO_GIGAPHY_MODE_ADDR2=0x4

But trying to read the code, I don't know where these values would go in the DTS and how to even structure the changes. Would anybody be able to help guide me through this?

MDIO is a configuration bus for devices like PHYs. Do you have a datasheet for the SoC? Usually, there is a nice graph that shows the possible MAC/PHY configurations. I had a look at the MT7620A datasheet when porting to the RE200.

I only defined that on a Lantiq target a few weeks ago, I'm trying to port it to ramips for you - absolutely untested, since I don't own the device. As far as I remember, the reg = <0x5> property defines the MDIO address of the PHY.

&ethernet {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

	port@5 {
		status = "okay";
		phy-mode = "rgmii";
		phy-handle = <&phy5>
	};

	mdio0: mdio-bus {
		status = "okay";

		phy5: ethernet-phy@5 {
			reg = <0x5>;
			compatible = "ethernet-phy-ieee802.3-c22";
		};
	};
};

EDIT: A similar definition can be found in mt7620a_zyxel_keenetic-viva.dts, the only difference being the mediatek,fixed-link = <1000 1 1 1>; property which I assumed unnecessary.

Unfortunately, I couldn't find the RE210 in Austria, neither new nor used. The Gigabit port would be interesting to me, since I use it mostly as an AP.

I am BRAND NEW to OpenWrt. I've heard about it and know it as "open source firmware for your router".

That being said I have an RE210 I would love to use this on, but have no clue how to get started with this. I am a technical user, so clis don't scare me. Where should I start?

RE210 v1 has snapshot support.

Follow the RE210 v1 installation instructions.

See also the OpenWrt documentation

Thank you for those links, I found them while doing research. I've never done any of the stuff it says for the web interface option and don't see anything in the docs to help. Any guidance there would be appreciated.

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