IT WORKS!
it turned out my CFE is (somehow) corrupt because of doing power cycle too early.
I used Raspberry Pi and OpenOCD (BIG thanks to mstombs who point me to that direction!). OpenOCD even comes with script to restore firmware on Asus RT-N16 and RT-N66U, made the whole process easier!
I thought I'd share the process for future reader:
What I did before this happens:
- With asus firmware restoration utility, flashed Tomato
- Didn't give enough time after "flashing" finished (for it to build nvram etc.), I unplug the power (power cycle).
- then symptoms below happen
Symptoms:
- No power light at all
- Upon power up, all LAN lights up, then the connected ones stays on
- can't ping (host unreachable)
- Serial console gives nothing (from linux: "screen /dev/ttyUSB0 115200")
Raspberry Pi JTAG setup:
RPi pin header reference
Code:
RPi Pin Header -- JTAG Pin
20 -- GND
19 -- TDI
21 -- TDO
22 -- TMS
23 -- TCK
18 -- SRST --> this one I forgot to plug in but it turned out just fine LOL
I use 100 Ohm resistor for all except GND.
Installing OpenOCD on Raspberry Pi (this one for v0.9)
Reference
Code:
sudo apt-get update
sudo apt-get install -y git autoconf libtool libftdi-dev libusb-1.0-0-dev
mkdir -p ~/src; cd ~/src
git clone --recursive git://git.code.sf.net/p/openocd/code openocd-git
cd openocd-git
./bootstrap && \
./configure --enable-sysfsgpio \
--enable-maintainer-mode \
--disable-werror \
--enable-ftdi \
--enable-ep93xx \
--enable-at91rm9200 \
--enable-usbprog \
--enable-presto_libftdi \
--enable-jlink \
--enable-vsllink \
--enable-rlink \
--enable-arm-jtag-ew \
--enable-dummy \
--enable-buspirate \
--enable-ulink \
--enable-usb_blaster_libftdi \
--prefix=/usr \
&&
make
The configuring part takes ca. 5 mins. and compiling takes definitely more than 30 minutes (I went to bed and left it overnight). Ignore the missing makeinfo error/warning. Not sure whether all these configurations are necessary, but I did it anyway. After compilation finished, do "sudo make install"
What I did with OpenOCD
- backup the CFE twice
Code:
cd /usr/share/openocd/scripts; sudo openocd -f interface/sysfsgpio-raspberrypi.cfg -f tools/firmware-recovery.tcl -c "board asus-rt-n16; dump_part CFE /path/to/your/home/cfe.0.bin; shutdown"
- compare the binaries (use "cmp -l cfe.0.bin cfe.1.bin", or md5sum). if they're not identical, something is wrong with JTAG setup
- download the working CFE
here
- erase nvram and flash working CFE (takes 30mins with 0.4KiB/s)
Code:
sudo openocd -f interface/sysfsgpio-raspberrypi.cfg -f tools/firmware-recovery.tcl -c "board asus-rt-n16; erase_part nvram; flash_part CFE /path/to/the/working/cfe.bin; shutdown"
- power cycle
- serial console is now working again, as well as TFTP server also the power light
this is awesome! I really appreciate the help guys!
by the way I didn't change the capacitor.