OpenWrt Forum Archive

Topic: WTR54G (v2.2) ... JTAG PinOut ?

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

I've got a WTR54G v2.2 (WT54GV22).

I soldired the JTAG Pins, build a JTAG Cable but the jtag prgramms tells me:

  CHIP ID: 11111111111111111111111111111111 (FFFFFFFF)

and when reversing the plug:

CHIP ID: 00000000000000000000000000000000 (00000000)

I belive that my cable is okay ... I checked all the pins several times for correct connectivity.

Hmmm...

Anybody knows if the WRT54G v2.2 has a different JTAG-Pin-Layout?

Thanx
Kianusch

Try the following settings for the .ini file if you are using the Windows XP version of the software with the cable built based on hairydairymaid's instructions.

TDI = 0;
TCK = 1;
TMS = 2;
TDO = 4;

You shouldn't have to make changes if you are using the Linux version that comes with the cable instructions.

I am using the linux version.  sad

Maybe I'm using the wrong Parallel port cable?

Mine has pins on both ends.  My JTAG-Cable has plugs ... so still e.g. pin-2 on the jtag ends up  on pin-2 on the computer side...

I am using the linux version.  sad

Maybe I'm using the wrong Parallel port cable?

Mine has pins on both ends.  My JTAG-Cable has plugs ... so still e.g. pin-2 on the jtag ends up  on pin-2 on the computer side...

Some extention cables don't have all pins wired straight.  (I hope you are not using a corss-over cable...)  Check the continuity end-to-end with a voltage meter.

That's what I did ... all the way from JTAG-end to the Parallel Port Plug ... to the (assumed) 1:1 Cabel End - I do get my 100R on the four cables.

And if I understood (and soldired) everything right, the red colored ribbon cabel side is plugged towards the wrt54g jtag end marked 1 smile

when reversing the ribbon cable i do get a differen (inverted) ID - but still an unuseable one.

Should the JTAG Cable work no matter how bad my WRT is bricked?
Even if not - do I at least get a "recognized" ID?

Should the JTAG Cable work no matter how bad my WRT is bricked?
Even if not - do I at least get a "recognized" ID?

Yes.  You should get a valid chip ID as long as the flash chip is alive.  The contents of the chip doesn't matter at all.  You'll need a good copy of CFE if it is damaged, but you should still be able to communicate with the flash chip.

Have you checked your prallel port is working in Linux?

prallel port works fine with linux ... "Normaly" a printer is hoocked up to it ... yes I did stop all printing-daemons beforhand :-)

So maybe I did "crash" my flash-chip :-(

I could try building a serial cable - but are the tty's enabled by default?

My WRT54G still boots, and the power-light goes steady.  Also when starting with FailSafe - I do get my 3-flashes/secocnd DMZ-LED sequence ... but no ping or tftp on 192.168.1.1 sad

Kianusch

prallel port works fine with linux ... "Normaly" a printer is hoocked up to it ... yes I did stop all printing-daemons beforhand :-)

Did you also rmmod'ed lp and whatever else that might be using parport?

Edit: You can add some puts, etc. to wrt54g.c or run it on the debugger and verify if it successfully opened the parallel port with exclusive access.

So maybe I did "crash" my flash-chip :-(

I could try building a serial cable - but are the tty's enabled by default?

My WRT54G still boots, and the power-light goes steady.  Also when starting with FailSafe - I do get my 3-flashes/secocnd DMZ-LED sequence ... but no ping or tftp on 192.168.1.1 sad

It wouldn't make that far if the chip was really fried.  Also, the CFE is most likely still intact, so you would just need to erase nvram and linux partitions that can be done either by the serial console or JTAG.

Serial console (shell) is enabled out-of-the-box in the experimental builds (and very recent stable builds, too.)

It did take me some time to figure out that ppdev is needed.  (Documentation for Linux parallel-port is nearly zero when not related to printing smile

So right now folowing modules are loaded:

  parport_pc             
  ppdev
  parport

Anyway ... the communication has to be working, cause I'm getting different beheaviours when plugging in the jtag connector reversed.

Also when using w54g I get

  ppdev0: registered pardevice
  ppdev0: unregistered pardevice

in dmesg.

So I'll end up building a serial-connector.  This will we on saturday, since right now I'm 600km away from the disassabled router :-)

So it seems that I fried my router completely sad

Serial Connector doesn't return anything.  (Interface (MAX232) works - because I tried it on a different Box...)

yesterday i fixed my wrt54gs 1.0 with a selfmade jtag cable.

you can find a picture at www.openbsd-geek.de ..

The cable should not be longer than 15 cm. (to be sure)

Pins:
JTAG - Parallel
3    - 2
5    - 13
7    - 4
9    - 3
10   - 20 and 25 (ground)

Under ubuntu linux i needed to rmmod ppdev and lp and only
load parport and parport_pc. I needed to manually create /dev/parport0 (mknod /dev/parport0 c 99 0)

After that my router was recognized. (use root permissions)

If you need a CFE.BIN from wrt54g v2.2 , send me an email.

Same symptom, nothing on serial, only power led blinking.

Could someone please send me a working CFE.BIN file for WRT54G or point me where to find/download it.

braypp(at)gmail(dot)com

thanks!

The discussion might have continued from here.