Bricked SV3C IP 1080P Firmware help

Cleck

Getting the hang of it
Joined
Apr 5, 2019
Messages
23
Reaction score
31
Location
Irondequoit, NY
Chiming in here after reading the last 5 pages...and it's all Greek to me.

Back in Feb, I emailed the rep to say that my time and date weren't updating. She emailed me back to say that an update would release in March, so I forgot all about it. FF to Friday and I thought I had my time and date figured out after setting up Nettime. Look at my cams today, all the times are wrong again and the update method is set back to Manual. I find remember the email saying that there was going to be an update, google sv3c upgrade firmware, find a Reddit thread saying that the firmware on their site is old, and that Anjvision is the one that actually makes the software for the cameras.
I downloaded the upgrade/aj device tool, find the correct firmware (based on what she said about my camera and following the directions in the forum above) and download the software to flash. Used the tool to upgrade the 4 cameras and 3 reboot successfully, the 4th does not. I can't find it with the NVR, I can't find it w/ BI scanning, I can't locate it, so I assume after reading all this, that the camera is bricked.

It sounds like since I am not equipped to do all the things you guys did, that it is just time to chuck the camera and upgrade to a better one - unless there are other options I can try here first.
 

Lucky G.

n3wb
Joined
Nov 1, 2020
Messages
10
Reaction score
7
Location
Slovakia
I was successful with unbricking my SV3C camera so I'd like to share my HOW TO, maybe it might help someone:

My camera model: SV3C h264 dome 1080p with POE
Camera part number: SV-D02POE-1080P

After trying to extract partition images from original firmware file and forcing them to get into the camera's flash with U-boot's UPDATE command I gave up, that command just wasn't working. Neither were commands like ERASE, PROTECT and FLINFO so that was a dead end. I wasn't sure whether I extracted the images of [kernel] and [rootfs] partitions correctly and on the other hand I was unable to get them into flash for a test. I was lucky to have other similar working cameras at home - SV-B01POE-1080P, which is the same as SV-D02POE-1080P but it's a bullet instead of dome. I didn't even had to get it down of the wall nor disassembling it to get to the serial console, all I needed was a telnet connection with root access (the camera's root password 'cat1029' is one of the very well known passwords, or 'John the Ripper' will reveal it to you from original firmware file).

First check the flash partition sizes with cat /proc/mtd
Code:
root@RT-IPC:tmpfs$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00050000 00008000 "uboot"
mtd1: 00160000 00008000 "kernel"
mtd2: 005e0000 00008000 "rootfs"
mtd3: 00010000 00008000 "key"
mtd4: 00060000 00008000 "etc"
Yes, looks exactly as expected.
I tried to export them one by one to /tmp with cat /dev/mtd0 > /tmp/mtd0 etc. and then upload them from /tmp to tftp server but it can be done in one step:
Code:
tftp -l /dev/mtd0 -r mtd0 -p 192.168.2.6
tftp -l /dev/mtd1 -r mtd1 -p 192.168.2.6
tftp -l /dev/mtd2 -r mtd2 -p 192.168.2.6
tftp -l /dev/mtd3 -r mtd3 -p 192.168.2.6
tftp -l /dev/mtd4 -r mtd4 -p 192.168.2.6
I compared mtd1 and mtd2 to my [kernel] and [rootfs] images and of course they were different, I extracted them with wrong offset (well, binwalk is far from perfect).
The final and most important step was to write them into bricked camera's flash. Finally I got lucky with U-boot's SPI command:

Code:
kernel:
spi erase 0x00050000 0x00160000
tftp 0x0008000 mtd1
spi write 0x0008000 0x00050000 0x00160000

rootfs:
spi erase 0x001B0000 0x005E0000
tftp 0x0008000 mtd2
spi write 0x0008000 0x001B0000 0x005E0000

key:
spi erase 0x00790000 0x00010000
tftp 0x0008000 mtd3
spi write 0x0008000 0x00790000 0x00010000

etc:
spi erase 0x007A0000 0x00060000
tftp 0x0008000 mtd4
spi write 0x0008000 0x007A0000 0x00060000
I erased and flashed all partitions but first - U-boot, rebooted and voilá!, the camera is working! Since I made a copy of all partitions the restored camera had the same settings as the source camera including the IP address so there was a conflict but that could be easily resolved. It was probably not necessary to do all partitions, maybe rootfs would be just enough, I'm really not sure.
If anyone is interested in the partition image files, feel free to msg me.

And I must admit, these cameras are quite durable, I have them for 3 and half years and they all work in outdoor temperatures from -10°C in winter to almost 40°C in summer ever since installed.
3x SV-B01POE-1080P
1x SV-D02POE-1080P
1x SV-B11V-1080P-POE

I had many newer cameras that didn't last a couple of months.
 

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
Well done unbricking it and for providing the information on how you did it.

I have two SV3C-B01POE-1080 cameras with hardware versions 8700-sc2035 and 8700-sc2135 and both use the same firmware. They came with firmware version V2.3.4.2103-S50-NTD-B20170508B. I have them connected to a Hikvision NVR and it found them automatically, showed them as Hikvision cameras and they were also found by SADP.

The SV3C website had a later firmware V2.3.4.2103-S50-NTD-B20170823B so I updated both cameras and after updating they were no longer found by SADP or the Hikvision NVR and I had to use them set to ONVIF instead.

See my post Bricked SV3C IP 1080P Firmware help about trying to reflash with the earlier firmware which bricked the cameras and how i managed to recover them but only to the later firmware version.

Later SV3C-B01POE-1080 cameras use different hardware and firmware. If your cameras use the same hardware and firmware as mine and have the earlier firmware version installed, version V2.3.4.2103-S50-NTD-B20170508B or an earlier version, I would be interested in a copy of the partition image files as I would like to revert them to the earlier firmware as it worked better with my Hikvision NVR. I have them blocked from accessing the internet so I'm not worried if the earlier firmware has more vulnerabilities.

The image from the SV3C cameras in not as good as from my Hikvision cameras but is perfectly adequate for my use. As you say the cameras are good value for the money and so far have been reliable.
 

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
I've connected to the internal pcb serial header using a USB to TTL serial adaptor and Putty shows the information as the camera boots, so I've connected the RX and TX leads correctly, but I cannot interrupt the boot loader! I've tried Ctrl c, Ctrl C, Ctrl u, Ctrl U and lots of other combinations but none work. I've tried holding down the keys before I power on the camera and keep holding them down as the camera boots and I've also tried repeatedly dabbing the keys as it boots but nothing works!

Has anyone managed to interrupt the bootloader on one of these cameras with firmware V2.3.4.2103-S50-NTD-B20170823B installed? If you have, what settings did you have in Putty and how did you do it? This version of the firmware has Telnet disabled, it was enabled in the earlier firmware version V2.3.4.2103-S50-NTD-B20170508B, so using the serial header is the only option.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,952
Reaction score
6,787
Location
Scotland
You may not have the USB convertor TX connected to the right pad. You don't need that to see the Putty output.

Does the camera boot to any form of command prompt, and if so does it echo any characters that you type?
 

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
The camera pcb has the Tx and Rx pads marked, so I'm pretty sure I have them connected correctly. I did try reversing them and then there was almost nothing showing in Putty and what did appear was gibberish. Also if I type what I type appears in the Putty window but the code below keeps going while I am typing.

The camera boots up and is fully working and I can log in to it using a browser. In the Putty window the camera keeps running commands and never stops at a command prompt. It keeps repeating the lines below over and over. If I hit Ctrl C it gives a RT-IPC Login prompt but it keeps scrolling past it as the code below keeps going and doesn't wait for me to enter a user name or password.


Code:
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
<mrtsp>Cseq: 7
<mrtsp>Cseq: 7
Rtsp Send len:120
RTSP response Send OK
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
p2p not enable
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
p2p not enable
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
p2p not enable
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
----------s32RTSPProcRet =0,s32SendRespRet = 0----------
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
p2p not enable
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
opendir /sys/bus/mmc/devices failed
A Method requested was invalid.  Message discarded.Method = $
 

Lucky G.

n3wb
Joined
Nov 1, 2020
Messages
10
Reaction score
7
Location
Slovakia
I had the same problem. If the prompt says "Hit any key to stop", just connect the TX and RX line of the camera for that moment. It worked for me. But if it's waiting for exact key like CTRL+C then I don't know.
I didn't understand that behavior, it's like the input channel wasn't working at all, but after the bootloader was interrupted and I connected the RX line back to USB TTL adapter, it was working
 

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
I had the same problem. If the prompt says "Hit any key to stop", just connect the TX and RX line of the camera for that moment. It worked for me. But if it's waiting for exact key like CTRL+C then I don't know.
I didn't understand that behaviour, it's like the input channel wasn't working at all, but after the bootloader was interrupted and I connected the RX line back to USB TTL adapter, it was working
Genius! I would never have thought to try that.

I shorted the Tx and Tx lines together and turned on the camera and it booted as normal. I tried shorting the Tx and Rx lines together as soon as the "Hit any key etc" message appeared and it still booted as normal. I then disconnected the USB to serial adaptor from the computers USB socket and turned on the camera with the Tx and Rx lines shorted together. Removed the short and reconnected the USB serial adaptor to the computers USB socket and Putty showed :-
<INTERRUPT>
sonix #

I then tried help to see what commands it took. I tried using the suggested "cat1029" password but it didn't work. I tried the bdinfo command which gave some information and then tried to check the partitions using your command :- root@RT-IPC:tmpfs$ cat /proc/mtd but that didn't work. It looks like the later firmware has reduced the amount of commands available as well as disabling the Telnet access.

The ethernet light is on and flashing so it looks like it is enabled but the SV3C Search tool doesn't find the camera, although it will find my other camera.

Not sure if I can go any further. I realise it isn't cost effective to spend time on the camera, especially as it is working with the later firmware installed. But it would be nice to be able to install the earlier firmware again to regain the Hikvision compatibility that was removed in the later firmware and also for the satisfaction of doing it successfully. I hate to be beaten when I think something should be possible!

Below is the Putty log, from the initial <INTERRUPT> to the output of the cat commands in case anyone is interested or has any ideas.

Code:
<INTERRUPT>
sonix # cat1029
Unknown command 'cat1029' - try 'help'


sonix # help
?       - alias for 'help'
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
devinfo - devinfo
dump    - dump image
erase   - erase FLASH memory
eraseetc- eraseetc
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatupdate- update firmware from fat32 filesystem
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print command description/usage
hwcrc16 - hwcrc16 - hardware crc16 calculate

loadb   - load binary file over serial line (kermit mode) and update to flash
loadkernel- loadkernel
loady   - load binary file over serial line (ymodem mode) and update to flash
md      - memory display
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
reset   - Perform RESET of the CPU
saveenv - save environment variables to persistent storage
setenv  - set environment variables
spi     - spi - Serial Flash sub-system
tftpboot- boot image via network using TFTP protocol
update  - update image, u-env, factory, u-logo, user, kernel, rootfs-r, rootfs-r                                                                                                                                                             w, firmware/firmware_f
upgrade - upgrade board
usb     - USB sub-system
usbboot - boot from USB device
verify  - verify image, flash-info, hw-setting, flash-layout, u-boot, rescue, us                                                                                                                                                             er, factory, kernel, rootfs-r, u-env
version - print monitor, compiler and linker version


sonix # bdinfo
arch_number = 0x0000067D
boot_params = 0x00000100
DRAM bank   = 0x00000000
-> start    = 0x00000000
-> size     = 0x04000000
ethaddr     = 00:B0:27:08:90:14
ip_addr     = 192.168.0.124
baudrate    = 115200 bps
TLB addr    = 0x03FF0000
relocaddr   = 0x03D75000
reloc off   = 0x02075000
irq_sp      = 0x03D14D58
sp start    = 0x03D14D48
FB base     = 0x03DF0000


sonix # devinfo
## Device Info Starting ...
Invalid rootfsr
Flash-Type=SPI

SPI : u-boot/factory/kernel/rootfs-r/rootfs-rw/user/u-logo
hw-setting=0x00000000,0x00000FFF
u-boot=0x00002000,0x0004DFFF
u-env=0x0004E000,0x0004EFFF
flash-layout=0x0004F000,0x0004FFFF
factory=0x0004FFFF,0x0004FFFF
kernel=0x00050000,0x0034FFFF
rootfs-r=0x00350000,0x00A4FFFF
rootfs-app=0x00A4FFFF,0x00A4FFFF
rootfs-rw =0x00A50000,0x00B4FFFF
user=0x00B4FFFF,0x00B4FFFF
u-logo=0x00B4FFFF,0x00B4FFFF
rescue=0x00A4FFFF,0x00A4FFFF
u-boot.ver=u-boot-2011-09
u-boot.tm=
factory.ver=:)¦¦¦"¦rKb¦¦M¦C¦¦¦¦¦?¦¦¦p¦¦¦¦¦
                                          P?¦Y
factory.tm=¦3¦r+4¦T¦¦2i¦
kernel.ver=master_054a_20160511_1704
kernel.tm=2016-07-01 20:27
user.ver=¦E
¦l+

¦$¦¦"¦d¦¦¦~c
user.tm=¦¦¦¦8R¦Hx0¦¦¦d
rootfs-r.ver=
rootfs-r.tm=
## Device Info End, rc = 0xFFFFFFFB
ERROR: devinfo read version time Failed



sonix # fatinfo
usage: fatinfo <interface> <dev[:part]>


sonix # flinfo

Bank # 1: AMD Unknown Chip Type






sonix # cat /proc/mtd
Unknown command 'cat' - try 'help'


sonix # root@RT-IPC:tmpfs$ cat /proc/mtd
Unknown command 'root@RT-IPC:tmpfs$' - try 'help'


sonix # root
Unknown command 'root' - try 'help'
 

Lucky G.

n3wb
Joined
Nov 1, 2020
Messages
10
Reaction score
7
Location
Slovakia
Genius! I would never have thought to try that.

I shorted the Tx and Tx lines together and turned on the camera and it booted as normal. I tried shorting the Tx and Rx lines together as soon as the "Hit any key etc" message appeared and it still booted as normal. I then disconnected the USB to serial adaptor from the computers USB socket and turned on the camera with the Tx and Rx lines shorted together. Removed the short and reconnected the USB serial adaptor to the computers USB socket and Putty showed :-
<INTERRUPT>
sonix #

I then tried help to see what commands it took. I tried using the suggested "cat1029" password but it didn't work. I tried the bdinfo command which gave some information and then tried to check the partitions using your command :- root@RT-IPC:tmpfs$ cat /proc/mtd but that didn't work. It looks like the later firmware has reduced the amount of commands available as well as disabling the Telnet access.

The ethernet light is on and flashing so it looks like it is enabled but the SV3C Search tool doesn't find the camera, although it will find my other camera.

Not sure if I can go any further. I realise it isn't cost effective to spend time on the camera, especially as it is working with the later firmware installed. But it would be nice to be able to install the earlier firmware again to regain the Hikvision compatibility that was removed in the later firmware and also for the satisfaction of doing it successfully. I hate to be beaten when I think something should be possible!

Below is the Putty log, from the initial <INTERRUPT> to the output of the cat commands in case anyone is interested or has any ideas.

Code:
<INTERRUPT>
sonix # cat1029
Unknown command 'cat1029' - try 'help'


sonix # help
?       - alias for 'help'
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
devinfo - devinfo
dump    - dump image
erase   - erase FLASH memory
eraseetc- eraseetc
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatupdate- update firmware from fat32 filesystem
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print command description/usage
hwcrc16 - hwcrc16 - hardware crc16 calculate

loadb   - load binary file over serial line (kermit mode) and update to flash
loadkernel- loadkernel
loady   - load binary file over serial line (ymodem mode) and update to flash
md      - memory display
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
reset   - Perform RESET of the CPU
saveenv - save environment variables to persistent storage
setenv  - set environment variables
spi     - spi - Serial Flash sub-system
tftpboot- boot image via network using TFTP protocol
update  - update image, u-env, factory, u-logo, user, kernel, rootfs-r, rootfs-r                                                                                                                                                             w, firmware/firmware_f
upgrade - upgrade board
usb     - USB sub-system
usbboot - boot from USB device
verify  - verify image, flash-info, hw-setting, flash-layout, u-boot, rescue, us                                                                                                                                                             er, factory, kernel, rootfs-r, u-env
version - print monitor, compiler and linker version


sonix # bdinfo
arch_number = 0x0000067D
boot_params = 0x00000100
DRAM bank   = 0x00000000
-> start    = 0x00000000
-> size     = 0x04000000
ethaddr     = 00:B0:27:08:90:14
ip_addr     = 192.168.0.124
baudrate    = 115200 bps
TLB addr    = 0x03FF0000
relocaddr   = 0x03D75000
reloc off   = 0x02075000
irq_sp      = 0x03D14D58
sp start    = 0x03D14D48
FB base     = 0x03DF0000


sonix # devinfo
## Device Info Starting ...
Invalid rootfsr
Flash-Type=SPI

SPI : u-boot/factory/kernel/rootfs-r/rootfs-rw/user/u-logo
hw-setting=0x00000000,0x00000FFF
u-boot=0x00002000,0x0004DFFF
u-env=0x0004E000,0x0004EFFF
flash-layout=0x0004F000,0x0004FFFF
factory=0x0004FFFF,0x0004FFFF
kernel=0x00050000,0x0034FFFF
rootfs-r=0x00350000,0x00A4FFFF
rootfs-app=0x00A4FFFF,0x00A4FFFF
rootfs-rw =0x00A50000,0x00B4FFFF
user=0x00B4FFFF,0x00B4FFFF
u-logo=0x00B4FFFF,0x00B4FFFF
rescue=0x00A4FFFF,0x00A4FFFF
u-boot.ver=u-boot-2011-09
u-boot.tm=
factory.ver=:)¦¦¦"¦rKb¦¦M¦C¦¦¦¦¦?¦¦¦p¦¦¦¦¦
                                          P?¦Y
factory.tm=¦3¦r+4¦T¦¦2i¦
kernel.ver=master_054a_20160511_1704
kernel.tm=2016-07-01 20:27
user.ver=¦E
¦l+

¦$¦¦"¦d¦¦¦~c
user.tm=¦¦¦¦8R¦Hx0¦¦¦d
rootfs-r.ver=
rootfs-r.tm=
## Device Info End, rc = 0xFFFFFFFB
ERROR: devinfo read version time Failed



sonix # fatinfo
usage: fatinfo <interface> <dev[:part]>


sonix # flinfo

Bank # 1: AMD Unknown Chip Type






sonix # cat /proc/mtd
Unknown command 'cat' - try 'help'


sonix # root@RT-IPC:tmpfs$ cat /proc/mtd
Unknown command 'root@RT-IPC:tmpfs$' - try 'help'


sonix # root
Unknown command 'root' - try 'help'

Oh, you're trying to enter commands that were supposed to be used on source camera via telnet during firmware extraction. You don't need to do that since you already have the files downloaded from me.
So here's the detailed guide what you need to do, only to get those files to your camera to downgrade the firmware in it:

1. setup TFTP server on your computer or server; it should be on the same local network as the camera (I'm using Tftpd32: an opensource free firewall friendly dhcp, syslog sntp and tftp server/service for windows, tftp client)
2. copy the extracted files from the zip archive you downloaded from me (mtd0 - mtd3) to TFTP's root directory (the directory selected "Current directroy" on TFTP server tab)
3. connect the camera via USB/TTL adapter to your computer and start your telnet program (Putty)
4. power on the camera and interrupt the bootloader by pressing any key. I had the same problem as you - the bootloader ignored my keystrokes from USB/TTL output, so I created a loopback - redirected the camera's own output to it's input and that helped to interrupt the standard bootloader sequence and get to the U-boot prompt, see next image. Keep the connection to adapter's RX input so you can see what's going on.
IP cam serial conn 2.png
After you're successful with getting into U-boot prompt, remove the shortcut and rewire the adapter to standard connection:
IP cam serial conn.png
5. now check the camera's variables, that hold IP addresses:
Code:
printenv
You should see output similar to this:
Code:
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs init=/bin/sh mem=64M isp=11M vc=11M vo=0M mtdparts=snx-spi:320k(uboot),1408k(kernel),6016k(rootfs),64k(key),384k(etc)
bootcmd=loadkernel 0x00007FFC 0x0;bootm 0x00008000
bootdelay=0
bootfile=uImage
console_pwd=mmnipcam
ethaddr=C0:99:C3:xx:xx:xx
gatewayip=xxx.xxx.xxx.xxx
ipaddr=xxx.xxx.xxx.xxx
netmask=255.255.255.0
netretry=3
serverip=xxx.xxx.xxx.xxx
stderr=serial
stdin=serial
stdout=serial

Environment size: 501/131068 bytes
Look for these 3 values:
Code:
ipaddr=xxx.xxx.xxx.xxx
netmask=255.255.255.0
serverip=xxx.xxx.xxx.xxx
The ipaddr should be any unused IP address of your local network, netmask should be the same as used in your network and serverip must be set to IP address of computer with TFTP server from step 1 - that's the source from where the camera will download the firmware files in next step.
To set these values use setenv command. For example I'd like the camera to use address 192.168.2.70 and my computer with running TFTP server has IP address 192.168.2.6 so I would set set them like this:
Code:
setenv ipaddr 192.168.2.70
setenv serverip 192.168.2.6
saveenv
Don't forget to save the values with saveenv command!

6. Now everything is set for flashing. Enter the following command sequence to flash the first partition - kernel:
Code:
spi erase 0x00050000 0x00160000
tftp 0x0008000 mtd1
spi write 0x0008000 0x00050000 0x00160000
and then continue with rootfs and key partitions:
Code:
spi erase 0x001B0000 0x005E0000
tftp 0x0008000 mtd2
spi write 0x0008000 0x001B0000 0x005E0000

spi erase 0x00790000 0x00010000
tftp 0x0008000 mtd3
spi write 0x0008000 0x00790000 0x00010000
This is for the last partition - etc and for the uboot partitition, which I don't think you need to flash, but for the complete reference here's the sequence for them too:
Code:
spi erase 0x007A0000 0x00060000
tftp 0x0008000 mtd4
spi write 0x0008000 0x007A0000 0x00060000

spi erase 0x00000000 0x00050000
tftp 0x0008000 mtd0
spi write 0x0008000 0x00000000 0x00050000
7. enter reset command and if everything went good, the camera should boot up into the freshly flashed older version of the firmware. The camera will probably have IP address from my settings - 192.168.2.18 - you can change that with the IPCameraSearch tool.
 
Last edited:

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
Thanks for taking the time to write such clear and detailed step by step instructions. Especially the bit about how to leave the Rx line connected while shorting the Rx and Tx lines together. I really should have thought of doing it that way!

I followed all your instructions but had a problem after entering the write command for mtd2. For some reason my USB to serial adaptor hung! After waiting for 30 minutes just to make sure it had hung I had to reboot the pc and then reboot the camera, with my fingers crossed! The Uboot came back up and I redid all the mtd2 commands again and this time it finished and didn't cause the USB to serial to hang.

Pleased that it was now working I kept following your instructions and erased mtd4 and then realised that you didn't send me a copy of mtd4 so I now had an empty mtd4 memory area!

As I now had nothing to lose I carried on and finished copying the last mtd0 area and rebooted the camera.

The camera rebooted and is now using the earlier firmware and it continues to boot past the point that it stopped at when I had flashed the earlier firmware using the web interface of the later firmware, which is when I first bricked the camera. So it looks like flashing the individual mtd partitions has got round the, on purpose or accidental, downgrade block that the later firmware has introduced. But it will not boot fully as it gives an error message about the missing mtd4 etc partition!

Is it possible to have a copy of your mtd4 partition please as it looks like that is all I now need to successfully get the camera to work.

Thanks for all your help so far.
 

Lucky G.

n3wb
Joined
Nov 1, 2020
Messages
10
Reaction score
7
Location
Slovakia
Thanks for taking the time to write such clear and detailed step by step instructions. Especially the bit about how to leave the Rx line connected while shorting the Rx and Tx lines together. I really should have thought of doing it that way!

I followed all your instructions but had a problem after entering the write command for mtd2. For some reason my USB to serial adaptor hung! After waiting for 30 minutes just to make sure it had hung I had to reboot the pc and then reboot the camera, with my fingers crossed! The Uboot came back up and I redid all the mtd2 commands again and this time it finished and didn't cause the USB to serial to hang.

Pleased that it was now working I kept following your instructions and erased mtd4 and then realised that you didn't send me a copy of mtd4 so I now had an empty mtd4 memory area!

As I now had nothing to lose I carried on and finished copying the last mtd0 area and rebooted the camera.

The camera rebooted and is now using the earlier firmware and it continues to boot past the point that it stopped at when I had flashed the earlier firmware using the web interface of the later firmware, which is when I first bricked the camera. So it looks like flashing the individual mtd partitions has got round the, on purpose or accidental, downgrade block that the later firmware has introduced. But it will not boot fully as it gives an error message about the missing mtd4 etc partition!

Is it possible to have a copy of your mtd4 partition please as it looks like that is all I now need to successfully get the camera to work.

Thanks for all your help so far.
Sure. It wasn't easy to get rid of the password. I changed the admin password countless times, I did a factory reset, created all the user accounts (guest1 - guest7), rebooted many times; THE PASSWORD WAS STILL THERE! Unbelievable... So I just rewrote it in hex editor to random characters. I was afraid that it wouldn't work then because of some integrity control / check sums, but luckily, it works. I reflashed the mtd4 with changed password back to my camera and it booted normally and everything works.
I am sending you the download link in PM.
 

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
Sure. It wasn't easy to get rid of the password. I changed the admin password countless times, I did a factory reset, created all the user accounts (guest1 - guest7), rebooted many times; THE PASSWORD WAS STILL THERE! Unbelievable... So I just rewrote it in hex editor to random characters. I was afraid that it wouldn't work then because of some integrity control / check sums, but luckily, it works. I reflashed the mtd4 with changed password back to my camera and it booted normally and everything works.
I am sending you the download link in PM.
Sorry to create all that work for you and I really appreciate you doing it. I can understand why you didn't want to leave your password in the file as I am also very wary of giving my passwords away. But if your camera is blocked from accessing the internet, which it really should be, and you use a VPN if you need to access it remotely, having your password would not have allowed anyone to access your camera.

I flashed the mtd4 partition, rebooted the camera and it booted up correctly and worked! I was able to log in using the default of "admin" for the user name and password. I checked the firmware version and it was now V2.3.4.2103-S50-NTD-B20170508B which is what I wanted. I then did a factory reset to clear your passwords and it rebooted correctly again.

To make absolutely sure that all the flash and partition information was correct I used the web interface "Upgrade" option to flash the same version of firmware, V2.3.4.2103-S50-NTD-B20170508B, to it and it worked and rebooted correctly.

I compared the web interface of the old and new firmware and they are identical, with no extra or changed settings available. I ran a port scan and with the old firmware installed ports 23 for Telnet and 8000 for the Hikvison protocol are open. My Hikvision NVR now connects to the camera using the Hikvision protocol again instead of having to use ONVIF and the camera settings are now adjustable from the NVR interface, which they weren't when it was using the ONVIF protocol. Also "Line Crossing" and "Intrusion Detection" are now available, but I haven't tested them to see if they work.

All the time spent on this hasn't really been cost effective but it does give a great feeling of achievement and as the camera is now more usable it does make it worthwhile. It also helps keep the brain active.

Thanks again for all your help. Let me know if you need any of the firmware files or the working rom image file I made using the CH341A flash programmer.

EdIt
I forgot to add that my camera kept it's original MAC address after flashing your mtd files to it. I'm guessing that the other 16k ram ic stores the MAC address, serial number and other camera specific settings.
 

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
Today I flashed the individual mtd files to my second camera, which was fully working and had the later firmware on it. This time they all flashed first time without any errors or the USB to serial adaptor locking up. I rebooted the camera after flashing them and it booted up correctly with the earlier firmware running. I did a factory reset to clear any unwanted or corrupt settings that may be there and again it booted up correctly and was fully working.

I then reflashed the same version of firmware on to it using the web interface "Upgrade" option, the same as I had done to the first camera. Unlike the first camera which rebooted normally after the "Upgrade" this camera didn't reboot and was bricked! The Putty log showed an error something like "Unable to find mtd2". But Putty kept stopping as the USB to Serial adaptor kept locking up. I had to disconnect the USB to serial adaptor from the camera and from the pc USB socket before it would work again, just unplugging it from the pc would not get it to work again. I did nothing different on this camera so I have no idea why the "Upgrade" didn't work.

I followed the procedure to flash the individual mtd partitions again, rebooted the camera and it was working again. I did another factory reset and it rebooted ok. Then I tried to do the firmware "Upgrade" again, with the same version of firmware, and this time it worked. I have no idea if the problem is due to the "Upgrade" routine not being robust enough, a dodgy flash ic or something else. So anyone doing a firmware upgrade should be aware that, apparently randomly, it may result in a bricked camera. Luckily, thanks to Lucky G., it's now easy to use the serial connector and the mtd files to get a bricked camera working again.

Interestingly with the early firmware installed SADP finds the camera and shows it as a HK-IPCAM model with firmware version v5.2.0 build 140721
 

chmodman2

n3wb
Joined
Jan 7, 2021
Messages
1
Reaction score
0
Location
California
Hello, I also have two bricked SV3C POE 1080P cameras of this model and would like to reflash them. If someone could please send me a link to the MTD files mentioned above I would appreciate it!
 

Bert Jones

n3wb
Joined
May 19, 2017
Messages
23
Reaction score
11
Hello, I also have two bricked SV3C POE 1080P cameras of this model and would like to reflash them. If someone could please send me a link to the MTD files mentioned above I would appreciate it!
I've sent you a message with the files attached.
 

mickfo

n3wb
Joined
Dec 15, 2021
Messages
2
Reaction score
0
Location
france
Hello,

With the mtd files and the how to, my SV-B01-POE-1080p camera is unbricked !

Many thanks to Bert and Lucky G.
 
Top