OpenWrt Forum Archive

Topic: unbrick tp-link wr741nd..plz help!!!

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

Hello

I am trying to unbrick my tp-link wr741nd router..I got the serial connection working
I used SolarWinds TFTP program to have tftp server with ip 192.168.1.2
I connected the wan port of the router to my PC and run these commands

setenv serverip 192.168.1.2; setenv ipaddr 192.168.1.1
tftp 0x80800000 openwrt-ar71xx-tl-wr741nd-v1-squashfs-factory.bin

but I got that


Using eth0 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'openwrt-ar71xx-tl-wr741nd-v1-squashfs-factory.bin'.
Load address: 0x80800000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
eth1 link down


so what's wrong?!!! sad

The problem solved.. smile)

eng.hassan23 wrote:

The problem solved.. smile)

how?
have the same Problem

pappnase wrote:

how?
have the same Problem

If you plugged the routers WAN Interface like he did, use a LAN port instead, and it will work if your tftp server does.

No, no, no, Cable is plugged in an LAN-Port, Bootloader is configured per setenv ipaddr "Router-IP" & setenv serverip "PC-IP" (of course all Ip-Adresses are in the same Subnet).
But i can't ping the Router!?! And TFTP does not work.
Also i tried with changed IP-Adress for PC (192.168.1.100) without success to ping to 192.168.1.111 (no IP-Connection).
It would not be the first time, i do that.
So i'm baffled.

(sorry for my poor english)

(Last edited by pappnase on 16 Jul 2012, 14:23)

My Russian are much more bad (non-existent)! But, with this procedure and tftp32 on PC i tried, not the first time but the first time unsuccessful.
Is the Bootloader damaged? I have no Backup. :-(
Soldering out and external programming are no Problems for me.

Yes, and it works fine.
My Router Version is 4.2
my Sheet...
                                   +9V from Router (Cathode D5)
                                                               |
                                                              .-.
                                                              | |
                                                              | |2k2
                                                              '-'
                                                               |
                     Schottky-Diode (eg. BAT41)  |       to PC RX
                                          .----->|--------o-----------
                                          |                    |
                                          |                    |
                         ___            |                  |/
            ---------|___|--------o--------------|  BC547
    from Router TX    10k                          |>
                                                                |
                                                                |
                                                             ===
                     VCC   VCC                         GND
                      + 3v3 +
                      |        |
                      |        |
                      |       .-.
                      |       | |
                      |       | |10k
                      |       '-'
                      >|     |       ___                from PC TX
             BC557  |----o----|___|-------->|---------
                       /|     |     22k  Si-Diode (eg. 1N4148)
                      |       |
                      |       |
                      |       |
         ----------o-->|-'
     to Router RX       Schottky-Diode (eg. BAT41)

(Last edited by pappnase on 16 Jul 2012, 15:08)

pappnase that is a nice drawing.....but...
I think posting your serial output would be more helpful.

ldpinney wrote:

pappnase that is a nice drawing.....but...
I think posting your serial output would be more helpful.

U-Boot 1.1.4 (Mar 20 2012 - 13:58:29)

AP121 (ar9330) U-boot

DRAM:  32 MB
led turning on for 1s...
id read 0x100000ff
flash size 4194304, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
ag7240_phy_setup
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
ag7240_phy_setup
eth1 up
eth0, eth1
hornet> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtd
parts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NV
RAM),64k(ART)
bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0xba:0xbe:0xfa:0xce:0x07:0x41
ipaddr=192.168.1.111
serverip=192.168.1.100
stdin=serial
stdout=serial
stderr=serial
ethact=eth0

Environment size: 362/65532 bytes
hornet> setenv ipaddr 192.168.1.5
hornet> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtd
parts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NV
RAM),64k(ART)
bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0xba:0xbe:0xfa:0xce:0x07:0x41
serverip=192.168.1.100
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
ipaddr=192.168.1.5

Environment size: 360/65532 bytes
hornet>
If i want to ping the Router (192.168.1.111) from my PC (192.168.1.100) i get no answer!
And, yes, i also tried "setenv ipaddr " with another ip and then ping to them. No Answer.

This seems to be missing this at the end:
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

Booting AR9330(Hornet)...

Should follow :

ag7240_phy_setup
eth1 up
eth0, eth1

Does the boot end with this ?:
hornet>

Did you try 'bootm 0x9f020000' ?

does "ethact=eth0" means that you must use eth0? is eth0 the wan port? why are you changing ip to 1.5?

ldpinney wrote:

This seems to be missing this at the end:
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

Booting AR9330(Hornet)...

Should follow :

ag7240_phy_setup
eth1 up
eth0, eth1

Does the boot end with this ?:
hornet>

Did you try 'bootm 0x9f020000' ?

My Log (wihout "tpl")
U-Boot 1.1.4 (Mar 20 2012 - 13:58:29)

AP121 (ar9330) U-boot

DRAM:  32 MB
led turning on for 1s...
id read 0x100000ff
flash size 4194304, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
ag7240_phy_setup
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
ag7240_phy_setup
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

So, now the Router hangs. Nothing happens. Firmware does not boot.
Tryin 'bootm 0x9f020000' i get the same, nothing, Firmware does not boot.

nebbia88 wrote:

does "ethact=eth0" means that you must use eth0? is eth0 the wan port?

Normally LAN-Port, several Days before all was working. That's why i'm wonder.

nebbia88 wrote:

why are you changing ip to 1.5?

Only for testing, if i get access to my Router under new IP settled by 'setenv ...'.

I think, i need an fresh Bootloader. But, wherefrom? I have no Backup. :-(

OK ... so we don't have usable firmware on the flash and we don't have ethernet available for tftp.
Looks like the bootloader works fine....no need to replace it.
Can you post the WHOLE output ... everything you have posted so far indicates a working router.
You can try transferring new firmware over your serial connection...slow but it can work
http://wiki.openwrt.org/doc/howto/gener … ing.serial

(Last edited by ldpinney on 17 Jul 2012, 14:35)

I did a reflash over serial using kermit on a device like yours (but version 740, without removable antenna). It is really not that difficult.
After the file is uploaded to a memory region, you can flash as you would do with tftp.

luizluca wrote:

I did a reflash over serial using kermit on a device like yours (but version 740, without removable antenna). It is really not that difficult.
After the file is uploaded to a memory region, you can flash as you would do with tftp.

Thanks for this, i just flashed a wr-1043nd out of interest using a bus pirate as serial interface. Flashing a sysupgrade image instead of a full image really saves time in this case due to the reduced size wink

The Router is working again! I did a dump from SPI-Flash per 'SPIPGM' and then combined u-boot(first 128kByte from dump)+a new firmware+art(last 64kByte from dump) per Hex-Editor to an new full flash file an burned it back. cool
But the bootloader has the old behavior (no LAN, whatever i do, setting PC-IP to 192.168.1.100 or set Router-IP per 'setenv ipaddr <IP>', Kermit protocol is probably not implemented 'loadc --> unknown command').
So what, the rest works fine!

one more time my cheap RS-232-Adapter

                                   +9V from Router (Cathode D5)
                                             |
                                            .-.
                                            | |
                                            | |2k2
                                            '-'
                                             |
                 Schottky-Diode (e.g. BAT41) |       to PC RX
                                  .----->|---o-----------
                                  |          |
                                  |          |
                      ___         |        |/
            ---------|___|--------o--------|  BC547
    from Router TX    10k                  |>
                                             |
                                             |
                                            ===
                     VCC   VCC              GND
                      + 3v3 +
                      |     |
                      |     |
                      |    .-.
                      |    | |
                      |    | |10k
                      |    '-'
                       >|   |     ___                from PC TX
                 BC557  |---o----|___|-------->|---------
                       /|   |     22k  Si-Diode (eg. 1N4148)
                      |     |
                      |     |
                      |     |
            ----------o-->|-'
     to Router RX       Schottky-Diode (e.g. BAT41)

by the way: How i can add Support for SPI-Flash Chip "sst25vf064c"? Simply by add an new Entry in "m25p80.c" with correct values?

pappnase

(Last edited by pappnase on 25 Jul 2012, 09:48)

The discussion might have continued from here.