[Solved] I Bricked my DGN3500

i wanted downgrade SNAPSHOT to 17.01.4 via sysupgrade

i do this

root@OpenWrt:/tmp# sysupgrade -v /tmp/lede-17.01.4-lantiq-xway-DGN3500-squashfs-
sysupgrade-WW.bin
Device netgear,dgn3500 not supported by this image
Supported devices: DGN3500
Image check 'fwtool_check_image' failed.


root@OpenWrt:/tmp# mtd -r write /tmp/lede-17.01.4-lantiq-xway-DGN3500-squashfs-f
actory-WW.img firmware
Unlocking firmware ...

Writing from /tmp/lede-17.01.4-lantiq-xway-DGN3500-squashfs-factory-WW.img to firmware ...  [e]Failed to erase block

i have acces to the router via the serial port

ROM VER: 1.1.3
CFG 05


U-Boot 1.1.5-2.4 (Oct  4 2010 - 11:54:53)

**checkboard **
Boot from SPI
AR9 BOARD
CLOCK CPU 333M RAM 166M
DRAM:  64 MB
spi_init_f finsihed
         SFLASH_BAUDRATE = 30000000
         CONFIG_SPI_FLASH_SLOW_READ yes

 relocate_code start
 relocate_code finish.
Flash: 16 MB
  bi_flashstart=00000000
  bi_flashsize=01000000
  bi_flashoffset=00000000
spi_init_f finsihed
         SFLASH_BAUDRATE = 30000000
         CONFIG_SPI_FLASH_SLOW_READ yes
In:    serial
Out:   serial
Err:   serial
Net:
*** amazon_s_sw_chip_init

switch chip id=0000ffff
init 8366 rb
 -The DATA=0x0
The DATA=0x1C
The DATA=0xC961
The DATA=0x1140
smi_init = 0
initChip verid = 0x3
rtl8366rb_initChip= 0
The 0x0=0x830    0
The 0x509=0x5937    0
rtl8368s_setAsicMacForceLink = 0
rtl8366rb_setLedMode(2, null)=0
amazon_s Switch
board_init_r:
         PID=YP5723
         ethaddr=e0:46:9a:00:d0:1a
         serialnumber=219416BV0065B
         pin=11812425

Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot:  0
Copy from Serail Flash to RAM... done
## Starting application at 0x80200000 ...
setenv kernel_addr=0x50000
setenv kernel_addr=0x50000

PID=YP5723

Will check KFS integrality. read KFS first
EEPROM @0x0 read: addr 0x80500000  off 0x50000  count 16384000
..........................................................................................................................................................................................................................................................done
sercomm_trap: done
check_checksum start

image=0, image+1=0, image+2=0

image-2=4D, image-1=6D, image=45

PID_Offset=0x4557B2, checksum_in_file=0xEA50, checksum_calculat=0xEA50, checksum_data_string=EA50
## Application terminated, rc = 0x0
## Booting image at 00050000 ...
*** eeprom_read
*** eeprom_read
Bad Magic Number
AMAZON_S

i think i be able to recover it viaTFTP

setenv ipaddr 192.168.2.1
setenv serverip 192.168.2.2
setenv firmware_name lede-17.01.4-lantiq-xway-DGN3500-squashfs-factory-WW.img
saveenv
reset

the TFTP server is ready end able to upload , im not sure the firmware i need to upload end the comand line i need to write.

any suggestion ?

i found this for a tp-link , its ok for the DNG3500 ?
tftpboot 0x81000000 lede-17.01.4-lantiq-xway-DGN3500-squashfs-factory-WW.img
erase 0xbf020000 +0x7c0000
cp.b 0x81000000 0xbf020000 0x7c0000
bootm 0xbf020000

Unknown command 'erase' - try 'help'

any suggestion ?

Not sure if this helps:

root@LEDE-DGN3500:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00010000 00010000 "uboot"
mtd1: 00010000 00010000 "uboot-env"
mtd2: 00010000 00010000 "calibration"
mtd3: 00fa0000 00010000 "firmware"
mtd4: 0017d66c 00010000 "kernel"
mtd5: 00e22994 00010000 "rootfs"
mtd6: 00b90000 00010000 "rootfs_data"
root@LEDE-DGN3500:~#

dmesg ....

[    0.488031] 4 ofpart partitions found on MTD device spi0.4
[    0.493395] Creating 4 MTD partitions on "spi0.4":
[    0.498151] 0x000000000000-0x000000010000 : "uboot"
[    0.505932] 0x000000010000-0x000000020000 : "uboot-env"
[    0.512925] 0x000000020000-0x000000030000 : "calibration"
[    0.519932] 0x000000050000-0x000000ff0000 : "firmware"
[    0.562489] 2 uimage-fw partitions found on MTD device firmware
[    0.567015] 0x000000050000-0x0000001cd66c : "kernel"
[    0.574575] 0x0000001cd66c-0x000000ff0000 : "rootfs"

i solve my problem via the mini webserver , ca by lunched via the serial port

run - run commands in an environment variable
saveenv - save environment variables to persistent storage
sercommtrap - do sercomm trap utility
setenv - set environment variables
sleep - delay execution for some time
tftpboot- boot image via network using TFTP protocol
upgrade - forward/backward copy memory to pre-defined flash location
version - print monitor version
web - do sercomm web emergency revoery

end the downgrade its done :smiley: