bricked DS-7216HGHI, firmware via uart

svaroha

n3wb
Dec 9, 2019
3
0
Ukraine
Hi. The problem is crooked hands. (I apologize in advance for my English)
I have a DS-7216HGHI DVR and i have a problem
I uploaded the firmware to the recorder via a browser, and after the restart the dvr went into a permanent reboot. I uploaded the wrong firmware.

What I’ve already tried: via a TFTP server (on Win7 and Win10, on different computers). The server starts, writes initialization and that’s it.
I took the server from this forum, tried TFTP32 from Github and also SolarWinds-TFTP. It didn't work.

I connected it both with a direct patch cord and via a switch.
I noticed from the ping that after the recorder starts, the ping 192.0.0.64 rises by 5-6 replies and then goes down.
Connected UART.
I tried the following commands using UART and cntrl+U
setenv bootcmd 'tftp 192.0.0.128 uImage; update 192.0.0.64; boot 192.0.0.64'
and
setenv bootargs console=ttyS0,115200 root=/dev/ram0 rw
initrd=0x82000000 init=/bin/sh
setenv bootcmd 'tftp 0x82000000 uImage; update'
and
setenv bootcmd 'tftp 0x82000000uImage; tftp 0x82000000digicap.dav; bootm 0x82000000'
and
HKVS $ setenv ipaddr 192.0.0.64
HKVS $ setenv serverip 192.0.0.128
HKVS $ setenv bootargs console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000 init=/bin/sh
HKVS $ setenv bootcmd 'tftp 0x82000000 uImage; update'

It doesn't work. The TFTP server downloads the file, reboots and always displays an error

Code:
HKVS $ setenv ';tftp'

timeout for link [4999]!

MAC:   68-6D-BC-DC-39-B8

TFTP from server 192.0.0.128; our IP address is 192.0.0.64

Download Filename 'uImage'.

Download to address: 0x80008000

Downloading: #  [ Connected ]

################################        [ 1.000 MB]

...............

################################        [15.000 MB]

######

done

Bytes transferred = 15946092 (f3516c hex)



waiting for net_link [10]...

waiting for net_link [9]...

[    5.036235] hi_gmac_v200 100a0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off

ftp server not exit[-113]!

state machine action error[-110]

download firmware error!

Press ENTER key to reboot

properties DVR
HKVS $ setenv ';version'

U-Boot 2010.06-svn25167 (Sep 20 2018 - 15:08:20)

Code:
HKVS $ setenv ';printenv'

bootcmd=tftp 0x82000000 $(bootfile);bootm 0x82000000;

bootdelay=1

baudrate=115200

use_mdio=0

bootfile=uImage

ver=U-Boot 2010.06-svn25167 (Sep 20 2018 - 15:08:20)

passwd=HNc4dIhNtqD58h2FPX6erNx3PDnuOJBg9elq4Ly0dzo=

device_type=DS-7216HGHI-K1

identification=0000000100000001000002000000005B00000008000000020001

update_ip=192.168.0.110

filesize=F0C16C

fileaddr=80008000

gatewayip=192.0.0.1

netmask=255.255.255.0

serverip=192.0.0.128

ipaddr=192.0.0.64

stdin=serial

stdout=serial

stderr=serial

phyaddr0=1

mdio_intf=mii

ethaddr=68:6d:bc:dc:39:b8

sec=tftp 0x82000000 Ky2017-2-uImage_sec;bootm 0x82000000;

default=cramfsload 0x82000000 uImage;

verify=n

tftpblocksize=8192

bootargs=mem=256M console=ttyS0,115200

There are still ways to put the firmware into the DVR?
 
Last edited:
I don't understand then. According to the logs it says that the file was downloaded via tftp, but after reboot it says "ftp server not exit"
I even tried to load it
loady
go 0x82000000
Verifying RSA...failed
I'm absolutely sure that I'm loading the correct firmware. It seems that the file is loading, then the device reboots and the device cannot find the loaded file.