E4200 bad flash recovery

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4  Next
Author Message
PowerPoldi
DD-WRT User


Joined: 15 Oct 2016
Posts: 65

PostPosted: Thu Dec 10, 2020 12:07    Post subject: Reply with quote
I've used this USB2Serial-Adapter to recover my E4200 this spring. As soon as it was connected I've received message promts in putty.

Did use Win10-64 and putty portable

https://www.amazon.de/gp/product/B01N7KA3OO/ref=ppx_yo_dt_b_asin_title_o08_s01?ie=UTF8&psc=1
Sponsor
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Thu Dec 10, 2020 15:18    Post subject: Reply with quote
kernel-panic69 wrote:
Check your ground connection.
I'll solder my db-9f pigtail to prove a point but I don't think that's it. Unless pin 5 on the PC board is not actually ground?
_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 2790

PostPosted: Thu Dec 10, 2020 15:38    Post subject: Reply with quote
https://www.amazon.de/dp/B07RBKCW3S | https://www.amazon.de/dp/B07WX2DSVB

https://www.amazon.de/dp/B07TS3GPQ1 | https://www.amazon.de/dp/B07TXVRQ7V

I use the DTECH (first link), but any quality built FT232RL chip based adapter should work.

https://www.ftdichip.com/Drivers/VCP.htm | Installation Guides
Windows x64: driver zip, Release Notes, setup exe alternative | Mac OS X: 10.9 and above
https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip | tftpd32.464.zip, tftpd32.452.zip
https://duckduckgo.com/?q=putty+mac+alternative | https://duckduckgo.com/?tq=tftp+mac

https://openwrt.org/toh/linksys/linksys_e4200_v1#serial (E4200 v1)

https://openwrt.org/toh/linksys/ea4500#serial (E4200 v2)
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 8379
Location: Texas, USA

PostPosted: Thu Dec 10, 2020 19:47    Post subject: Reply with quote
This is the reference I used for E4200 serial:

Linksys E4200 Serial/JTAG Port Guide

I own a half dozen of them. If I say it's a connection issue, feel free to disprove. I have run the gamut up to and save having to JTAG one to recover.

_________________
Official Forum Rules, Guidelines & Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum. ---------------------- Linux User #377467 counter.li.org / linuxcounter.net
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Fri Dec 11, 2020 1:55    Post subject: Reply with quote
kernel-panic69 wrote:
This is the reference I used for E4200 serial:

Linksys E4200 Serial/JTAG Port Guide

I own a half dozen of them. If I say it's a connection issue, feel free to disprove. I have run the gamut up to and save having to JTAG one to recover.
Thanks. I did read through this thread as well before proceeding. My device is
Code:
$ lsusb
Bus 003 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
I don't think there's much denying I have a solid ground. The on board pin-out is already null modem. db9 pin 2 is RX. PCB pin 2 is TX. So it's pin for pin to wire it. The two captured terminal sessions are virtually identical. And the same is true using my PL2303 USB-Serial adapter.

So, either the router is really trashed or I'm right about the need for true TTL. I do have a serial to TTL converter that I use for my Kenwood TS-440S ham radio but it uses db25 and I'm not in a hurry to dismantle it from my radio system to try it on my router. Still going to throw a little TTL converter together to test my theory.



20201210_193106-sm.jpg
 Description:
 Filesize:  79.66 KB
 Viewed:  470 Time(s)

20201210_193106-sm.jpg



Screenshot_2020-12-10_20-15-00.png
 Description:
 Filesize:  289.35 KB
 Viewed:  470 Time(s)

Screenshot_2020-12-10_20-15-00.png



screenshot_2020_12_10_20_24_00_129.png
 Description:
 Filesize:  312.89 KB
 Viewed:  470 Time(s)

screenshot_2020_12_10_20_24_00_129.png



_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7


Last edited by ZeroLabs on Wed Dec 16, 2020 23:28; edited 1 time in total
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Fri Dec 11, 2020 2:16    Post subject: Reply with quote
blkt wrote:
https://www.amazon.de/dp/B07RBKCW3S | https://www.amazon.de/dp/B07WX2DSVB

https://www.amazon.de/dp/B07TS3GPQ1 | https://www.amazon.de/dp/B07TXVRQ7V

I use the DTECH (first link), but any quality built FT232RL chip based adapter should work.

https://www.ftdichip.com/Drivers/VCP.htm | Installation Guides
Windows x64: driver zip, Release Notes, setup exe alternative | Mac OS X: 10.9 and above
https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip | tftpd32.464.zip, tftpd32.452.zip
https://duckduckgo.com/?q=putty+mac+alternative | https://duckduckgo.com/?tq=tftp+mac

https://openwrt.org/toh/linksys/linksys_e4200_v1#serial (E4200 v1)

https://openwrt.org/toh/linksys/ea4500#serial (E4200 v2)
I do like that FTDI with all the berg jumper settings. Wildly versatile. I might buy one just to have it on my bench.
_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 8379
Location: Texas, USA

PostPosted: Fri Dec 11, 2020 13:49    Post subject: Reply with quote
Your ground connection, re-flow the solder. Or not. I tried.
_________________
Official Forum Rules, Guidelines & Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum. ---------------------- Linux User #377467 counter.li.org / linuxcounter.net
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Fri Dec 11, 2020 19:05    Post subject: Reply with quote
kernel-panic69 wrote:
Your ground connection, re-flow the solder. Or not. I tried.
Come on, man. I know you don't know me but a little more credit please?
_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Sat Dec 12, 2020 19:12    Post subject: Reply with quote
Okay then. I whipped up this little circuit board in about 1hr start to finish. And look what we have here! Permit me to take a moment to bask in the sunshine of success and vindication. 8)

The only substitutions I made were the transistors which are really not that critical. I used TIS93 and TIS98 because that's what I have a good supply of. Pin 1 at the PCB is 3.3v and the TTL converter works perfectly. Works with either the PL2303 or FTDI serial interfaces, as well as PuTTy 0.67 without the special VT100 translation setting and GTKTerm in Linux.

Should be smooth sailing from here. Famous last words.



Screenshot_2020-12-12_13-49-17.png
 Description:
 Filesize:  192.69 KB
 Viewed:  469 Time(s)

Screenshot_2020-12-12_13-49-17.png



20201212_122109.jpg
 Description:
 Filesize:  62.84 KB
 Viewed:  573 Time(s)

20201212_122109.jpg



20201212_122052.jpg
 Description:
 Filesize:  71.26 KB
 Viewed:  573 Time(s)

20201212_122052.jpg



_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7


Last edited by ZeroLabs on Wed Dec 16, 2020 23:30; edited 1 time in total
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Sat Dec 12, 2020 21:55    Post subject: Reply with quote
Famous last words indeed. Now after flashing factory firmware all I get is this, once every second, cannot interrupt it, and dead ethernet ports.

Code:
CFE version 2010.09.20.0 based on BBP 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Fri Nov 12 11:01:26 CST 2010 (lzh@team2-complier)
Copyright (C) 2000-2008 Broadcom Corporation.

Init Arena
Init Devs.

No DPN
This is a Serial Flash
Boot partition size = 262144(0x40000)
Found an ST compatible serial flash with 256 64KB blocks; total size 16MB
sflash_cfe_probe: flash type ST, nparts 4
sflash_cfe_probe: idx 0, name boot, descr ST Serial flash offset 00000000 size 256KB
sflash_cfe_probe: idx 1, name trx, descr ST Serial flash offset 00040000 size 1KB
sflash_cfe_probe: idx 2, name os, descr ST Serial flash offset 0004001C size 16068KB
sflash_cfe_probe: idx 3, name nvram, descr ST Serial flash offset 00FF1000 size 60KB
sflash_cfe_probe: flash type ST, nparts 3
sflash_cfe_probe: idx 0, name boot, descr ST Serial flash offset 00000000 size 256KB
sflash_cfe_probe: idx 1, name trx, descr ST Serial flash offset 00040000 size 16068KB
sflash_cfe_probe: idx 2, name nvram, descr ST Serial flash offset 00FF1000 size 60KB
sflash_cfe_probe: flash type ST, nparts 0
CPU type 0x19740: 133MHz
Tot mem: 65536 KBytes

CFE mem:    0x80700000 - 0x8079EA40 (649792)
Data:       0x80734000 - 0x80737FE0 (16352)
BSS:        0x80737FE0 - 0x80738A40 (2656)
Heap:       0x80738A40 - 0x8079CA40 (409600)
Stack:      0x8079CA40 - 0x8079EA40 (8192)
Text:       0x80700000 - 0x80734000 (212992)

board_final_init: commit=0, restore_defaults=0Boot version: v5.2
The boot is CFE

mac_init(): Find mac [58:6D:8F:20:A5:03] in location 0
Nothing...
country_init(): Find country code in location 0
The country is same
**Exception 8: EPC=80718DDC, Cause=80000008 (TLBMissRd)
                RA=80718DE4, VAddr=0000000C

        0  ($00) = 00000000     AT ($01) = 80730000
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 80739A80     a1 ($05) = 8072E345
        a2 ($06) = 00000001     a3 ($07) = 00000005
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 807337EC     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 48534C46
        t6 ($14) = 9FC036BC     t7 ($15) = DFD1B8B7
        s0 ($16) = 00000000     s1 ($17) = 8072E32C
        s2 ($18) = 8072E2E4     s3 ($19) = 8072E2F0
        s4 ($20) = 8079E800     s5 ($21) = 8079E800
        s6 ($22) = 19A14716     s7 ($23) = 00000001
        t8 ($24) = 04000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 8073C000     sp ($29) = 8079E7D8
        fp ($30) = 00000000     ra ($31) = 80718DE4



What have I done now?

_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Sun Dec 13, 2020 17:26    Post subject: Reply with quote
Well, looks like I hosed this router pretty bad. Serial only gives me the cycle shown above once every second and I cannot interrupt it. Loopback is working so I know keyboard commands are being sent. Unless someone can share a tip that lets me break this cycle long enough to try CFE commands again, JTAG appears to be my last resort.

I've gone this far, may as well dive all the way in. I've seen some JTAG wiring diagrams that link directly to a DB-25 parallel port through 100 ohm resistors. Can this same thing be done using a serial adapter? Or am I looking at buying some sort of specialized hardware?

I'm on Linux so I hope openwince-jtag will do the trick for software needed to communicate. This is uncharted territory for me.

Edit: On second thought, after reading through this https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=889394 I'm not going down this road. Thanks everyone for your help but I believe it's dumpster time.

_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7
PowerPoldi
DD-WRT User


Joined: 15 Oct 2016
Posts: 65

PostPosted: Mon Dec 14, 2020 8:31    Post subject: Reply with quote
If you'll try to jtag it, I'll reference my thread from this spring. Probably, you'll find some useful information there. In the end, I managed to recover my device by serial.
However, I was prepared for plan "B"

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324949&highlight=brjtag
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 8379
Location: Texas, USA

PostPosted: Tue Dec 15, 2020 4:18    Post subject: Reply with quote
Or just send it here if you don't want to fix it.
_________________
Official Forum Rules, Guidelines & Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum. ---------------------- Linux User #377467 counter.li.org / linuxcounter.net
ZeroLabs
DD-WRT Novice


Joined: 08 Apr 2017
Posts: 48
Location: Underground lair

PostPosted: Tue Dec 15, 2020 13:50    Post subject: Reply with quote
PowerPoldi wrote:
If you'll try to jtag it, I'll reference my thread from this spring. Probably, you'll find some useful information there. In the end, I managed to recover my device by serial.
However, I was prepared for plan "B"

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324949&highlight=brjtag
I got as far as you did with serial but in the end I have a corrupt CFE identical to this
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=889394

I stumbled across something called OpenOCD ( http://openocd.org/ ). Latest version in the Ubuntu 16.04 repos was 0.9 but much has improved since. Compiling the latest 0.11 from source code was a snap. I'm a glutton for punishment so I'll be ordering an Altera JTAG adapter with which OpenOCD is compatible.

Sorry, Kernel. No early Christmas present just yet. LOL!

_________________
Routers: Netgear R8000, Linksys E1200v1, E4200, WRT54Gv3, TL-WDR4300v1.7
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 8379
Location: Texas, USA

PostPosted: Tue Dec 15, 2020 13:52    Post subject: Reply with quote
Well, with as much as I have spent on birthday and Christmas presents to myself this year to make up for all of the COVID gloom, no worries! Good luck!
_________________
Official Forum Rules, Guidelines & Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum. ---------------------- Linux User #377467 counter.li.org / linuxcounter.net
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 3 of 4
Post new topic   Reply to topic    DD-WRT Forum 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