need help to re-write flash memory for DS-2CD2T42WD

yasser

Young grasshopper
Joined
Apr 17, 2016
Messages
39
Reaction score
2
I have 5 DS-2CD2T42WD ip-cameras that need to re-write to flash memory to re-life it.
when re-write to nand flash it worked but whith two MAC adress, one for camera which need to maintenance and the ather is for the camera that i tack the bin file from it.

i want to ask hwo i can fix this problem?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
when re-write to nand flash it worked but whith two MAC adress
I don't fully understand.
Are you saying that when you wrote to flash a full .bin file from one camera into another, the destination camera now appears twice in SADP?
I don't believe the MAC address for an R6 camera is held in the flash memory, but in a separate security chip, but there may be a value stored in part of a configuration file in flash memory.

Suggestion - reset the camera to factory defaults and see if that changes anything.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
after reset the camera
OK, so no cached MAC address held in the user configuration.

Suggestion #2 :

Access the camera serial console and use the command
printenv
to see the value held in the bootloader environment variables for 'ethaddr'.
If this matches the MAC address from the donor camera, change it to match what the MAC address for the destination camera should be.
For example
setenv ethaddr aa:bb:cc:dd:ee:ff

Maybe the value stored in the security chip, and the value in the environment variable should be the same, and if different, SADP sees the 2 values due to the way it operates.

But I am guessing a bit here ...
 

yasser

Young grasshopper
Joined
Apr 17, 2016
Messages
39
Reaction score
2
I can not connect to camera using serial console and the TFTP can not connect to it.

I do not know the reason
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
You must interrupt the bootloader, not allow it to fully boot up.
printenv setenv and saveenv are all bootloader commands, not shell commands.
 

yasser

Young grasshopper
Joined
Apr 17, 2016
Messages
39
Reaction score
2
I'm sorry but I do not know how? Can you explain the way step by step?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
The bootloader would normally show something like 'hit any key to interrupt' or 'use Control-C to interrupt'. This varies with the specific bootloader.
 

yasser

Young grasshopper
Joined
Apr 17, 2016
Messages
39
Reaction score
2
Unfortunately I tried a lot without reaching the solution.
I think the solution is to modify the bin file but I do not know how
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
I think the solution is to modify the bin file but I do not know how
I'm pretty sure that won't be necessary.

In PuTTY, keep Control-U pressed for a few seconds until keyboard auto-repeat then power on the camera.
Example:
Code:
U-Boot 3.1.6-125131 (Apr 27 2015-13:51:29)
boards:125163
Boot From: NAND 2048 RC
SYS_CONFIG: 0x30064059 POC: 100
Cortex freq: 600000000
iDSP freq: 216000000
Dram freq: 564000000
Core freq: 216000000
AHB freq: 108000000
APB freq: 54000000
UART freq: 24000000
SD freq: 48000000
SDIO freq: 48000000
SDXC freq: 48000000
Hit Ctrl+u to stop autoboot: 0
|BIND err|
cmd 'null' is not supported.
nand booting ...
booting from pri part...
load kernel.
Code:
AHB freq: 108000000
APB freq: 54000000
UART freq: 24000000
SD freq: 24000000
SDIO freq: 48000000
SDXC freq: 48000000
Hit Ctrl+u to stop autoboot: 2
HKVS #
HKVS # printenv
ipaddr=192.0.0.64
serverip=192.0.0.128
gatewayip=0.0.0.0
netmask=255.255.255.0
ethaddr=28:57:be:14:e9:d7
loadaddr=0x00208000
bootfile=hImage
bootcmd=null
bootargs=console=ttyS0 debug single
bootdelay=2
HKVS # setenv bootargs console=ttyS0
HKVS # saveenv
Writing env to Nand... done
HKVS #
HKVS #
HKVS #
 
Top