[Gelöst] Trying to debrick from Fritzbox and freetz a tp link wr1043nd router

Melchior

Neuer User
Mitglied seit
14 Okt 2011
Beiträge
40
Punkte für Reaktionen
0
Punkte
0
I am trying to use my Fritzbox 7340 to debrick a TP-LINK WR1043ND router.

Like this: http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd#oem.installation.using.the.tftp.and.rs232.method

I have connected a usb - ttl adapter to the 3 pins of the wr1043nd router board.

I connected this to the usb port of the fritzbox.

With make menuconfig in freetz trunk build environment I have chosen 'dnsmasq', 'Screen', 'Minicom' and in the drivers section: pl2303 and usbserial. (also ser2net and wget).

On usb stick with ntfs I put code.bin, the firmware for the tp link router and connect this to other usb port on fritzbox.

In Freetz menu, in dnsmasq settings I put port 0 in DNS to tell dnsmasq not to use DNS (and also to get rid of the error of port 53 already in use)

I enable tftp and point the tftproot to the root of the usb stick with code.bin so /var/media/ftp/uStor01

Now with both Screen and Minicom I can connect to router.

When I use Screen I type:

Screen /dev/ttyUSB0 115200

Now when I power up the tp link router the expected lines appear and also a 1 second window in which I can type 'tpl' to get to the prompt.

With 'setenv ipaddr 192.168.x.y' I set the ip address of the router to fit on the subnet of the fritzbox

With 'setenv serverip 192.168.x.z' I set the ip address of the tftp server to the tftp server running on the fritzbox.

Earlier I erased the firmware like in the manual.

Now I try to flash the router with code.bin firmware:

tftpboot 0x81000000 code.bin

I get this result:

root@fritz:/var/mod/root# screen /dev/ttyUSB0 115200
TFTP from server 192.168.x.y; our IP address is 192.168.x.z
Filename 'code.bin'.
Load address: 0x81000000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
Using eth0 device
TFTP from server 192.168.x.y; our IP address is 192.168.x.z
Filename 'code.bin'.
Load address: 0x81000000
Loading: T T T T T T T T T T

So it is trying all the time to reach the tftp server, but fails.

Also I am using this fritzbox in IP client mode, so I get the ip addresses of the external router that connects to the internet.

Earlier I have also tried to flash the router from Windows 7 with the help of putty connecting to serial interface and tftp64 as tftp server on the 192.168.0.5 address (manual ip address configuration on pc), but with different versions of this software I still fail, it just doesn't find the tftp server.

What could be the problem here?

Is it bricked beyond repair? The problem now seems to be a wrong configuration.
 
Zuletzt bearbeitet:
I don't see why this question should be Freetz related? Perhaps you can ask in a Windows forum because it failed with Windows 7 too? ;-)

I would suggest different steps to come closer to the problem.
1. Do you have connected your bricked device with a LAN cable (in the right port)?
2. Are you able to ping the device after settting its IP address?
3. Perhaps you can verify that your tftp is working correctly in some way? But from your log it looks alright.

Regards
Oliver
 
1. I have not connected the router with a LAN cable. I have connected the router with a serial - usb cable. serial to 3 pins on router mainboard and usb to usb port fritzbox.
2. Not applicable
3. the tftpd part of the freetz dnsmasq works! I have used tftpd64 (zip version 4.00) as a tftp client from my windows 7 laptop. I filled in the fritzbox ip and code.bin as local file as well as remote file and pressed GET. I received this file and the size is correct.

You can not derive from the log that the tftp server is working from within Screen, because if I dont employ a tftp server or if I dont (forget) change the environment variables ipaddr and serverip I get the same output. So the only way I can prove I can communicate with the freetz tftp server is when I don;t see the T T T T T T :). but flash the code.bin instead.
 
How should the TFTP server transmit the packages to your bricked box? Via serial line?
 
yes, with the help of:

http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=350568364250&ssPageName=ADME:L:OC:NL:3160

USB To RS232 TTL PL2303HX Auto Converter Module Converter Adapter 5V 3.3V Output

I did, however, previously, also use the voltage output on this adapter by connecting vcc on adapter to vcc on router mainboard. Subsequently I tried to use 3,3V on adapter instead of vcc to connect to vcc on router mainboard.

But later on, I wised up, learning that power is only needed when I can't use router's external power.

But maybe, as is suggested by the name of the product as stated above, vcc is 5 V and I have fried some part of the router mainboard? The adapter did get a bit hot.

But, as I can use Screen to connect to the router it seems to be allright still. Also when I erased the firmware, this also worked. Of course no data is transmitted to and fro in this case.
 
While this is really not related to Freetz in any way, of course you have to connect with a network cable.
You serial connection works perfectly fine, but it is used just to control the TP-LINK router. The actual transfer of the new firmware is done over TFTP over Ethernet, and you have to connect the network cable to do this. So it is no surprise that all your previous attempts without a network connection failed.
 
While this is really not related to Freetz in any way, of course you have to connect with a network cable.
You serial connection works perfectly fine, but it is used just to control the TP-LINK router. The actual transfer of the new firmware is done over TFTP over Ethernet, and you have to connect the network cable to do this. So it is no surprise that all your previous attempts without a network connection failed.

Ok, so I am deeply ashamed now....

I connected the ethernet cable first to fritzbox but that didnt work (for some reason no ip is given on lan port 1 and for ip client I use port 2 because it doesnt work with port 1)

I connected the ethernet cable to internet router and immediately I saw lots of dashes appear and the firmware was transmitted.

Then a copy to the flash and a bootm to boot the router.

I could connect to the router wireless now and it seems to be fine. Same after disconnecting power and connecting again.

Of course the mentioning of the ip addresses and eth0 in the procedure should have been sufficient to know to use a lan cable...

Maybe it would have been more friendly if they had written in the manual to use a lan cable.

It is not really freetz related. However, I did use dnsmasq and screen, which are part of Freetz. But, if I had used a lan cable in the first place, my attempts on windows 7 would probably have been more successfull and I wouldn't have needed to abuse my fritzbox for this purpose. Still it is nice to find out about the versatility of the possibilities of the fritzbox in this way.
 
Zuletzt bearbeitet:
I'm glad that it worked for you, and yes, it's nice to know that it is possible to use Freetz for such things.

They probably didn't mention the cable because they thought is was clear.
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.