i've bought a new TP-Link Archer C59 v1
I do it in Europe so the hardware version is EU/1.0
I tried the firmware downloaded from the lede repository but the router rejected it.
Tried to compile it by myself, same result.
I compared the tp-link firmware with the lede one (looking for some country codes) but the SupportList part is so similar.
I however tried to comment out a line (because in the tp-link firmware is missing the US special id) from tplink-safeloader.c and recompile the binary but the router still reject my firmware.
How can i know how the stock tp-link firmware check if the binary file is healty or not?
How can i bypass the check?
Thx in advance
Have a nice day
In the past the firmware filename had to be the same as the name of the original firmware. So go to TP-Link download website and download the original firmware file, check it's name and rename the LEDE factory image. Hope this helps.
thx for your answer.
I've tried to rename the lede factory image but the router still reject that image.
I tried to upgrade the tp-link firmware with their image and that worked.
I'm looking in the Tp-Link GPL source code to find how to bypass their image check.
Any advice will be appreciated.
Thx in advance
Hi. TP-Link firmware not accept this firmware because "soft ID" is missing in header. Try install this in recovery mode:
Set PC to fixed ip address 192.168.0.66
and rename it to tp_recovery.bin
Start a tftp server with the file tp_recovery.bin in its root directory
Turn off the router
Press and hold Reset button
Turn on router with the reset button pressed and wait ~15 seconds
Release the reset button and after a short time
the firmware should be transferred from the tftp server
Wait ~30 second to complete recovery.
The TFTP method always works and it's the most stable way anyway.
thx a lot for your advices.
I successfully flashed the Archer C59 with the tftp procedure.
i'm interested to understand the missing soft ID part.
Is it that?
soft_ver:1.0.1 Build 20160621 rel.63431
The fw_id seems a digital sign, do you know what it is?
Can i add a similar part just by editing the tplink-safeloader.c and get a binary working with the web-panel too?
I think this is possible. Currently tplink-safeloader.c include soft-version part: https://github.com/lede-project/source/blob/master/tools/firmware-utils/src/tplink-safeloader.c#L621 but it have only date.
thx for help.
I tried to understand the image architecture of Archer C59 and i found it quite different from older tp-link images.
I tried to put the build version:
s->version_major = 1;
s->version_minor = 0;
s->version_patch = 1;
I tried to populate the soft-version partition with the same string as the original image instead of the version_* part.
But the router reject my image everytime (it however works with the tftp procedure).
I think that fw_id is a signature used to recognize the original firmware (or just avoid people to flash the router with other country images), and i can't fake it.
I probably need a deep work of reverse engineering to map the neewer tp-link image format, and it will be useless if the fw_id is what i think it is.
I can't flash C59 too.
In TFTP server logs I see that router downloaded firmware file (renamed factory image), then router blinking by Power LED and Booted normally with stock firmware.
What I do wrong? How to flash them?
Same here c59 tftpd uploading image successfully but booting to stock os again....
I'm still learning on LEDE development and I thought that it would have been like adding an image for the Archer C7 v2 (eu, us and il), but I've realized that the Archer C59 stock firmware is using OpenWrt; so that might be wrong tip I gave you earlier.
I did a binary compare using a visual diff tool on the files extracted from each .bin firmwares (US vs EU) and did not find anything interesting
ve also tried to flash stock US and EU (Gui and tftpd methods) into my router - either downgrading is not working or I cant flash US/EU into my RU router. The only one I can really flash was RU version: ( http://static.tp-link.com/Archer%20C59(RU)_V1_160805.rar ), Both Gui and Ttpd methods work for it. I Highly appreciate if you could take a look on it too )!
Same thing as for US vs EU, nothing that I find interesting by file extraction and comparison.
You should consider using Serial TTL to get an output of the TFTP process. Maybe we could get a hint on what it's expecting.
EDIT: See Heinz comment below for the appropriate solution.
By the way, anybody know why there is no release build for the C59 ?
Just tried both Gui and tftpd and still no luck tftpd uploaded again but same stock firmware afterards.
@fedor70 You cannot update Your C59v1 RU with this files. Wait to merge my commit to LEDE:
Oh. Thank you! Waiting for merge!
@fedor70 Heinz commit has been merged into master. Use snapshot build to get a functional and accepted image by the stock firmware.
This one flashed throug Gui. Lan Connected, got IP from dhcp but 192.168.1.1 GUI unavailable. Looking forward on how to get it working! Thank you!