DS-7732NI-I4(B) Update / reset via putty / tftp - stuck after interrupting boot process (RESOLVED)

jam_rs

n3wb
May 18, 2020
11
3
Essex
Hi all,

I have a DS-7732NI-I4(B) which I have no admin password for so trying to reload firmware via TFTP. I have done this before successfully on another HIK NVR, but struggling with this one!

On the last one, once the boot process was interrupted all I had to do was press 'U' to update, and tftp done the rest.

On this, i get the HKVS # prompt, having tried various commands (searched on here) to get the process running, i did get this far

HKVS $ setenv ipaddr 192.0.0.64
HKVS $ setenv serverip 192.0.0.128
HKVS $ setenv bootargs console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0x42000000
HKVS $ setenv bootcmd 'tftp 0xc0700000 uImage; tftp 0x42000000 digicap.dav; boot 0xc0700000
timeout for link [5000]!
MAC: 08-A1-89-0E-18-97
MAC: 08-A1-89-0E-18-97
TFTP from server 192.0.0.128; our IP address is 192.0.0.64
Download Filename 'digicap.dav'.
Download to address: 0x42000000
Downloading: #################################################
done
Bytes transferred = 53322144 (32da1a0 hex)
MAC: 08-A1-89-0E-18-97
undefined instruction
pc : [<41dfa190>] lr : [<43006574>]
sp : 4dafed78 ip : 4dafed54 fp : 00000000
r10: 00000000 r9 : 4dafeef9 r8 : 4dafffe0
r7 : 4dc4ad00 r6 : 4dc3cec3 r5 : 43010d44 r4 : 00000003
r3 : 00000000 r2 : 4dc39424 r1 : 00000002 r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ..

However didnt seem to work and i assume the undefined instruction means things went wrong!

Any help appreciated!

Thanks
James
 
However didnt seem to work and i assume the undefined instruction means things went wrong!
It looks like you're trying to execute the firmware file as opposed to letting the device load and run the kernel.
Best not to mess with the bootargs and bootcmd variables.
Are they still at their original values, ie no ''saveenv' issued?

Suggestion :
Check the values of the environment variables, and the apparent available commands with :

printenv
and
help

You may be oucky and it has an erasecfg command

Assuming serverip and ipaddr values match your tftp server there should be either / both

update
or
upf

which will transfer and apply the digicap.dav firmware.
 
It looks like you're trying to execute the firmware file as opposed to letting the device load and run the kernel.

tbh I’m winging it from another thread ive read, but thinking about it and reading the commands, yes.


Best not to mess with the bootargs and bootcmd variables.
Are they still at their original values, ie no ''saveenv' issued?


How would I check?

You may be oucky and it has an erasecfg command

Didn’t know this existed, but will try!


Assuming serverip and ipaddr values match your tftpserver there should be either / both

update
or
upf


I’m sure i tried update on its own but nothing. Didn’t try upf, will have to have a go tonight. Do these commands need anything else with them to make them function?

thanks for your help!:thumb:
 
Last edited:
OK, so interesting result here, but i have succeeded. I actually had two of these units and both done.

Unit 1 which i had been messing about with previously.
I had been searching for suggestions, ultimately tried this;

setenv bootargs console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x42000000 init=/bin/sh
setenv bootcmd 'tftp 0x42000000 uImage; update'


Which returned;
using update v3...

Mounting yaffs2 mount point/partnum: nand/0
Configures yaffs mount nand success!
Copy /nand/uImage to 0x42000000... [DONE]
the uImage support update_v3.
Verifying RSA ... OK
## Booting kernel from Legacy Image at 42000000 ...
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] need to Authorization
[ 2.637966] init(1) called reboot syscall, cmd: 0x0.
[ 6.592392] libphy: 1:07 - Link is Up - 1000/Full


As I wasn't getting any info ref updating returned, I assumed the worst. I even saw a failed TFTP transfer in the TFTP program....

I left it for a while and done something else. Then to my surprise i saw a 'Inactive' in SADP. Then it rebooted. It had done something! I plugged in HDMI and was greeted with set admin password etc. Done that. Turned it off and back on, checked all seems to be functioning, all OK via web GUI too.


Unit 2.

Went straight in with this command;
setenv bootcmd 'tftp 0x42000000 uImage; update'

I sat and watched this time. It returned same as above, then failed TFTP transfer, then after quite a while maybe a couple of minutes, TFTP transfer completed as expected. Then after quite a while again, it rebooted. All OK!


I'm sure at some point whilst trying on my first attempts it said using update v3...
Maybe if I had left it long enough, it would have completed the process.

Hope this info helps someone!

Notes; was on firmware V4.40.010build200826 updated to V4.61.025build 220905
 
Well done, you got there!

update_v3 operates in a quiet mode, no indication of what's happening. No indication of success or failure.

When it's done, successfully, the device sits in a 'press any key to reboot' mode that's not obvious. Or eventually times out and reboots, which is probably what happened in your case.
 
  • Like
Reactions: TonyR