-
-
Notifications
You must be signed in to change notification settings - Fork 342
Description
I bought this Camera from Aliexpress:
https://www.aliexpress.com/item/1005005944052795.html
It comes with a IVG-N8S mainboard running a Novateck NT98566 SoC connected to a Sony IMX415 sensor and a FM25Q128A 16MB NOR. I’m interested in it for a security camera and the house, power board, lights, microphone and speaker make it a fairly nice unit for this. The Camera I bought comes with software branded at Xmeye, which has been truly terrible to work with! At the time of writing OpenIPC does have limited support for the Novateck NT9856, marked as work in progress. I was given a precompiled .bin to flash to the camera but my reading of the current state of the build-root firmware you can currently build for this SoC would only run a SC401AI, SC500AI or a SC501AI sensor. So I’m trying to get the IMX415 sensor working. I’ll document everything I’ve found out that might help anyone wanting to help me, including the steps that would help anyone wanting to follow in my footsteps. I’ve tried to use heading so people can skip stuff that isn’t useful for them.
Orignal software:
Although it says you have to download software to run the camrea it is possible to get a RTSP feed off it. My camrea got a ip address off my DHCP server, other say it presents on 192.168.1.10. This command worked for me:
ffmpeg -i rtsp://admin:@192.168.1.10:554/ -vcodec copy test.mp4
although I replace 192.168.1.10 with the IP it had been given on my local LAN
UART, U-BOOT and flashing new firmware:
The Xmeye firmware really does try everything it can to stop you messing with it! I didn’t even bother to try and get the camera working with its stock firmware as you had to download and install software to find it.
The UBoot doesn’t let you interrupt the boot process and the linux kernel doesn’t present a terminal on the UART once it’s loaded. Also if you try a glitch attack (shorting the NOR chip after UBoot loads but before the Kernel loads) you will still find it is password protected. So you’ll have to go straight to using a CH341A programmer and SOP8 chip adapter to flash directly to the NOR chip. My board had Write protection on each block of the NOR chip not just via the Write protection pin (3). The datasheet for the FM25Q128A is freely available and my trusty AI friend wrote me a script to unlock it, I will happily post what I have if anyone wants it. Once unlocked I was about to dump the old firmware off and flash the OpenIPC image given to me that boots up and works, albeit without an image from the sensor.
The UART is the 3 unused pad at the bottom of the board on the side with a single 6 pin connector. It is the normal 115200 baud rate and 8 bit mode.
Current State of IMX415 support and simple stuff I found:
There is a NVT_SEN_IMX415.ko driver and a sen_imx415.cfg config file in the firmware github, but they are not copied to the image by the current buildroot process. Also the current load_novetek script ignores any other sensor other than sc401a, sc500ai, sc501ai. I was able to find in the dump of the original firmware a couple of ISP config files such as isp_imx415_0.cfg. My first hope had been to simply copy the files from github onto my camera and alter the load_novatek script with the line:
insmod nvt_sen_imx415.ko sen_cfg_path=/etc/sensors/sen_imx415.cfg
This didn’t work.
One simple reason would be that the sen_imx415.cfg from the original firmware of the camera differs from the OpenIPC github file by specifying the reset pin as 0x41 not 0x40:
[MAP]
path_1 = 1 #Path 1 Enable
path_2 = 0 #Path 2 Disable
path_3 = 0 #Path 3 Disable
path_4 = 0 #Path 4 Disable
path_5 = 0 #Path 5 Disable
path_6 = 0 #Path 6 Disable
path_7 = 0 #Path 7 Disable
path_8 = 0 #Path 8 Disable
[PRESET]
id_0_expt_time = 10000 #10000us
id_0_gain_ratio = 1000 #1x gain
[DIRECTION]
id_0_mirror = 1 #mirror
id_0_flip = 1 #flip
[POWER]
id_0_mclk = 0 #CTL_SEN_CLK_SEL_SIEMCLK
id_0_pwdn_pin = 0xFFFFFFFF #no pwdn pin, C_GPIO:+0x0; P_GPIO:+0x20; S_GPIO:+0x40; L_GPIO:0x60
id_0_rst_pin = 0x41 #S_GPIO_1, C_GPIO:+0x0; P_GPIO:+0x20; S_GPIO:+0x40; L_GPIO:0x60
id_0_rst_time = 1 #1ms
id_0_stable_time = 1 #1ms
[I2C]
id_0_i2c_id = 0 #SEN_I2C_ID_1
id_0_i2c_addr = 0x1a #0x1a>> 1
Current thinking and lines of investigation:
At the moment i2cdetect doesn’t find anything on the I2C bus. There are 3 of them and all come back empty. Similarly ipctool -s comes back empty.
I am guessing it’s a pin mux problem. I was able to find the command:
echo sensor 0x220 > /proc/nvt_info/nvt_pinmux/pinmux_set
in the original firmware. I assume the pinmux_set working in the OpenIPC firmware?



