Minimum framerate and maximum exposure time on Arducam IMX462 PiVariety

You can try to install this libcamera.
libcamera-0.0.3-dev-buster-armhf.deb (596.1 KB)

sudo dpkg -i libcamera-0.0.3-dev-buster-armhf.deb

Hi @wong, after I install the libcamera-0.0.3-dev-buster-armhf.deb, I have following message when trying to restart camera.
[0:00:46.580221323] [973] WARN IPAManager ipa_manager.cpp:149 No IPA found in ‘/usr/local/lib/arm-linux-gnueabihf/libcamera’
[0:00:46.580407471] [973] INFO Camera camera_manager.cpp:293 libcamera v0.0.0
[0:00:46.586461619] [978] WARN CameraSensor camera_sensor.cpp:197 ‘arducam-pivariety 10-000c’: Recommended V4L2 control 0x009a0922 not supported
[0:00:46.600382897] [978] WARN CameraSensor camera_sensor.cpp:249 ‘arducam-pivariety 10-000c’: The sensor kernel driver needs to be fixed
[0:00:46.600472360] [978] WARN CameraSensor camera_sensor.cpp:251 ‘arducam-pivariety 10-000c’: See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information
[0:00:46.603711879] [978] WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for ‘arducam-pivariety’
[0:00:46.603784416] [978] WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
[0:00:46.603831582] [978] WARN CameraSensor camera_sensor.cpp:414 ‘arducam-pivariety 10-000c’: Failed to retrieve the camera location
[0:00:46.603965971] [978] ERROR RPI raspberrypi.cpp:1030 Failed to load a suitable IPA library
Segmentation fault

I am not able anymore to make the camera working…

And I confirm that camera is still there : [ 5.958048] arducam: loading out-of-tree module taints kernel.
[ 5.975224] arducam-pivariety 10-000c: firmware version: 0x10002
[ 31.836135] arducam_vddl: disabling
[ 31.836158] arducam_vdig: disabling
[ 31.836187] arducam_vana: disabling

Even after trying to reinstall the libcamera_dev package. It is not working.

Any idea ?

Thanks

It seems that the currently installed version conflicts with the previous version, you need to manually uninstall the previous version and then reinstall it:
sudo apt remove libcamera-dev

@wong, not working event after libcamera-dev remove. Segmentation fault.

This looks weird, we tested it on bullseye, I think we need to test it again on buster, can you tell me your kernel version and SD card Image link?
I would test on the same system as you.

Sorry for not replying so well, @watchever , we tested you image, and found dev and apps version mismatch.
You can reinstall apps using our install script.

wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
./install_pivariety_pkgs.sh -p libcamera_apps

Hope this helps you

Thanks @Edward, so the steps to follow are :

  • Remove the libcamera_dev : sudo apt remove libcamera-dev
  • Install libcamera-0.0.3-dev-buster-armhf.deb
  • Reinstall libcamera_apps : ./install_pivariety_pkgs.sh -p libcamera_apps

Is it correct ?

Thanks

@watchever
It’s not that complicated.
Just execute my command above.
And you also don’t need to restart after the update, you can use it directly.
By the way, the steps you mentioned above are also very correct and standardized.

@Edward , thanks I test it and let you know. Best regards

@Edward, not working still the same problem. The libcamera-still works, but the capture_demo.py send Segmentation Fault.

Following is the error messages :

[0:06:01.877395357] [1217] WARN IPAManager ipa_manager.cpp:149 No IPA found in ‘/usr/local/lib/arm-linux-gnueabihf/libcamera’
[0:06:01.877630041] [1217] INFO Camera camera_manager.cpp:293 libcamera v0.0.0
[0:06:01.881080560] [1222] WARN CameraSensor camera_sensor.cpp:197 ‘arducam-pivariety 10-000c’: Recommended V4L2 control 0x009a0922 not supported
[0:06:01.896004664] [1222] WARN CameraSensor camera_sensor.cpp:249 ‘arducam-pivariety 10-000c’: The sensor kernel driver needs to be fixed
[0:06:01.896316274] [1222] WARN CameraSensor camera_sensor.cpp:251 ‘arducam-pivariety 10-000c’: See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information
[0:06:01.899348257] [1222] WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for ‘arducam-pivariety’
[0:06:01.899612571] [1222] WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
[0:06:01.899821107] [1222] WARN CameraSensor camera_sensor.cpp:414 ‘arducam-pivariety 10-000c’: Failed to retrieve the camera location
[0:06:01.900157772] [1222] ERROR RPI raspberrypi.cpp:1030 Failed to load a suitable IPA library
Erreur de segmentation

Hi @wong, I have a very big issue with all new IMX462 sensor I receive from you. They all seem to arrive with following release of firmware. So it means that is should integrate the 1000ms exposure, but this is not the case.

[ 6.746127] arducam: loading out-of-tree module taints kernel.
[ 6.760026] arducam-pivariety 10-000c: firmware version: 0x10002
[ 31.836021] arducam_vddl: disabling
[ 31.836065] arducam_vdig: disabling
[ 31.836105] arducam_vana: disabling

Moreover, the sensor does not answer to exposure modification or other parameter modification even if the API logs that it receives the request… This is really really big issue and stop my project and prototype sending to beta tester.

[0:12:42.202069806] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: NoiseReductionMode = 0
[0:12:42.202222695] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Contrast = 2.800000
[0:12:42.202362972] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Saturation = 1.000000
[0:12:42.202431509] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Brightness = 1.000000
[0:12:42.202494213] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: AnalogueGain = 200.000000
[0:12:42.202560379] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Sharpness = 0.000000
[0:12:42.202624935] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: ExposureTime = 200000

I use your libcamera_python release 1.0.1. libcamera API log that it receives the request, but camera does not answer.
I start my application with the following camera parameters and camera seems to initialize correctly (except exposure that seems to be less than 700ms).

[0:12:25.601703304] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: NoiseReductionMode = 0
[0:12:25.602199711] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: AnalogueGain = 200.000000
[0:12:25.602498562] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Saturation = 1.000000
[0:12:25.602769098] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Contrast = 2.800000
[0:12:25.603023227] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: AeEnable = false
[0:12:25.603270245] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Sharpness = 0.000000
[0:12:25.603520022] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: ExposureTime = 700000
[0:12:25.603773855] [1137] INFO IPARPI raspberrypi.cpp:654 Request ctrl: Brightness = 1.000000

Just to let you know that few first IMX462 sensors I receive with 0x10001 firmware version that I upgrade with the firmware you send me to get the 1000ms exposure are all properly working on the same configuration. So I guess the issue is coming from the camera firmware ?

Is it possible to receive the previous firmware 0x10001 and force a downgrade ?

Thanks

I emailed a newer version of the firmware (not the old version), you can try it, if it still doesn’t work, we can rebuild an old version of the firmware for you.

Thanks @wong But do you also get the same problem with your libcamera python library on Raspberry ? I must add that the previous sensors I got with your first firmware upgrade work fine.

@watchever Sorry

libcamera-python-1.0.1_library.zip - Google 云端硬盘

You can install above libcamera python to solve this problem

# For python3. 
python3 -m pip install libcamera-1.0.1-cp37-cp37m-linux_armv7l.whl
# For python2. 
python2 -m pip install libcamera-1.0.1-cp27-cp27mu-linux_armv7l.whl

we didn’t test in your example, in our example written here it works fine.

If this doesn’t work you can send us your program to try.

Sorry again,for reply too late.

Hi @wong, I have started from a new fresh install Raspberry : Raspian 5.15, python 3.9, libcamera_python_1.0.2, I update the camera with the firmware you sent me.
The capture_demo.py starts correctly but it is not possible to get longer exposure than 200ms.
Can you please test on your side (on a raspberry) and tell me if you can get longer exposure than 200ms.
I have just changed following line in capture_demo.py :

        #frame_time = 1000000 // framerate
        #cam.set(libcamera.FrameDurationLimits, [frame_time, frame_time])
        cam.set(libcamera.ExposureTime, 10000000)

I have also tried by changing same lines with following lines, but it is the same…

        #frame_time = 1000000 // framerate
        cam.set(libcamera.FrameDurationLimits, [33000, 10000000])
        cam.set(libcamera.ExposureTime, 10000000)

And it is the same with libcamera-still --shutter 10000000, cannot get more than 200ms exposure.

Your help would be greatly appreciated on this big issue for my project

@wong , when I use command ‘’‘v4l2-ctl --list-ctrls’’’, that’s what I get on my system that works for 1000 ms of exposure,

                       exposure 0x00980911 (int)    : min=1 max=1048573 step=1 default=1022 value=1022
                     frame_rate 0x00981906 (int)    : min=1 max=60 step=1 default=60 value=60

but when I do the same for the other systems that does not work, I get following informations, which means I cannot get less than 5 fps.

                      exposure 0x00980911 (int)    : min=1 max=1048573 step=1 default=1022 value=1022
                     frame_rate 0x00981906 (int)    : min=5 max=60 step=1 default=60 value=60

Maybe my problem comes from there ? How can I force v4l2 settings and save them ?

You can ignore the frame rate ctrl, we don’t use it directly, we use vblank to control the frame rate and exposure to control the exposure, from the information you provided, the exposure range is correct.
This is a little weird, we tested libcamera-still in detail and made sure it worked.
Can you execute libcamera-still -v -t 5000 -o test.jpg --shutter 10000000 and send me the output?

Hi @wong, at least I was able to make it work for one sensor (after so many hours spend to install, reinstall,…) but I am not sure I will get the same result with other sensors.
The problem comes from sensor firmware and only sensor firmware. For an unknow reason the update firmware process does not work properly. It says everything successful but I suspect some update stages are not fullfill… I find a way (but I have to make a second try to be sure) to force fully firmware update.
Can you try to update an IMX462 sensor with early 0x10002 firmware release on raspberry and let me know if you confirm update works ?
Thanks

We tested it, probably due to not many testing tests, we didn’t have this problem, we will do more testing.
Also can you provide the log output when updating? There is some information in there that I can use to confirm the update status.

Hi @wong following is the update message displayed. Just to let you know that all new sensors I received are under 0x10002 version and don’t accept more than 200ms of exposure.