Hi all,
I have a chinese IP Camera (PN BRIP5AF) with Hi3516EV300 + SONY IMX335 on board marked as 85H50AI. I think these are common cameras.
One day the camera stopped working, I found out the data on flash is corrupt and the system cannot boot. I tried reflashing it via U-Boot, but turns out the memory chip was damaged (verification errors, very slow write...). The original chip was XT25F128B, I couldn't find any source for this so I replaced it with Winbond's W25Q128FV. I flashed U-Boot into it, soldered it on board and flashed the firmware via TFTP. But the camera always hangs after loading the kernel:
I tried many firmware files marked as follows: General_IPC_HI3516EV300_85H50AI.Nat.dss.OnvifS.HIK_V5.00.R02.20200102_all.bin, with different release dates, but the result is the same.
I successfully flashed the OpenIPC firmware, it was working. I take it as a proof that the hardware is OK. I wouldn't mind keeping the OpenIPC, but I can't figure out how to set the automatic night mode - the correct combination of GPIOs for switching the IR LEDs and IRcut filter. I tried all the combinations from OpenIPC wiki, it just doesn't work for me. Also the image parameters setting in OpenIPC is just basic compared to stock FW.
I've done this procedure a couple of times with different IP cameras (hi3516ev100 etc.) with success (although the flash chip wasn't changed or the same type was used).
Does anyone know if the exchange of SPI flash for different type can cause this issue and if so, is there a way how to make it work with W25Q128?
Or any other idea how to make this work again?
I have a chinese IP Camera (PN BRIP5AF) with Hi3516EV300 + SONY IMX335 on board marked as 85H50AI. I think these are common cameras.
One day the camera stopped working, I found out the data on flash is corrupt and the system cannot boot. I tried reflashing it via U-Boot, but turns out the memory chip was damaged (verification errors, very slow write...). The original chip was XT25F128B, I couldn't find any source for this so I replaced it with Winbond's W25Q128FV. I flashed U-Boot into it, soldered it on board and flashed the firmware via TFTP. But the camera always hangs after loading the kernel:
Code:
System startup
Uncompress Ok!
U-Boot 2016.11-g2fc5f58-dirty (Sep 06 2019 - 15:28:14 +0800)hi3516ev300
Relocation Offset is: 0771b000
Relocating to 47f1b000, new gd at 47edaef0, sp at 47edaed0
SPI Nor: eFlashType: 3.
Flash Name: XM_W25Q128FV, W25Q128JV{0xEF4018), 0x1000000.
@hifmc_spi_nor_probe(), XmSpiNor_ProtMgr_probe(): OK.
@XmSpiNor_enableQuadMode(), Disable Quad Failed, SRx: [2, 0x2].
CONFIG_CLOSE_SPI_8PIN_4IO = y.
read->iftype[0: STD, 1: DUAL, 2: DIO, 3: QUAD, 4: QIO]: 1.
Current level[0], lock_level_max:7.
unlock all.
SRx val: {[1, 0x20], [1, 0x2], [1, 0x80], [0, 0x0]}.
In: serial
Out: serial
Err: serial
Net: eth0
Hit ctrl+c to stop autoboot: 0
@do_spi_flash_probe() flash->erase_size:65536
device 0 offset 0x40000, size 0x550000
SF: 5570560 bytes @ 0x40000 Read: OK
srcAddr 0x43000000, dstAddr 0x42000000
created_inode 0x47edb800
find_squashfs_file: name bin, start_block 0, offset 2001, type 1
find_squashfs_file: name boot, start_block 0, offset 2197, type 1
read inode: name boot, sb 0, of 2197, type 1
find_squashfs_file: name uImage, start_block 0, offset 2033, type 2
read inode: name uImage, sb 0, of 2033, type 2
write_file: regular file, blocks 33
len 2117248
### FS load complete: 2117248 bytes loaded to 0x42000000
## Booting kernel from Legacy Image at 42000000 ...
Image Name: Linux-4.9.37
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2117184 Bytes = 2 MiB
Load Address: 40008000
Entry Point: 40008000
Loading Kernel Image ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
I tried many firmware files marked as follows: General_IPC_HI3516EV300_85H50AI.Nat.dss.OnvifS.HIK_V5.00.R02.20200102_all.bin, with different release dates, but the result is the same.
I successfully flashed the OpenIPC firmware, it was working. I take it as a proof that the hardware is OK. I wouldn't mind keeping the OpenIPC, but I can't figure out how to set the automatic night mode - the correct combination of GPIOs for switching the IR LEDs and IRcut filter. I tried all the combinations from OpenIPC wiki, it just doesn't work for me. Also the image parameters setting in OpenIPC is just basic compared to stock FW.
I've done this procedure a couple of times with different IP cameras (hi3516ev100 etc.) with success (although the flash chip wasn't changed or the same type was used).
Does anyone know if the exchange of SPI flash for different type can cause this issue and if so, is there a way how to make it work with W25Q128?
Or any other idea how to make this work again?