TP-Link Archer C9 Brick Fix (Revert To Stock Possibly)

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 20, 21, 22  Next
Author Message
RalphMalph
DD-WRT Novice


Joined: 29 Dec 2011
Posts: 43

PostPosted: Sun Feb 07, 2016 0:13    Post subject: Reply with quote
chrisdmc wrote:
RalphMalph wrote:


I think I did evertything ok, but when I check in Hex-editor I see only crap:
�!=9ӉQ�N7k<ʟ,KĒ�
�'�7��X<���0��E�%��w;X2�� 7P�"�.c~F<)Z�C�� yYJ��P��U�\�@�@��Cg����6�OOg�z*��C�O�kͿ���M��L6u�n\���F˸��3��UN@����N�d�p���Gg���(��P�U��Po

Is this good?
This is with ddwrt, or should I flash to factory with tftp first and then check the mtd1


If that is the content of TP-Link product-info partition, than the content was overwritten by DD-WRT.

Could you check using dmesg command what's the DD-WRT current partition layout on your router?


dmesg:
bcmsflash: squash filesystem found at block 28
Creating 6 MTD partitions on "bcmsflash":
0x000000000000-0x000000040000 : "boot"
0x000000040000-0x000000ff0000 : "linux"
0x0000001c0000-0x000000d70000 : "rootfs"
0x000000d70000-0x000000ff0000 : "ddwrt"
0x000000ff0000-0x000001000000 : "nvram_cfe"
0x000000fe0000-0x000000ff0000 : "nvram"
nflash: found no supported devices
Sponsor
kribby
DD-WRT Novice


Joined: 10 Apr 2008
Posts: 10

PostPosted: Sun Feb 07, 2016 3:10    Post subject: Reply with quote
Are the TPLink partitions only useful when you want to TFTP back to stock firmware?

Will I still be able to tftp DDWRT releases if I ever brick, if I don't fix this partition?
chrisdmc
DD-WRT Novice


Joined: 18 Jan 2016
Posts: 19

PostPosted: Sun Feb 07, 2016 4:17    Post subject: Reply with quote
kribby wrote:
Are the TPLink partitions only useful when you want to TFTP back to stock firmware?

Will I still be able to tftp DDWRT releases if I ever brick, if I don't fix this partition?


Those partitions are most likely required also when you attempt to flash from TP-Link web interface a new firmware!

Would expect TP-Link firmware to use the info on those partitions to check against the new firmware image for a match.

If you end-up flashing TP-Link firmware (from DD-WRT) and the content of those partitions is bad you might not be able to update original firmware or to flash back DD-WRT firmware without opening router case and using UART.
chrisdmc
DD-WRT Novice


Joined: 18 Jan 2016
Posts: 19

PostPosted: Sun Feb 07, 2016 4:23    Post subject: Reply with quote
Kiof wrote:


Thanks! I dont know how it was done but I am back to original now.

I did what you wrote BUT I got this failure note during execution:
"/tmp$ mtd write /tmp/radio.bin nvram_cfe
Unlocking nvram_cfe ...
Could not unlock MTD device: nvram_cfe
nvram_cfe: Not supported
Writing from /tmp/radio.bin to nvram_cfe ... [ ][e][w][w][w][w]"

Despite the failure I followed through your steps and I am back to original firmware.

Thanks both of you: chrisdmc and Heinzek! Your are expert and very helpful!


Thanks Kiof for confirming that my image correctly restores product-info partition on Archer C9 v1.
So, it looks that the radio partition in your case was overwritten too and that's why you were not able to boot with stock firmware.
kribby
DD-WRT Novice


Joined: 10 Apr 2008
Posts: 10

PostPosted: Sun Feb 07, 2016 20:50    Post subject: Reply with quote
chrisdmc wrote:
kribby wrote:
Are the TPLink partitions only useful when you want to TFTP back to stock firmware?

Will I still be able to tftp DDWRT releases if I ever brick, if I don't fix this partition?


Those partitions are most likely required also when you attempt to flash from TP-Link web interface a new firmware!

Would expect TP-Link firmware to use the info on those partitions to check against the new firmware image for a match.

If you end-up flashing TP-Link firmware (from DD-WRT) and the content of those partitions is bad you might not be able to update original firmware or to flash back DD-WRT firmware without opening router case and using UART.
So basically if I have no intention of ever returning to stock firmware with this router, there's no reason to even attempt to repair the partition?
a1smith
DD-WRT Novice


Joined: 20 Mar 2011
Posts: 30

PostPosted: Sun Feb 07, 2016 22:48    Post subject: Reply with quote
chrisdmc wrote:
Latest DD-WRT firmware (01/25/2016) no longer overwrites TP-Link partitions, try first to revert to stock using TFTP method!

EDIT: The image is only for Archer c9 v1.

For Archer C9 I have modified 12.bin image from @Heinzek to make it flash from DD-WRT web interface.

WARNING: Wait until somebody that have open the router case and has UART, have flash it and confirms that it works! Otherwise you could end-up with a bricked router.

WARNING: The image will overwrite default MAC and Pin on your router, to restore them you will have to modify the image in same way I have posted instructions for Costco US Archer C1900 (black case) or in the worst case flash the 'default-mac' and 'pin' partitions from CFE with correct data.

To validate the image works as expected:

1. Extract ddwrt-to-factory.bin from the attached zip and flash it from DD-WRT web interface as you would normally flash a DD-WRT update image (webflash.bin). Wait until DD-WRT reboots the router.
2. After DD-WRT reboots the router, do a hard-reset by pressing the reset button for around 30secs or until all the lights turn on.
3. Once in TP-Link web interface, flash the router with an official firmware. It should work.
4. Try to flash the official firmware by using TFTP (instructions by @Heinzek - page 2).


I successfully flashed my TP-Link Archer C9 v1 back to stock firmware using your file. I updated the MAC, PIN, and CRC in the file. Here are a few comments to help out others.

The router MAC and PIN in the file are the original Heinzek values, not the values you mention in the C1900 post. I'm listing the values in the file to prevent confusion and so people can confirm they are updating the correct locations.

Router MAC: 14 CC 20 D1 DC AA
WPA key/WPS pin: 79342513 (37 39 33 34 32 35 31 33 in hex)

The CRC value in the file is 0D 28 7D 83.

Here is my router flash history. I did a factory reset using GUI before flashing to DD-WRT.

    1. Original TP-Link Firmware (firmware version 3.17.0, build 20150514, release 70681n)
    2. reset to factory defaults via GUI
    3. DD-WRT 12-24-2015-r28598
    4. DD-WRT 02-01-2016-r29002
    5. DD-WRT 12-24-2015-r28598
    6. reset to factory defaults via GUI
    7. revert to stock firmware via DD-WRT GUI (firmware version 3.16.28, build 20141112, release 46311n)
    8. flash to latest TP-Link firmware via GUI (firmware version 3.17.0, build 20150514, release 70681n)

Some other details:
- I never turned on jffs2 so I didn't clear any nvram this way.
- I never used 'erase nvram' command.
- From telnet, dmesg command after DD-WRT boot was showing 'Northstar Prototype' as hardware. This was probably due to DD-WRT firmware before 1/25/16 overwriting product info.
- I didn't confirm TFTP flash works (step 4 above) but the other two flashes worked without any problems.


Last edited by a1smith on Tue Feb 09, 2016 0:56; edited 1 time in total
a1smith
DD-WRT Novice


Joined: 20 Mar 2011
Posts: 30

PostPosted: Sun Feb 07, 2016 23:14    Post subject: Reply with quote
kribby wrote:
chrisdmc wrote:
kribby wrote:
Are the TPLink partitions only useful when you want to TFTP back to stock firmware?

Will I still be able to tftp DDWRT releases if I ever brick, if I don't fix this partition?


Those partitions are most likely required also when you attempt to flash from TP-Link web interface a new firmware!

Would expect TP-Link firmware to use the info on those partitions to check against the new firmware image for a match.

If you end-up flashing TP-Link firmware (from DD-WRT) and the content of those partitions is bad you might not be able to update original firmware or to flash back DD-WRT firmware without opening router case and using UART.
So basically if I have no intention of ever returning to stock firmware with this router, there's no reason to even attempt to repair the partition?

That may not be the case. I flashed with 12/24/15 r28598 firmware which trashed product info in nvram. Using telnet and dmesg command during DD-WRT boot shows "Northstar Prototype" as hardware. The DD-WRT GUI shows TP-Link Archer C9.

LOM wrote:

One or more of the nvram variables used for detecting router type is missing so ddwrt will see the router type as "Broadcom Northstar" and will use an auto generated generic partition table instead of the router type specific one.


Maybe LOM can comment on:
    1. Is product info partition part of nvram variables used to detect router type? If so, it seems you have to restore product info and then flash with DD-WRT dated 1/25/16 or newer (partitions fixed to prevent the problem) to use Archer C9 specific partitions.

    2. Does using Archer C9 specific partitions make no difference in performance of DD-WRT and only serve to preserve info needed to revert to stock relative to the generic partitions?
kribby
DD-WRT Novice


Joined: 10 Apr 2008
Posts: 10

PostPosted: Mon Feb 08, 2016 4:31    Post subject: Reply with quote
Anyways, count me as another one who was able to successfully restore the tplink partition using ArcherC9RevertToStock. The power light flashed rapidly on mine too after the first flash attempt, so I had to repair the radio by tftping a ddwrt firmware again and follow the instructions on page 11

After doing that, I was able to downgrade to stock firmware, flash the latest stock version, then upgrade back to ddwrt 2/5 firmware. Dmesg is showing the correct partition layout now
chrisdmc
DD-WRT Novice


Joined: 18 Jan 2016
Posts: 19

PostPosted: Mon Feb 08, 2016 8:32    Post subject: Reply with quote
Thanks a1smith and kribby for confirmations.

Would like to add that for Archer C9 v1 router I have used 12.bin image from Heinzek and have not modified the MAC and PIN and that's why you are seeing Heinzek router values.

Instructions for Archer C1900 refer to Costco black model and for that one I have generated an image where MAC is 'AA-BB-CC-CC-BB-AA' and pin '11111111'.

But same instructions I have provided in C1900 post can be used to modify both images to restore your router MAC and PIN as a1smith already done it!

Thanks a1smith for the additional details provided for Archer C9 v1 model.
It's also safe to say that the router will be flash -able from TFTP since kribby already confirmed it and for you it worked from TP-Link web interface.

@RalphMalph: I could generate an image that you could flash from dd-wrt and would overwrite only TP-Link partitions but it should be safe to flash Archer C9 v1 image I have already provided. As always do it on your own risk, there are 2 confirmations that the image works as expected so far. Also make sure you have Archer C9 v1 model so the image matches your hardware!
chrisdmc
DD-WRT Novice


Joined: 18 Jan 2016
Posts: 19

PostPosted: Mon Feb 08, 2016 9:02    Post subject: Reply with quote
a1smith wrote:
kribby wrote:
So basically if I have no intention of ever returning to stock firmware with this router, there's no reason to even attempt to repair the partition?

That may not be the case. I flashed with 12/24/15 r28598 firmware which trashed product info in nvram. Using telnet and dmesg command during DD-WRT boot shows "Northstar Prototype" as hardware. The DD-WRT GUI shows TP-Link Archer C9.


New dd-wrt firmwares are no longer overwriting TP-Link partitions since 01/25/2016 build. Maybe admins should remove from download all early builds for Archer C9 v1 and Archer C1900 and possibly Archer C9 v2 (if that one had same issue)!

My image should be used only if you can't flash it via TFTP. Before flashing with my image, first make sure that product-info partition has junk data and/or your router is downloading the image from your computer (I always have to disable firewall or add exception for TFTP server to make it work) but the router is not flashing the image as expected via TFTP.

LOM already explained how the router is identified:

LOM wrote:

I don't think there is a way to distinguish between C1900 and C9, at least not early in the boot sequence.
Router type detection is mainly based on a combination of board identifier nvram variables.


BTW, I have run more tests with newer DD-WRT firmwares and although I have originally reported the Wi-Fi connectivity issue was fixed, I was mistaken: I still have Wi-Fi issues where I'm still "connected" to router but I can't access any web-pages or local shares. In some cases, issue it's fixed without my intervention after less than 1 minute or so, in other cases I have to manually disconnect and reconnect to make it work again.
Sometimes, only one client has the connectivity issue while other clients are working just fine!

Worth to note that with stock firmware I do not have this kind of problems.
a1smith
DD-WRT Novice


Joined: 20 Mar 2011
Posts: 30

PostPosted: Wed Feb 10, 2016 18:19    Post subject: Reply with quote
LOM wrote:
I have discussed the problem with Brainslayer and the solution is to remove the ddwrt partition which is used for jffs.
So no jffs on this router with so small flash and where the flash is stupidly used thereby limiting the firmware size to 14MB.
jffs is btw completely unnecessary on routers with an USB port, it is much better to mount and write to an external USB flash stick than doing it to internal flash.

Please check that partitioning is ok in next released ddwrt build!


Was this solution also implemented on Archer C1900 and Archer C9 v2? They are close cousins, if not siblings, of Archer C9 v1.
chrisdmc
DD-WRT Novice


Joined: 18 Jan 2016
Posts: 19

PostPosted: Thu Feb 11, 2016 3:01    Post subject: Reply with quote
a1smith wrote:

Was this solution also implemented on Archer C1900 and Archer C9 v2? They are close cousins, if not siblings, of Archer C9 v1.


It was implemented for Archer C1900 and I would expect for C9 V2 too.
RalphMalph
DD-WRT Novice


Joined: 29 Dec 2011
Posts: 43

PostPosted: Fri Feb 12, 2016 9:04    Post subject: Reply with quote
a1smith wrote:
chrisdmc wrote:
Latest DD-WRT firmware (01/25/2016) no longer overwrites TP-Link partitions, try first to revert to stock using TFTP method!

EDIT: The image is only for Archer c9 v1.

For Archer C9 I have modified 12.bin image from @Heinzek to make it flash from DD-WRT web interface.

WARNING: Wait until somebody that have open the router case and has UART, have flash it and confirms that it works! Otherwise you could end-up with a bricked router.

WARNING: The image will overwrite default MAC and Pin on your router, to restore them you will have to modify the image in same way I have posted instructions for Costco US Archer C1900 (black case) or in the worst case flash the 'default-mac' and 'pin' partitions from CFE with correct data.

To validate the image works as expected:

1. Extract ddwrt-to-factory.bin from the attached zip and flash it from DD-WRT web interface as you would normally flash a DD-WRT update image (webflash.bin). Wait until DD-WRT reboots the router.
2. After DD-WRT reboots the router, do a hard-reset by pressing the reset button for around 30secs or until all the lights turn on.
3. Once in TP-Link web interface, flash the router with an official firmware. It should work.
4. Try to flash the official firmware by using TFTP (instructions by @Heinzek - page 2).


I successfully flashed my TP-Link Archer C9 v1 back to stock firmware using your file. I updated the MAC, PIN, and CRC in the file. Here are a few comments to help out others.

The router MAC and PIN in the file are the original Heinzek values, not the values you mention in the C1900 post. I'm listing the values in the file to prevent confusion and so people can confirm they are updating the correct locations.

Router MAC: 14 CC 20 D1 DC AA
WPA key/WPS pin: 79342513 (37 39 33 34 32 35 31 33 in hex)

The CRC value in the file is 0D 28 7D 83.

Here is my router flash history. I did a factory reset using GUI before flashing to DD-WRT.

    1. Original TP-Link Firmware (firmware version 3.17.0, build 20150514, release 70681n)
    2. reset to factory defaults via GUI
    3. DD-WRT 12-24-2015-r28598
    4. DD-WRT 02-01-2016-r29002
    5. DD-WRT 12-24-2015-r28598
    6. reset to factory defaults via GUI
    7. revert to stock firmware via DD-WRT GUI (firmware version 3.16.28, build 20141112, release 46311n)
    8. flash to latest TP-Link firmware via GUI (firmware version 3.17.0, build 20150514, release 70681n)

Some other details:
- I never turned on jffs2 so I didn't clear any nvram this way.
- I never used 'erase nvram' command.
- From telnet, dmesg command after DD-WRT boot was showing 'Northstar Prototype' as hardware. This was probably due to DD-WRT firmware before 1/25/16 overwriting product info.
- I didn't confirm TFTP flash works (step 4 above) but the other two flashes worked without any problems.


Thank you both.
I managed to revert back to stock-rom with your information.

From the latest TP-link firmware I switched back to ddwrt and saw that the MAC changed again, not much, only the last digit. Or is it normal?

I changed in the .bin file to xx:xx:xx:xx:xx:CA , but WAN-MAC is now CB and LAN and WIFI is both C8
a1smith
DD-WRT Novice


Joined: 20 Mar 2011
Posts: 30

PostPosted: Fri Feb 12, 2016 14:11    Post subject: Reply with quote
RalphMalph wrote:
Thank you both.
I managed to revert back to stock-rom with your information.

From the latest TP-link firmware I switched back to ddwrt and saw that the MAC changed again, not much, only the last digit. Or is it normal?

I changed in the .bin file to xx:xx:xx:xx:xx:CA , but WAN-MAC is now CB and LAN and WIFI is both C8


You're welcome. I only added a few clarifying notes, many others did the heavy lifting.

Your MAC addresses are fine. The router has at least four of them: WAN, LAN, 2.4G wireless, 5G wireless.
RalphMalph
DD-WRT Novice


Joined: 29 Dec 2011
Posts: 43

PostPosted: Mon Feb 15, 2016 11:02    Post subject: Reply with quote
Thanx anyway.
And thank you also to reply on the MAC-address-issue.
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 20, 21, 22  Next Display posts from previous:    Page 12 of 22
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum