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

Canadian CPE510 v1.1 - Hardware not supported #12939

Closed
1 task done
mungewell opened this issue Jun 18, 2023 · 8 comments
Closed
1 task done

Canadian CPE510 v1.1 - Hardware not supported #12939

mungewell opened this issue Jun 18, 2023 · 8 comments
Labels
bug issue report with a confirmed bug

Comments

@mungewell
Copy link

Describe the bug

I have been trying to flash a TP-Link CPE510v1.1, and getting the message 'hardware not supported'. The official FW identifies the unit as:
Screenshot_2023-06-18_10-01-23

I am aware the the 'supported' list in the code here, which would suggest that it is possible....
https://git.archive.openwrt.org/?p=openwrt.git;a=blob;f=tools/firmware-utils/src/tplink-safeloader.c;h=77a894b237281f6211dd1123ead4b5b0f2f58370;hb=c8315df1affa8eadb2ccbfd421a1e5806a444f47#l133

However, I was able to flash an official FW, and when I look at the strings within that binary I see:

simon@the-void:~/Downloads$ strings Pharos_2.0-up-ver2-1-6-P1[20170908-rel45233].bin | grep CPE510
(CPE510(TP-LINK|UN|N300-5|00000000):2.0
CPE510(TP-LINK|UN|N300-5):1.0
CPE510(TP-LINK|UN|N300-5):1.1
CPE510(TP-LINK|US|N300-5):1.1
CPE510(TP-LINK|EU|N300-5):1.1
CPE510(TP-LINK|CA|N300-5):1.1 <------------------
CPE510(TP-LINK|UN|N300-5|00000000):2.0
CPE510(TP-LINK|US|N300-5|55530000):2.0
CPE510(TP-LINK|EU|N300-5|45550000):2.0
CPE510(TP-LINK|CA|N300-5|43410000):2.0
CPE510(TP-LINK|UN|N300-5|00000000):3.0

Perhaps this suggests that there is a separate ID for units sold in Canada. I am not set up to rebuild the OpenWRT code, but can perform simple testing if it would help.

Is it 'safe' to binary edit the bin, to change 'US' to 'CA' as a quick test whether this is the root cause of my problem?

OpenWrt version

n/a

OpenWrt target/subtarget

n/a

Device

CPE510v1.1

Image kind

Official downloaded image

Steps to reproduce

Attempt to flash FW "openwrt-22.03.5-ath79-generic-tplink_cpe510-v1-squashfs-factory.bin"

"Hardware Not Supported"

Actual behaviour

No response

Expected behaviour

No response

Additional info

No response

Diffconfig

No response

Terms

  • I am reporting an issue for OpenWrt, not an unsupported fork.
@mungewell mungewell added the bug issue report with a confirmed bug label Jun 18, 2023
@brada4
Copy link

brada4 commented Jun 18, 2023

Shorten file name to something like factory.bin

@mungewell
Copy link
Author

@brada4 Thanks for the suggestion, unfortunately this does NOT improve situation. The .bin was not uploaded with same 'Unsuppoorted hardware" message.

I made the following change with a hex editor

 00002050:  7c 4e 33 30 30 2d 35 29  3a 31 2e 30 0d 0a 43 50  |N300-5):1.0..CP
 00002060:  45 35 31 30 28 54 50 2d  4c 49 4e 4b 7c 55 4e 7c  E510(TP-LINK|UN|  <--- Change 0x55,0x4e to 0x43,0x41
 00002070:  4e 33 30 30 2d 35 29 3a  31 2e 31 0d 0a 43 50 45  N300-5):1.1..CPE

Giving

 00002050:  7c 4e 33 30 30 2d 35 29  3a 31 2e 30 0d 0a 43 50  |N300-5):1.0..CP
 00002060:  45 35 31 30 28 54 50 2d  4c 49 4e 4b 7c 43 41 7c  E510(TP-LINK|CA|  <-----
 00002070:  4e 33 30 30 2d 35 29 3a  31 2e 31 0d 0a 43 50 45  N300-5):1.1..CPE

And that resulted in a different error message "The file is incorrect". So I guess there must be a checksum covering the file. I'll either have to set up a build enviroment or figure another hack to bypass/recompute the checksum.

@brada4
Copy link

brada4 commented Jun 19, 2023

It is described here:
https://forum.openwrt.org/t/tp-link-router-firmware-checksum-recalculation/99588
tp-link support says Canada has US devices? Check all kings of barcodes and fcc-id-s to confirm it is same device with few bits difference.

mungewell added a commit to mungewell/firmware-utils that referenced this issue Jun 20, 2023
@mungewell
Copy link
Author

After fighting with the build system for a while I was able to add the 'CA' device ID, and could then flash the resultant openwrt-ath79-generic-tplink_cpe510-v1-squashfs-factory.bin to the unit.

Seems like I didn't enable enough packages to get a fully working system, but I can SSH into it via ethernet interface.... now to figure that out!

@brada4
Copy link

brada4 commented Jun 20, 2023

Once in OpenWRT you can use sysupgrade to get any version you like, preferably same you built to load.

If looking at "GPL code" from CPE510 v1.0 then it is same exact hardware globally with software US/EU flip switch.

@mungewell
Copy link
Author

I was able to use opkg to install the GUI and extra bits I needed.

I also believe/presume that the hardware is the same.... What I do know is that I was unable to flash the first code I built (without changes) and WAS able to flash the adjusted code.

If there is something that I can do to display the device ID from my device (or anything else to convince you) then just give me instructions. :-)

@brada4
Copy link

brada4 commented Jun 20, 2023

I have to search it too... It has to be near safeloader, in file containing 1.0|EU 1.1|US etc, search the commit adding another CPE510/520 revisions.

@Djfe
Copy link
Contributor

Djfe commented Jun 27, 2023

openwrt-bot pushed a commit that referenced this issue Nov 21, 2023
1d42292d8063 tplink-safeloader: Add TP-Link Archer A6 V3.20
3338f5389d72 tplink-safeloader: add TL-WPA8635P v3
17ca5eeb1c10 tplink-safeloader: add TL-WPA8631P v4
f730ad2fa0b4 bcmblob: new tool for reading Broadcom's BLOBs
cb1ddac98124 firmware-utils: fix typo in error message when no OpenSSL library found
916633160dc9 bcmclm: new tool for reading Broadcom's CLM data
a2d49fb1e188 tplink-safeloader: add RU support-list entry for Archer C6U v1
bb12cf5c3fa9 tplink-safeloader: Add support for TP-Link Deco M5 The special_id values are the same for EU and Asian models, and they apply to all models: v1, v2, and v3. They are not sorted as they are currently in the same order as extracted from the official firmware image.
9e2de8515be1 tplink-safeloader: add EAP610 v3 and EAP613 v1
a170683c0e11 firmware-utils: fix use of NULL string progname
89875fc18b57 tplink-safeloader: CPE510: add Canadian support
9e211d2980fe mktplinkfw2: add support to extract bootloader images
c18f662f3c74 mktplinkfw2: add support to pack bootloader
3dc133915f87 mktplinkfw2: show exact exceed bytes when the image is to big
d16ff798d58a tplink-safeloader: WPA8631: add v4 AU, US
0fa1cc51013f zytrx: add LTE5398-M904
635466123429 firmware-utils: ptgen: add SiFive GPT partition support
ba5bc4e1ae9d add dlink-sge-image for D-Link devices by SGE
3b114de29cf7 lxlfw: move code opening LXL to helper function
8e149e480391 lxlfw: move code copying data to helper function
16fa89076122 lxlfw: fix struct lxl_hdr attribute
d770cab82e58 lxlfw: support embedding blobs
eaf2ea28dbe6 lxlfw: support extracting image
12bf1a99bd6e lxlfw: support certificate & signature blobs

Fixes: #12939
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
danpawlik pushed a commit to danpawlik/openwrt that referenced this issue Nov 23, 2023
1d42292d8063 tplink-safeloader: Add TP-Link Archer A6 V3.20
3338f5389d72 tplink-safeloader: add TL-WPA8635P v3
17ca5eeb1c10 tplink-safeloader: add TL-WPA8631P v4
f730ad2fa0b4 bcmblob: new tool for reading Broadcom's BLOBs
cb1ddac98124 firmware-utils: fix typo in error message when no OpenSSL library found
916633160dc9 bcmclm: new tool for reading Broadcom's CLM data
a2d49fb1e188 tplink-safeloader: add RU support-list entry for Archer C6U v1
bb12cf5c3fa9 tplink-safeloader: Add support for TP-Link Deco M5 The special_id values are the same for EU and Asian models, and they apply to all models: v1, v2, and v3. They are not sorted as they are currently in the same order as extracted from the official firmware image.
9e2de8515be1 tplink-safeloader: add EAP610 v3 and EAP613 v1
a170683c0e11 firmware-utils: fix use of NULL string progname
89875fc18b57 tplink-safeloader: CPE510: add Canadian support
9e211d2980fe mktplinkfw2: add support to extract bootloader images
c18f662f3c74 mktplinkfw2: add support to pack bootloader
3dc133915f87 mktplinkfw2: show exact exceed bytes when the image is to big
d16ff798d58a tplink-safeloader: WPA8631: add v4 AU, US
0fa1cc51013f zytrx: add LTE5398-M904
635466123429 firmware-utils: ptgen: add SiFive GPT partition support
ba5bc4e1ae9d add dlink-sge-image for D-Link devices by SGE
3b114de29cf7 lxlfw: move code opening LXL to helper function
8e149e480391 lxlfw: move code copying data to helper function
16fa89076122 lxlfw: fix struct lxl_hdr attribute
d770cab82e58 lxlfw: support embedding blobs
eaf2ea28dbe6 lxlfw: support extracting image
12bf1a99bd6e lxlfw: support certificate & signature blobs

Fixes: openwrt#12939
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
darknblack pushed a commit to darknblack/openwrt that referenced this issue Nov 25, 2023
1d42292d8063 tplink-safeloader: Add TP-Link Archer A6 V3.20
3338f5389d72 tplink-safeloader: add TL-WPA8635P v3
17ca5eeb1c10 tplink-safeloader: add TL-WPA8631P v4
f730ad2fa0b4 bcmblob: new tool for reading Broadcom's BLOBs
cb1ddac98124 firmware-utils: fix typo in error message when no OpenSSL library found
916633160dc9 bcmclm: new tool for reading Broadcom's CLM data
a2d49fb1e188 tplink-safeloader: add RU support-list entry for Archer C6U v1
bb12cf5c3fa9 tplink-safeloader: Add support for TP-Link Deco M5 The special_id values are the same for EU and Asian models, and they apply to all models: v1, v2, and v3. They are not sorted as they are currently in the same order as extracted from the official firmware image.
9e2de8515be1 tplink-safeloader: add EAP610 v3 and EAP613 v1
a170683c0e11 firmware-utils: fix use of NULL string progname
89875fc18b57 tplink-safeloader: CPE510: add Canadian support
9e211d2980fe mktplinkfw2: add support to extract bootloader images
c18f662f3c74 mktplinkfw2: add support to pack bootloader
3dc133915f87 mktplinkfw2: show exact exceed bytes when the image is to big
d16ff798d58a tplink-safeloader: WPA8631: add v4 AU, US
0fa1cc51013f zytrx: add LTE5398-M904
635466123429 firmware-utils: ptgen: add SiFive GPT partition support
ba5bc4e1ae9d add dlink-sge-image for D-Link devices by SGE
3b114de29cf7 lxlfw: move code opening LXL to helper function
8e149e480391 lxlfw: move code copying data to helper function
16fa89076122 lxlfw: fix struct lxl_hdr attribute
d770cab82e58 lxlfw: support embedding blobs
eaf2ea28dbe6 lxlfw: support extracting image
12bf1a99bd6e lxlfw: support certificate & signature blobs

Fixes: openwrt#12939
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this issue Dec 4, 2023
1d42292d8063 tplink-safeloader: Add TP-Link Archer A6 V3.20
3338f5389d72 tplink-safeloader: add TL-WPA8635P v3
17ca5eeb1c10 tplink-safeloader: add TL-WPA8631P v4
f730ad2fa0b4 bcmblob: new tool for reading Broadcom's BLOBs
cb1ddac98124 firmware-utils: fix typo in error message when no OpenSSL library found
916633160dc9 bcmclm: new tool for reading Broadcom's CLM data
a2d49fb1e188 tplink-safeloader: add RU support-list entry for Archer C6U v1
bb12cf5c3fa9 tplink-safeloader: Add support for TP-Link Deco M5 The special_id values are the same for EU and Asian models, and they apply to all models: v1, v2, and v3. They are not sorted as they are currently in the same order as extracted from the official firmware image.
9e2de8515be1 tplink-safeloader: add EAP610 v3 and EAP613 v1
a170683c0e11 firmware-utils: fix use of NULL string progname
89875fc18b57 tplink-safeloader: CPE510: add Canadian support
9e211d2980fe mktplinkfw2: add support to extract bootloader images
c18f662f3c74 mktplinkfw2: add support to pack bootloader
3dc133915f87 mktplinkfw2: show exact exceed bytes when the image is to big
d16ff798d58a tplink-safeloader: WPA8631: add v4 AU, US
0fa1cc51013f zytrx: add LTE5398-M904
635466123429 firmware-utils: ptgen: add SiFive GPT partition support
ba5bc4e1ae9d add dlink-sge-image for D-Link devices by SGE
3b114de29cf7 lxlfw: move code opening LXL to helper function
8e149e480391 lxlfw: move code copying data to helper function
16fa89076122 lxlfw: fix struct lxl_hdr attribute
d770cab82e58 lxlfw: support embedding blobs
eaf2ea28dbe6 lxlfw: support extracting image
12bf1a99bd6e lxlfw: support certificate & signature blobs

Fixes: openwrt#12939
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report with a confirmed bug
Projects
None yet
Development

No branches or pull requests

3 participants