TP Archer D50, bootloader issues (please add debrick to wiki)

TP Archer D50, Bootload failed

I tryed to install OpwnWRT via WebUI -> Failed
next i tryed it over TFTP (with switch between) -> also failed
Then I opend the housing and solder serial cabeles to J16
During startup i saw the log messages inside Putty. I also able to interrupt the boot process and got the bootloader prompt.
Now i try to set the router IP via "setenv ipaddr 192.168.1.1", this leads to an Error.
Overview

Model: Archer D50 Ver. 1.0

<<<<<<<<<< Putty output >>>>>>>>>>

CFE version 1.0.38-114.185 for BCM96318 (32bit,SP,BE)
Build Date: Wed Nov 27 11:48:06 HKT 2013 (root@localhost.localdomain)
Copyright (C) 2000-2011 Broadcom Corporation.

HS Serial flash device: name ID_W25X16, id 0xef15 size 2048KB
Total Flash size: 2048K with 512 sectors
Flash not used for Auxillary File System
Chip ID: BCM6318B0, MIPS: 333MHz, SDRAM: 166MHz, Bus: 167MHz
Main Thread: TP0
Total Memory: 16777216 bytes (16MB)
Boot Address: 0xb8000000

Board IP address : 192.168.1.2:ffffff00
Host IP address : 192.168.1.100
Gateway IP address :
Run from flash/host (f/h) : f
Default host run file name : vmlinux
Default host flash file name : bcm963xx_fs_kernel
Boot delay (0-9 seconds) : 1
Board Id (0-4) : 96318REF
Number of MAC Addresses (1-32) : 11
Base MAC Address : 02:10:18:01:00:01
PSI Size (1-64) KBytes : 24
Enable Backup PSI [0|1] : 0
System Log Size (0-256) KBytes : 0
Auxillary File System Size Percent: 0
Main Thread Number [0|1] : 0

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 1
web info: Waiting for connection on socket 0.
CFE>
CFE>
Port 0 link UP

Port 0 link DOWN

Port 0 link UP

CFE> setenv ipaddr 192.168.1.1
Invalid command: "setenv"
Available commands: phy, sm, dm, w, e, r, p, c, f, i, a, b, reset, force, help

*** command status = -1
CFE>

<<<<<<<<<<<< END >>>>>>>>>>

Is CFE the bootloader promt?

The setenv command is not listet as availibel command

Where is my failure? Can you provide a working solution?

Thanks

Look at the other serial header. You are connecting to unsupported DSL part.

1 Like

Good catch !

Thanks for your fast feedback. Now the first step works.

setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.100
tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d50-v1-squashfs-sysupgrade.bin

Output: Bytes transferred = 6422843 (62013b hex)

erase 0x9f020000 +$filesize
cp.b 0x81000000 0x9f020000 $filesize
reset

Question: Can I replace $filesize with 62013b ,should I use the decimal value?
Is 0x as prefix necessary?

Thanks

Better use hex, you dont know what config was used to build that vendor uboot
edit: as exemplified by bcm uboot

How can I see if the erase Command end sucessfuly?

Wait for it, typically 64kB blocks in 1/10-1/2 sec
Ie under minute in your case. While case is open check chip temperature and let it chill a bit if unpleasantly hot.

The prompt appear 2 sec after start the command, so I assume the command fails. Is it correct?

I use the following commands

erase 0x9f020000 + 0x62013b
cp.b 0x81000000 0x9f020000 0x62013b

Thanks

Depends on flash speed. Can be also 1s

Here the feedback from the erase command.

ath> erase 0x9f020000 + 0x614ec5
Usage:
erase - erase FLASH memory

The feedback appears imidently.

I am not sure if it erased the memory.

Can you give me a hint how to check if the command works, or whats my failure.

Thanks

Showing usage means nothing got erased. 2nd argument should be aligned with 4k (most likely)64k 128k flash blocks.

Thanks to the forum, now it works.

My small tutorial.

  • Connect the UART cabel to J2 (antennas up, right side)
  • Connect wires to UART/USB converter
    . TX
    . RX
    . GND
    O VCC
  • Cross TX und RX lines
  • Download openwrt-23.05.0-ath79-generic-tplink_archer-d50-v1-squashfs-sysupgrade.bin
  • Rename the file to openwrt-ath79-generic-tplink_archer-d50-v1-squashfs-sysupgrade.bin
  • Disable Windows Firewall
  • Set IP of the netinterface to 192.168.1.100
  • connect router to PC
  • Start Putty, check COM Port, speed 115200Baud
  • Start TFTP64 as Administrator << !! Importent !!
  • Set download path to file position

Power on the router, you will see may running command lines. Continus toggel a butten on your keyboard.
After some secounds you see the ath> prompt.
Add the following commands.

<<<<<<<<<<<<<<<<<<<<<<<<<
setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.100

tftpboot 81000000 openwrt-ath79-generic-tplink_archer-d50-v1-squashfs-sysupgrade.bin
Output: Bytes transferred = 6422843 (62013b hex)
erase 9f020000 +62013b
Output: Erased 99 sectors
cp.b 0x81000000 0x9f020000 62013b
reset
Needs around two minutes
<<<<<<<<<<<<<<<<<<<<<<<<<<

Adjust the bold marked values.

Do not forget to activate the firewall.

Regards

Nice, check wiki edit before closing.