RT-N16 JTAG using Arduino Uno

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Sun May 17, 2020 3:10    Post subject: RT-N16 JTAG using Arduino Uno Reply with quote
Reference: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=69441

I followed the reference and bought an Arduino Uno which is available here in our country, because I have a previous issue with the shipment of the Universal JTAG from DIYGADGET as there is an issue shipping in our country.

I tried my luck, using the ported tjtag for Arduino and loaded the Arduino with the arduiggler.pde sketch. And also that the tjtag arduino is hardcoded to COM port 4, as I do not have an editor to edit the source code of tjtag arduino.

Code:
tjtag -probeonly /wiggler /noemw


Result:
Code:
==============================================
 EJTAG Debrick Utility v3.0.1 Tornado-MOD
==============================================

Puerto abierto \\.\COM4 115200
JTMOD: Opened port.
JTMOD: Resetting Arduino.
JTMOD: Ready.
Probing bus ... Done

Instruction Length set to 8

CPU Chip ID: 00010100011100010110000101111111 (1471617F)
*** Found a Broadcom BCM4716 Rev 1 CPU chip ***

    - EJTAG IMPCODE ....... : 10100000011110000001001111111011 (A07813FB)
    - EJTAG Version ....... : Unknown (5 is a reserved value)
    - EJTAG DMA Support ... : Yes
    - EJTAG Implementation flags: R4k ASID_8 ASID_6 MIPS64

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Skipped
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done

Probing Flash at (Flash Window: 0x1fc00000) ...
Done

*** Unknown or NO Flash Chip Detected ***

 *** REQUESTED OPERATION IS COMPLETE ***

JTMOD: Cleaning up.
JTMOD: Done.


It detected the CPU but it did not detected the flash chip.

Hope someone can help me on this one.
Sponsor
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Sun May 17, 2020 3:21    Post subject: Reply with quote
Code:
tjtag -probeonly /wiggler /noemw /FC:18

==============================================
 EJTAG Debrick Utility v3.0.1 Tornado-MOD
==============================================

Puerto abierto \\.\COM4 115200
JTMOD: Opened port.
JTMOD: Resetting Arduino.
JTMOD: Ready.
Probing bus ... Done

Instruction Length set to 8

CPU Chip ID: 00010100011100010110000101111111 (1471617F)
*** Found a Broadcom BCM4716 Rev 1 CPU chip ***

    - EJTAG IMPCODE ....... : 00010110000000000011000000000000 (16003000)
    - EJTAG Version ....... : 1 or 2.0
    - EJTAG DMA Support ... : Yes
    - EJTAG Implementation flags: R3k MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Skipped
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done

Manual Flash Selection ... Done

Flash Vendor ID: 00000000000000000000000011101100 (000000EC)
Flash Device ID: 00000000000000000010001010100000 (000022A0)
*** Manually Selected a K8D3216UTC  2Mx16 TopB     (4MB) Flash Chip ***

    - Flash Chip Window Start .... : 1fc00000
    - Flash Chip Window Length ... : 00400000
    - Selected Area Start ........ : 00000000
    - Selected Area Length ....... : 00000000



 *** REQUESTED OPERATION IS COMPLETE ***

JTMOD: Cleaning up.
JTMOD: Done.


Used the /FC:18 to detect flash chip.

Reference: https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=320732#320732

EDIT:
Well, I think I am wrong on the /FC because the RT-N16 has a 32MB flash chip and not the 4MB one.

Reference: https://wiki.dd-wrt.com/wiki/index.php/Asus_RT-N16
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Sun May 17, 2020 7:30    Post subject: Reply with quote
STORY:

1) I was about to upgrade the dd-wrt of my Asus RT-N16 when it suddenly did no longer boot-up
2) It has been more than a year since my Asus RT-N16 no longer works, only the light for the power is lit at all times when I tried to power it on
3) Already tried 30/30/30, push the WPS to activate the recovery mode, ping the Asus RT-N16, access the Asus RT-N16 via browser to back-up cfe, TFTP... and nothing works
4) TUMPA or Universal JTAG adapter from DIYGADGET, no but no thanks... they already told me that they have issues on shipping in our country, but they did refunded my purchase in that case...
5) I recently bought an Arduino Uno because I found a thread/topic indicating that Arduino works and a TJTAG port for Arduino is made available (in EXE for Windows)
6) My problem now is it reads the CPU of the Asus RT-N16 through the Arduino Uno but it does not recognize the Flash Chip, so there is no way to recover the cfe nor flash a dd-wrt firmware on my Asus RT-N16
7) Hopefully someone can help me to fix my Asus RT-N16 so we could also share the information to others that also needs a fix like this
8) If the TJTAG for Arduino needs updating, we could share it here, also an EXE for Windows port of the TJTAG for Arduino is a plus...
kernel-panic69
DD-WRT Guru


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

PostPosted: Sun May 17, 2020 11:43    Post subject: Reply with quote
I am sure you are familiar with this document and it's contents already:
https://wiki.dd-wrt.com/wiki/index.php/Asus_RT-N16

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Mon May 18, 2020 4:08    Post subject: Reply with quote
kernel-panic69 wrote:
I am sure you are familiar with this document and it's contents already:
https://wiki.dd-wrt.com/wiki/index.php/Asus_RT-N16


Well, as per my story:
1) I can no longer access the GUI of my Asus RT-N16
2) I have followed the procedures in recovering my Asus RT-N16 over a year ago from the wiki even before posting my recovery using Arduino Uno
3) I already tried the 30/30/30 reset procedures over a year ago and nothing works
4) I already tried pressing the red WPS button and it did not load the recovery page
5) My Asus RT-N16 is no longer pingable, even if I ping using any IP address I known for my Asus RT-N16
6) The backup cfe page is no longer working, as I can no longer ping my Asus RT-N16 and its IP address is no longer known

The thing that I could ask is how can I proceed with the recovery of my Asus RT-N16 despite its non-detection of the Flash Chip.
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon May 18, 2020 10:02    Post subject: Reply with quote
Is there no way to connect a serial USB-TTL UART adapter to attempt serial recovery? (Rhetorical Question)

https://wiki.dd-wrt.com/wiki/index.php/Serial_Recovery

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=876210

https://openwrt.org/toh/asus/rt-n16

https://www.snbforums.com/threads/solved-asus-rt-n16-bricked-because-unplug-during-flashing.26563/

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Mon May 18, 2020 10:32    Post subject: Reply with quote
kernel-panic69 wrote:
Is there no way to connect a serial USB-TTL UART adapter to attempt serial recovery? (Rhetorical Question)

https://wiki.dd-wrt.com/wiki/index.php/Serial_Recovery

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=876210

https://openwrt.org/toh/asus/rt-n16

https://www.snbforums.com/threads/solved-asus-rt-n16-bricked-because-unplug-during-flashing.26563/


With the USB-TTL UART adapter, there is no available USB-TTL UART adapter locally here in our country and shipping from other countries is blocked due to COVID-19 pandemic, prioritized shipments are medical supplies and essentials, also it will take a few months, if ordering is possible, and I have a very limited money to buy items online.

Using serial instructions by using Putty does not output anything, its all blank, I followed the baud rate and other required settings for Putty session, including the COM port 4 because tjtag is hard coded in using COM port 4.

I already tried 30-30-30 several times but it does not work. Also the Asus firmware restoration tool does not work as my Asus RT-N16 is not pingable at all.

The solved Asus RT-N16 topic/thread provided pertains to using Raspberry Pi whereas I only have an Arduino, because the Raspberry Pi is too expensive here in our country as expensive as the Universal JTAG or TUMPA of DIYGADGET including shipping fee.

Is there any updated JTAG software that supports the Asus RT-N16? Because the TJTAG of Tornado is no longer updated and it seems that Tornado is no longer active. Hopefully someone can come up with a better and updated JTAG software and also the JTAG software supports the Arduino as a JTAG cable/wiggler.

I only need an updated JTAG software to solve my problem in my Asus RT-N16.
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon May 18, 2020 11:22    Post subject: Reply with quote
If you didn't drop your Uno to 3.3v shifting, you didn't help yourself, you will not get any output from serial, and you will burn up the board.

https://forum.arduino.cc/index.php?topic=138832.0

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Mon May 18, 2020 14:34    Post subject: Reply with quote
kernel-panic69 wrote:
If you didn't drop your Uno to 3.3v shifting, you didn't help yourself, you will not get any output from serial, and you will burn up the board.

https://forum.arduino.cc/index.php?topic=138832.0


Based on the Asus RT-N16 wiki the jtag port did not require 3.3v nor 5v. And as you can see on the output of the TJTAG JTMOD on my first and second post the Arduino Uno has read my Asus RT-N16's CPU Chip. I used the included jtag sketch for arduino, also followed the wiring guide on wiki and JTMOD.
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon May 18, 2020 16:48    Post subject: Reply with quote
Hopefully someone will give you the information you require. I tried to give you a viable option of doing a serial recovery (which is a different header on the board altogether).
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
wosk
DD-WRT Novice


Joined: 01 Sep 2012
Posts: 13

PostPosted: Tue May 19, 2020 20:29    Post subject: Reply with quote
emjhay, I had too much issues with tjtag. I suggest you using OpenOCD for flashing CFE. My experience is here https://4pda.ru/forum/index.php?showtopic=648370&st=20#entry58968841. Use google translate.
I suppose you already downloaded CFE for RT-N16.
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Wed May 20, 2020 13:31    Post subject: Reply with quote
wosk wrote:
emjhay, I had too much issues with tjtag. I suggest you using OpenOCD for flashing CFE. My experience is here https://4pda.ru/forum/index.php?showtopic=648370&st=20#entry58968841. Use google translate.
I suppose you already downloaded CFE for RT-N16.


Well, sad to say I have not backed-up the cfe of my Asus RT-N16 because I just recently bought an Arduino Uno board for the recovery purposes. But I will look in to your experience.
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Wed May 20, 2020 13:53    Post subject: Reply with quote
emjhay wrote:
wosk wrote:
emjhay, I had too much issues with tjtag. I suggest you using OpenOCD for flashing CFE. My experience is here https://4pda.ru/forum/index.php?showtopic=648370&st=20#entry58968841. Use google translate.
I suppose you already downloaded CFE for RT-N16.


Well, sad to say I have not backed-up the cfe of my Asus RT-N16 because I just recently bought an Arduino Uno board for the recovery purposes. But I will look in to your experience.


Hi wosk, I have read your experience, however you have used a wiggler cable probably an LPT (parallel port) which currently I no longer have a desktop computer that has an LPT port. I now currently have an Arduino Uno which is easily available here in our country and your attached downloads is no longer available to be downloaded.

Hope an updated TJTAG for Arduino will be released and supports my Asus RT-N16.
emjhay
DD-WRT Novice


Joined: 03 Jul 2017
Posts: 16

PostPosted: Fri May 22, 2020 1:05    Post subject: Reply with quote
I have some things that I can think of are:
1) Can I recompile jtrimble's TJTAG JTMOD for Arduino that includes the chip code of the Asus RT-N16 flash chip? So that the TJTAG JTMOD for Arduino can recognize my Asus RT-N16
2) Do anyone has any idea if there are other JTAG softwares that supports Arduino and supports the Asus RT-N16?

What do you think?
TarrenceRobertson
DD-WRT Novice


Joined: 02 Sep 2020
Posts: 2

PostPosted: Fri Sep 04, 2020 11:50    Post subject: Reply with quote
emjhay wrote:
kernel-panic69 wrote:
Is there no way to connect a serial USB-TTL UART adapter to attempt serial recovery? (Rhetorical Question)

https://wiki.dd-wrt.com/wiki/index.php/Serial_Recovery

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=876210

https://openwrt.org/toh/asus/rt-n16

https://www.snbforums.com/threads/solved-asus-rt-n16-bricked-because-unplug-during-flashing.26563/


With the USB-TTL UART adapter, there is no available USB-TTL UART adapter locally here in our country and shipping from other countries is blocked due to COVID-19 pandemic, prioritized shipments are medical supplies and essentials, listenclear reviews also it will take a few months, if ordering is possible, and I have a very limited money to buy items online.

Using serial instructions by using Putty does not output anything, its all blank, I followed the baud rate and other required settings for Putty session, including the COM port 4 because tjtag is hard coded in using COM port 4.

I already tried 30-30-30 several times but it does not work. Also the Asus firmware restoration tool does not work as my Asus RT-N16 is not pingable at all.

The solved Asus RT-N16 topic/thread provided pertains to using Raspberry Pi whereas I only have an Arduino, because the Raspberry Pi is too expensive here in our country as expensive as the Universal JTAG or TUMPA of DIYGADGET including shipping fee.

Is there any updated JTAG software that supports the Asus RT-N16? Because the TJTAG of Tornado is no longer updated and it seems that Tornado is no longer active. Hopefully someone can come up with a better and updated JTAG software and also the JTAG software supports the Arduino as a JTAG cable/wiggler.

I only need an updated JTAG software to solve my problem in my Asus RT-N16.


Using serial instructions by using Putty - tell me please, where to find this instruction?
Display posts from previous:    Page 1 of 1
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