TP-Link CPE220 v2

Hi,
I got another device on my table that needs support.
This time it is CPE220 v2.

Unlike v1 of CPE210 and CPE220, they don't share the same board in V2.
CPE220 v2 uses the same board as v1 but with modified firmware and different safeloader partitions.
So separate profile for it was needed, that was easy.
Device boots LEDE without an issue, but product-info partitions looks completely differently so tplink_pharos_board_detect cannot be used for sysupgrade and board_name populating.
Here is the dump from product info partition of CPE210 v1:

And here is from CPE220 v2:

So currently I am building an image that uses the classic check.
Current code is here:https://github.com/robimarko/source/tree/CPE220-v2

Also, TP Link messed up TFTP recovery.
It does not work at all, stock images or LEDE they get pulled and then the following error is output:

Incorrect File.
Writing error.

Also, you cant get to safeloader menu because it is password protected and password for June 2015 version that is used is unknown.

2 Likes

Hellow Robimarko,

Thanks for all your work, when build for cpe220 I must choose in menuconfig cpe220 v1 within your code? Or how I do the build for cpe220?

Thanks a lot

1 Like

No,there is CPE220 v2 to chose as subtarget.
Chose that

1 Like

Hello again robimarco,

I tried Target System (Arteros AR7xxx/AR9xxx), subtarget (generic) and in target Profile doesnt exist the CPE220 v2 option, only CPE220 v1, could you help me please? or what am I doing wrong?

Thanks a lot

1 Like

That means you are not cloning correct branch.
You need to clone branch linked in first post

1 Like

cpe220 v2 in which stage ?

After CPE210 v2 is merged I will also add CPE220 v2.
Its not hard

1 Like

this is the perfect news @robimarko

Thanks robimarko for doing all the work on this. I'm guessing they wont port this back to the stable build of Lede. I pulled the branch for the cpe220 v2 and compiled it. The factory image works well but the sysupgrade image has the wrong image magic.

Invalid image magic '7f454c46'. Expected '01000000'.
Image check 'platform_check_image' failed.

Yes,that is due to wrong platform.sh code for checking.
You could reuse functions from CPE210v2

Thanks robimarko but it was a brick for a while after forcing the flash with the factory image. As you know tftp doesn't work on any image and the password for uboot/safeloader is unknown.
I did however manage boot to a ramdisk image lede-ar71xx-generic-cpe220-v2-initramfs-kernel.bin by renaming it to vmlinuz and I have force flashed the sysupgrade image and all looks good so far.

Something is weird if it got bricked.
I tested factory image before and it worked

No the factory image is fine to install over the factory firmware, I bricked it by forcing a sysupgrade with the factory image after it was already running Lede.

@robimarko CPE210 v2 has been added with https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=5c5bf8b8658a588423f6ec445d7ef6a36f99a396

Any outlook when CPE220 v2 support could be available?

Soon, I am working on it

Hello ,Is there any improvement for cpe220v2

hi, could you give me your version of vmlinuz to recover my cpe220? I can not get the initramfs version of led anywhere, the current snapshots are looking for an image and in System halted, I tried to build a version of ubuntu and I get the same result, I try to rebuild from a source code of led and I get an error when compiling, from now on Thanks to anyone who can help me.

I'm sorry but this was 2 years ago and I've deleted all the old experimental stuff I had for this device. From memory it failed to boot the initramfs several times and for some reason it finally booted. I don't think I was able to reproduce that though and I gave up on this device long ago.

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