Friday, September 27, 2013

Unbrick TL-WR1043ND router

I was trying to switch from DD-WRT firmware to OpenWrt and accidentally bricked my TL-WR1043ND router. The only way to fix it was by using serial console and load new firmware manually.

1. Open the case and connect to the serial port (in my case I was using Propeller Plug as part of the serial cable):


2. Once this is done, you will need to connect to any LAN port and connect the power supply.

3. Now setup TFTP server with an address 192.168.0.5 (configurable with setenv command, printenv first if unsure):
$ dnsmasq --enable-tftp --tftp-root=<FIRMWARE_BIN_DIR>
where FIRMWARE_BIN_DIR is a directory with firmware.

4. Connect to the router serial port:
$ screen /dev/<SERIAL_DEVICE> 115200,-parenb,-cstopb,cs8
where SERIAL_DEVICE is your serial device, e.g. /dev/ttyUSB0. If everything was connected properly, you will see something like this:
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7114
eth0 up
eth0
Autobooting in 1 seconds
5. Type and hit enter the following command to get into command prompt during this 1 second period:
tpl
6. Copy and load firmware:
> erase 0xbf020000 +<FIRMWARE_BIN_SIZE>
> tftpboot 0x81000000 <FIRMWARE_BIN_FILE>
> cp.b 0x81000000 0xbf020000 <FIRMWARE_BIN_SIZE>
> bootm 0xbf020000
where FIRMWARE_BIN_FILE (e.g. wr1043nv1.bin)  is the file name of the firmware from the FIRMWARE_BIN_DIR directory, and FIRMWARE_BIN_SIZE (e.g. 7c0000) is the size of this file.

7. Close the case.

UPDATE: TP-LINK firmware, OpenWrt firmware.

No comments:

Post a Comment