RT-N16 JTAG recovery

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
goldbeanchina
DD-WRT Novice


Joined: 13 Jan 2013
Posts: 11

PostPosted: Thu Jan 24, 2013 8:28    Post subject: Reply with quote
I don’t have a wiki account. So I share my experience here. This is for rt-n16 jtag recovery.
Where to order the jtag adaptor or cable:
http://www.diygadget.com/jtag-cables/universal-jtag-adapter-v2-wiggler-and-xilinx-platform-cable-compatible-debrick-routers-modems-and-more.html
It has everything u need wires and pins.

Solder pins according to pin layout @ http://www.dd-wrt.com/wiki/index.php/JTAG_pinouts#Asus_RT-N16
I only soldered TDI, TDO, TMS, TCK &GND.
Wire up the jtag adaptor using buffer mode according to the diagram here: http://www.tiaowiki.com/w/Universal_JTAG_User_Manual_%28Parallel%29#Buffered_mode
In this web page, The pcb layout is not the same as the one I received. But the pins are labeled correctly. So it is ok.
Connect only TDI, TDO, TMS, TCK &GND from router to adaptor.

Plugin mini usb to the jtag adaptor and plug the adaptor to pc’s LPT port.

I use win7 and the software is from http://sourceforge.net/projects/tjtag/files/
I always use these switches for rt-n16: /noreset /nodma /byte_mode
For my case, it is easy. I only want to fix the nvram entry I messed up. I backup nvram and use hex editor and change clkfreq to the right value, and flash it back. My trusted rt-n16 is back. ^_~

Hope this is helpful for anyone who may decide to use jtag before trying replace NAND chip.
barryware wrote:
goldbeanchina wrote:
Got adaptor from diygadget and just recovered it last night. I'll update the wiki when I'm home. Overall, it's a fairly easy process if you are comfortable with soldering a few pins on the PCB. Smile And the buffered jtag makes the process easier with long cable.
I can now mess up this router really good (or bad) with this Jtag insurance policy as long as I do not physically damage the router.

Thanks guys for guiding me through this.

Congrats.. I can't find the "like" button but if we had one....
Sponsor
Magnetron1.1
DD-WRT User


Joined: 21 Nov 2010
Posts: 278
Location: North America

PostPosted: Thu Jan 24, 2013 18:25    Post subject: Reply with quote
@goldbeanchina: Congratulations on restoring your router.

I repeated your clkfreq experiment and found an easier and much faster way to recover. (JTAG flashing a 128KB NVRAM file requires about 1 hour and 54 minutes.)

Here's what worked for me:

  • At a command line prompt enter: tjtag3 -erase:nvram /byte_mode <=== Executes in 1 second!
  • Power cycle the router which causes the CFE to restore default values (i.e. clkfreq=480,240,120) to the NVRAM partition and allows the router to successfully boot.
  • Use the router's WebGUI to restore a good, previously saved config file.


Here's a helpful wiring diagram for the TIAO Version 2 Universal JTAG PCB: (Click on image to make bigger in a new browser tab)


Download larger image from here.

- Magnetron1.1


Last edited by Magnetron1.1 on Sun Jan 27, 2013 15:49; edited 2 times in total
goldbeanchina
DD-WRT Novice


Joined: 13 Jan 2013
Posts: 11

PostPosted: Thu Jan 24, 2013 23:37    Post subject: Reply with quote
Yours is definitely the preferred approach. Very Happy

The reason I'd like to restore the modified Nvram is because that I do not have a recent backup, I am very lazy to go through the manually setup for VPN firewall rule and other things, Should have done the nvram backup more frequently. Smile

BTW, the wiring diagram is wonderful. Smile

Magnetron1.1 wrote:
@goldbeanchina: Congratulations on restoring your router.

I repeated your clkfreq experiment and found an easier and much faster way to recover. (JTAG flashing a 128KB NVRAM file requires about 1 hour and 54 minutes.)

Here's what worked for me:

  • At a command line prompt enter: tjtag3 -erase:nvram /byte_mode <=== Executes in 1 second!
  • Power cycle the router which causes the CFE to restore default values (i.e. clkfreq=480,240,120) to the NVRAM partition and allows the router to successfully boot.
  • Use the router's WebGUI to restore a good, previously saved config file.


Here's a helpful wiring diagram for the TIAO Version 2 Universal JTAG PCB: (Click on image to make bigger in a new browser tab)


Download larger image from here.

- Magnetron1.1
Milkman00
DD-WRT User


Joined: 04 Jul 2007
Posts: 60

PostPosted: Thu Jun 20, 2013 18:45    Post subject: Reply with quote
Well I was lead here when my RT-N16 was bricked and couldn't be recovered. I am a little confused. I just bought this on eBay, but it doesn't look like this can be used to JTAG a router (this is my first time having to JTAG):

http://www.ebay.com/itm/261037239122

Will that not work to perform a JTAG??? Am I going to have to get one of these??

http://www.diygadget.com/universal-jtag-adapter-v2-wiggler-and-xilinx-platform-cable-compatible-debrick-routers-modems-and-more.html
redhawk0
DD-WRT Guru


Joined: 04 Jan 2007
Posts: 11564
Location: Wherever the wind blows- North America

PostPosted: Fri Jun 21, 2013 1:18    Post subject: Reply with quote
your link to Ebay is for a Serial setup...not JTAG...get the one from diy.

redhawk

_________________
The only stupid question....is the unasked one.
Milkman00
DD-WRT User


Joined: 04 Jul 2007
Posts: 60

PostPosted: Sat Jun 22, 2013 20:44    Post subject: Reply with quote
Thanks. What would a serial setup accomplish for this router, since I do see TX and RX pins on the main board?
Milkman00
DD-WRT User


Joined: 04 Jul 2007
Posts: 60

PostPosted: Wed Jun 26, 2013 3:07    Post subject: Reply with quote
Milkman00 wrote:
Thanks. What would a serial setup accomplish for this router, since I do see TX and RX pins on the main board?


bump??
mstombs
DD-WRT User


Joined: 31 Oct 2007
Posts: 151

PostPosted: Mon Jul 01, 2013 21:14    Post subject: Reply with quote
My Asus routers have serial pin header factory fitted. I assumed they all would and they use them for factory test before shipping?
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    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