Skip to content
This repository has been archived by the owner. It is now read-only.
TJTAG JTAG flash programmer for WRT54G and related routers with Raspberry Pi support
C Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit based on tjtag 3-0-1RT Nov 10, 2013
Makefile Added Raspberry Pi support Nov 10, 2013
guide.pdf Added Raspberry Pi support Nov 10, 2013
spi.h Initial commit based on tjtag 3-0-1RT Nov 10, 2013
tjtag.c Replaced /freq command line option with /delay Dec 12, 2013
wiring.jpg Updated the wiring diagram to match new pin assign Dec 15, 2013

tjtag-pi is a fork of tjtag with support for Raspberry Pi which eliminates the need for a PC with parallel port. See acidice333's fork for running on RPi 3.


Be warned that incorrect usage can lead to a point of no return situation. Before you do anything besides what is described here, please do research on how to use this tool. A good starting point is the excellent and cautionary guide.pdf written by the HairyDairyMaid, the original author. Always backup before flashing.


  • A Raspberry Pi (I've only tested model B as of late 2013)
  • Dual female jumper wires to connect GPIO pins to WRT
  • Pins soldered on the JTAG header on WRT
  • Beverege to enjoy afterward


  1. Hook up the two boards as per the diagram in wiring.jpg

  2. Power up your WRT

  3. Checkout the code, compile and run it

    $ cd ~
    $ git clone
    $ cd tjtag-pi
    $ make pi
    $ ./tjtag -probeonly

    If it gets stuck, try using /noemw option.

If at this point, your SoC and flash is recognized, you're all set. Enjoy your beverage and look for an appropriate guide that explains how to use tjtag to revive/upgrade your router's firmware.


  • If you have issues with reliability of your connection, you can slow down the speed of tjtag by using /delay:N command line option. N is the amount of time to delay flipping the clock signal. The higher the value, the slower the transfer rate.
  • Due to bit-banging nature of the operation of tjtag, various things affect the transfer speed. The one with most degrading effect is the progress output. Therefore it is recommended to use /silent command line option and redirect outputs to /dev/null (ie using &> /dev/null), after having made sure everything works OK.
You can’t perform that action at this time.