- Mar 27, 2014
- 3,137
- 750
I'll share my experience while bricking several cams during firmware upgrade. Two of them were repaired by Jack, but 1 I recovered with the help from @alastairstevenson. Thank you!
First a little background on the recent cam
Note: If your cam was connect to NVR which means it probably using 192.168.254.x subnet, so you will need to make some changes to access it. What I did is simply changed my network configuration on PC to:
IP 192.168.254.2
Mask 255.255.255.0
Gateway 192.168.254.1
and then simply accessed 192.168.254.3 via browser which is what my camera used. (you will lose network access, but you can toggle back forth)
So I knew the firmware was good and worked before on the same exact camera, but my previous experience taught me to not reboot the camera after failed upgrade. Since I already knew the telnet was working I started gathering information what I needed to do. Here are steps that I ended performing:
Capture Serial and MAC address of your bricked camera before performing any steps. You can do this via batch tool, web ui or telnet. You will need those to update the configuration file later, otherwise it will be duplicate and will cause problems when using in Hikvision NVR.
1. Create a share on your window pc. Lets say c:\tmp
2. Login to telnet on working camera (port 3232)
3. Mount the share command: mount -t cifs -o username=<share user>,password=<share password> //yourpcip/tmp /mnt
4. Navigate to dev/ and copy mtdblock4 using command 'cp mtdblock4 /mnt/mtdblock4'
5. Login to telnet on a bricked camera
6. Mount the share on a bricked camera command: mount -t cifs -o username=<share user>,password=<share password> //yourpcip/tmp /mnt
7. Navigate to share cd /mnt
8. Copy mtdblock4 to a tmp folder command: cp mtdblock4 /tmp/mtdblock4
9. Run command: flashcp -v mtdblock4 /dev/mtd4
10 Reboot cam
11. After the camera booted login to telnet again
12. Perform the same steps to copy file /home/config/config_hw.ini to your windows share
13. Download Geany program if you are using Windows to edit linux text files mini-IDE/Editor, from here : https://www.geany.org/Download/Releases
14. Open config_hw.ini
15. Change Edit > Preferences > Files > End-of-line set to default to LF
16. Replace previously captured serial number and MAC address
17. Save and transfer the file back in to /home/config/config_hw.ini
18. Chmod 644 /home/config/config_hw.ini to set the same permission
19. Reboot the camera
Other optional steps:
20. Access SDAP program to reset IP
21. Access web ui and reset the camera for a good measure
22. Upload firmware via web ui to test it out
Note: Clone mtdblock4 was from a newer camera with most recent firmware.
I am pretty sure things steps could be condensed a bit and I did end up doing certain things incorrectly which I fixed with the help, so I am not listing that.
So this is actually simple enough because I did not reboot the camera and had normal telnet access, if you happened to reboot it then it will be much more headache. Please refer to Unbricking Mini v2 thread for details.
First a little background on the recent cam
- It was purchased 7 month ago
- Upgraded to IPNC_S2l2.0.1_build201603031830 firmware 5 month ago
- Hasn't been touched in terms of configuration since then
- Recently I attempted initially simply to make changes to the settings and discovered that camera would not apply any changes
- I've tried resetting the camera to default without much luck
- The camera was working fine, but it seemed to be stuck in the "read only" state
- It did not have SD card
- So finally I decided to reload the same EXACT firmware using Batch Control/Update tool
- It failed at 88% (Exactly same way as the previous two cams as well)
- I did not reboot the camera after the failed upgrade
Note: If your cam was connect to NVR which means it probably using 192.168.254.x subnet, so you will need to make some changes to access it. What I did is simply changed my network configuration on PC to:
IP 192.168.254.2
Mask 255.255.255.0
Gateway 192.168.254.1
and then simply accessed 192.168.254.3 via browser which is what my camera used. (you will lose network access, but you can toggle back forth)
So I knew the firmware was good and worked before on the same exact camera, but my previous experience taught me to not reboot the camera after failed upgrade. Since I already knew the telnet was working I started gathering information what I needed to do. Here are steps that I ended performing:
Capture Serial and MAC address of your bricked camera before performing any steps. You can do this via batch tool, web ui or telnet. You will need those to update the configuration file later, otherwise it will be duplicate and will cause problems when using in Hikvision NVR.
1. Create a share on your window pc. Lets say c:\tmp
2. Login to telnet on working camera (port 3232)
3. Mount the share command: mount -t cifs -o username=<share user>,password=<share password> //yourpcip/tmp /mnt
4. Navigate to dev/ and copy mtdblock4 using command 'cp mtdblock4 /mnt/mtdblock4'
5. Login to telnet on a bricked camera
6. Mount the share on a bricked camera command: mount -t cifs -o username=<share user>,password=<share password> //yourpcip/tmp /mnt
7. Navigate to share cd /mnt
8. Copy mtdblock4 to a tmp folder command: cp mtdblock4 /tmp/mtdblock4
9. Run command: flashcp -v mtdblock4 /dev/mtd4
10 Reboot cam
11. After the camera booted login to telnet again
12. Perform the same steps to copy file /home/config/config_hw.ini to your windows share
13. Download Geany program if you are using Windows to edit linux text files mini-IDE/Editor, from here : https://www.geany.org/Download/Releases
14. Open config_hw.ini
15. Change Edit > Preferences > Files > End-of-line set to default to LF
16. Replace previously captured serial number and MAC address
17. Save and transfer the file back in to /home/config/config_hw.ini
18. Chmod 644 /home/config/config_hw.ini to set the same permission
19. Reboot the camera
Other optional steps:
20. Access SDAP program to reset IP
21. Access web ui and reset the camera for a good measure
22. Upload firmware via web ui to test it out
Note: Clone mtdblock4 was from a newer camera with most recent firmware.
I am pretty sure things steps could be condensed a bit and I did end up doing certain things incorrectly which I fixed with the help, so I am not listing that.
So this is actually simple enough because I did not reboot the camera and had normal telnet access, if you happened to reboot it then it will be much more headache. Please refer to Unbricking Mini v2 thread for details.
Last edited by a moderator: