R0 / DS-2CD2x32 BrickfixV2 brick recovery and full upgrade tool - enhanced.

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
This process brought it back to life, and in English too!
Well done!
On both counts.

only issues were some communication challenges with TFTP and putty,
Anything worth sharing?
The tftp updater can be affected by using PoE for power, and direct LAN connection to the PC, both likely to be timing related.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
That makes me wonder... does going through the console and forcing an update (pull a digicap.dav) via TFTP work successfully, if that digicap.dav is an english FW and the camera is china sourced and had previously chinese FW?
No, if the camera is Chinese it will still give a 'language mismatch error' when flashing EN/ML firmware using the serial console.
The 'enhanced MTD hack' converts enough of the configuration to EN to make peace with EN/ML firmware, doesn't touch the serial number though, which would still show CCCH.
 

medtech1

n3wb
Joined
Oct 14, 2014
Messages
29
Reaction score
5
Location
Canada
No, if the camera is Chinese it will still give a 'language mismatch error' when flashing EN/ML firmware using the serial console.
The 'enhanced MTD hack' converts enough of the configuration to EN to make peace with EN/ML firmware, doesn't touch the serial number though, which would still show CCCH.
AH ok.. thanks.. so the "enhanced MTD hack" modifies the boot portion of the camera (that loads and checks the FW before loading). I love learning this stuff.. thank u!
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
so the "enhanced MTD hack" modifies the boot portion of the camera (that loads and checks the FW before loading).
Not quite - it modifies part of the data in the 'hardware signature block', the data that is specific to an individual camera, written during manufacturing, such as the MAC address, the serial number, the model number, the options such as audio, SD card, WiFi and so on, but importantly also the region (EN or CN).
The firmware uses that data to determine how to operate.
Hikvision have chosen to make CN region cameras and NVRs stop working when updated with EN/ML firmware.
 

morreale

n3wb
Joined
Apr 17, 2014
Messages
6
Reaction score
2
Worked like a champ! 12 Cameras upgraded from v5.2.0 to v5.4.5 build 170123 (9x DS-2CD2032-I / 3x DS-2CD2432-IW)
I meant to post that all of my cameras are POE connected with a Cisco switch but TFTP wouldn’t connect. I had to use the 12v adapter with the cubes and a POE injector for the bullets.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
Thanks for that - could well be useful to others.
It does seem that the Hikvision tftp updater / handhake implementation is a bit tight on timing.

It may be a bit like what happened on the original pi-3 network boot.
The specific switch that the code was developed and tested on had a particularly fast link-detect response, compared with the average switch.
So the hard-coded bootcode was troublesome and needed some messy workarounds to tweak it into life for many users, myself included.
 

medtech1

n3wb
Joined
Oct 14, 2014
Messages
29
Reaction score
5
Location
Canada
Maybe you have a wiring diagram inside 2032-i?
If you're talking for the serial connector in the cameras? The ones I've done were a four pin JST connector. I wasn't sure of the direction (it was hard to tell) but one of the outer most pins is a ground, and the two directly next to the ground are TX and RX. I used a multimeter to determine which one was the ground, and just used the next two pins as RX/TX. The RX/TX if reversed just won't work, so you can reverse them if that is the case. The pin most opposite the ground is i think +5v.. which is not and should not be used for this.
 

fritzycat1

n3wb
Joined
Jan 19, 2016
Messages
26
Reaction score
11
Location
Hollywood, CA
Anything worth sharing?
The tftp updater can be affected by using PoE for power, and direct LAN connection to the PC, both likely to be timing related.
Here are some details from my experience. The issues I had are probably covered somewhere in this thread, but I didn't read the entire thread before jumping right in (I only really read the first page of posts..)

Since this is a little long, so I'll put the lessons learned up front:
  1. Run everything as 'Administrator' (TFTP Server, HxD etc).
  2. Turn off windows firewall.
  3. Use short network cables.
Here are the details:
My set up was a Windows 10 laptop, connected to a Trendnet TPE-S44 switch (8 ports, 4 with PoE), and the cameras connected to a PoE port on that switch. Using 6 foot Cat6 cables.

First upgrade was the DS-2CD2432F-IW. This camera was still working, but was running an old Chinese firmware. Here were the issues I encountered:

1. Initially, the camera would not connect to the Hikvision TFTP server. At first I thought it might be because I was using PoE for power, so I changed to an external power supply. That made no difference. Eventually I found I needed to disable the Windows Firewall on my laptop to get the connection to work (NetSh Advfirewall set allprofiles state off). After disabling the firewall, the camera connected just fine.

2. When running the first /dav/fixup.sh I would receive an error when it tried to upload the file to the FTP server. The message was 'error(2) permission denied' or something like that. I eventually determined that I needed to run the TFTP server (tftpd32) as 'Administrator' - that fixed the permission issue.

3. When editing the mtd6ro_mod file in HxD, I found I could not save the file to the 'C:\Program Files (x86)\Tftpd32' folder unless HxD was running as 'Administrator'.

4. I would periodically lose my putty telnet session connection, so just needed to start a new session. Not sure what the cause of that, but it happened with both of my cameras.


Next upgrade was the Chinese DS-2CD2032-I - this is the camera that was hobbled after the failed English V5.4.5 upgrade attempt. Only one issue with the process here:

This camera is installed outdoors, so I attempted to upgrade it over the existing network cable. About 100' of Cat5e. That didn't go so well. Several attempts to upload the brickfixV2EN digicap.dav file using the Hikvision FTP server failed. The camera failed to connect to the TFTP server initially, then when it did connect I received 'Receive Data ACK error' messages and the process hung after the 'completed file transfer' message (never received 'system update completed!' message). I had a few other failure messages after several other attempts too.

I moved my switch and laptop to the camera's location and connected the camera to a PoE port with a 6' Cat6 cable. That did the trick - the rest of the process went smoothly from there.

Thanks again for the time and effort put into this process. I have no idea how you figured out how to do this, but I'm sure glad you did!
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
I moved my switch and laptop to the camera's location and connected the camera to a PoE port with a 6' Cat6 cable. That did the trick - the rest of the process went smoothly from there.
I'd wonder about the 100 foot cable if changing the cable made the difference. It shouldn't.
Thanks again for the time and effort put into this process.
You are welcome - glad to help.
I have no idea how you figured out how to do this
Some of the triggers - apart from the curiosity and interest in analysis and problem-solving - were a dislike of Hikvision's sometimes quite nasty contempt for their end-user customers in the things they have incorporated in the firmware code to deliberately break the products.
 

fritzycat1

n3wb
Joined
Jan 19, 2016
Messages
26
Reaction score
11
Location
Hollywood, CA
I'd wonder about the 100 foot cable if changing the cable made the difference. It shouldn't.
Yea, I know it shouldn't but I've always had issues with this camera randomly losing connection and often the video is slow to load or temporarily drops out so I have my suspicions about the cabling. I was just removing the cabling as a variable by connecting it to the switch more directly. I need to take a closer look into it...

Some of the triggers - apart from the curiosity and interest in analysis and problem-solving - were a dislike of Hikvision's sometimes quite nasty contempt for their end-user customers in the things they have incorporated in the firmware code to deliberately break the products.
I agree - wish they would put that effort into product improvements instead.
 

moomoo55

n3wb
Joined
Sep 30, 2018
Messages
18
Reaction score
7
Location
90210
super-thanks !! finally made useful my 2332
its been sitting bricked after trying to update its chinese base into EN...
...and now it finally gets to work

following instructions worked, tho please mention in the the step "- Start the tftp server" (NOT tftp updater server) , use tftp jouinin.net is needed
 

Tenny

n3wb
Joined
Oct 12, 2018
Messages
1
Reaction score
0
Location
TX
Just want to thank everyone for this. I just upgraded mine, and while it took a while I got it.

The biggest issue was when I was trying to get it to update from "hikvision tftpd" it wasn't working. I almost gave up then thought maybe I need to have it plugged into a switch rather than directly into the computer. That solved the issue for me. I noticed every time i turned the camera on when plugged into the computer it detected network then stopped, then detected then stopped, then detected and stayed on.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
then thought maybe I need to have it plugged into a switch rather than directly into the computer.
Yes, that can be a troublesome way to connect up the devices, not recommended.
- With the PC and the camera each on a wired connection (not WiFi) set the PC IP address to 192.0.0.128, subnet mask to 255.255.255.0 The default gateway does not matter.
There can be similar difficulties getting the handshake to complete reliably when the camera is connected via PoE.

I noticed every time i turned the camera on when plugged into the computer it detected network then stopped, then detected then stopped, then detected and stayed on
That's the way the bootloader probes for the Hikvision tftp updater - it does an 'interface up', send a UDP packet, waits a short while, interface down, interface up, sends a packet, waits, interface down, then interface up as part of the normal boot if no response occurs.
When directly connected, after the interface up, the PC also has to respond with a link detect, so there is an additional delay which can cause the UDP packet to be missed by the PC.
 

gravykid

n3wb
Joined
May 12, 2016
Messages
10
Reaction score
2
Hey Guys,

Having some issues getting my DS-CD2532F-IWS to play nicely. Does anyone know what the proper devtype bytes are for this model? I accidentally updated it with the an MTD from my 2032 and trying to get it back to normal.

All the rest are playing nice....so far. I've attached my modded MTD...

EDIT: I may have figured it out as I think it may have had to do with having the same serial number from the 2032 camera. I updated the numbers with the correct serial number and we'll see how it goes...
 

Attachments

Last edited:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
EDIT: I may have figured it out as I think it may have had to do with having the same serial number from the 2032 camera. I updated the numbers with the correct serial number and we'll see how it goes...
It's more likely that the duplicate MAC address is the problem. If these are both on the LAN at the same time, their networking will not work properly.

Does anyone know what the proper devtype bytes are for this model?
Is that screenshot your original mtd6ro since modified?
If so, the devType is already OK at 1498, which is the value for a DS-2CD2532F-IS. Did you manage to do the prtHardInfo command to see it?
Or have you lost the original mtd6ro?
If so, attached is a modded one from a DS-2CD2532F-IS, which will work OK, possibly apart from the WiFi function.
I don't have a sample from a DS-2CD2532F-IWS
 

Attachments

medtech1

n3wb
Joined
Oct 14, 2014
Messages
29
Reaction score
5
Location
Canada
Or have you lost the original mtd6ro?
II don't have a sample from a DS-2CD2532F-IWS
I think I have a copy of the original mtd6ro_orig from my DS-2CD2532F-IWS if it helps.

I wasn't sure if the mtd6ro_orig it was at first, but if you open it with notepad, it does have some readable text on the top "DS-2CD2532-IWS" at the top.

View from notepad of mtd6ro_orig
 
Last edited:
Top