Libcamera error with pivariety camera IMX462

Hello all!
I’m trying to use a pivariety camera IMX462 (UCTRONICS) through libcamera on a raspberry pi Zero W.
I can’t make it work and really could use a bit of help.
Thanks in advance!

Here is what I’ve done so far:

  • driver and device tree compiled and installed for kernel 5.10.89+ using suplied instruction.

dmesg | grep arducam
[ 31.130841] arducam: loading out-of-tree module taints kernel.
[ 31.307229] arducam-pivariety 10-000c: firmware version: 0x10002
[ 31.804598] arducam-pivariety 10-000c: Consider updating driver arducam-pivariety to match on endpoints
[ 33.770663] arducam_vddl: disabling
[ 33.770700] arducam_vdig: disabling
[ 33.770716] arducam_vana: disabling

libcamera-still -t 5000 -o test.jpg
Preview window unavailable
[0:17:57.058808427] [521] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3389-eff9de39-dirty (2022-01-13T12:33:58+00:00)
[0:17:57.075095984] [522] WARN CameraSensor camera_sensor.cpp:197 ‘arducam-pivariety 10-000c’: Recommended V4L2 control 0x009a0922 not supported
[0:17:57.091845556] [522] WARN CameraSensor camera_sensor.cpp:249 ‘arducam-pivariety 10-000c’: The sensor kernel driver needs to be fixed
[0:17:57.094551649] [522] WARN CameraSensor camera_sensor.cpp:251 ‘arducam-pivariety 10-000c’: See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information
[0:17:57.102226911] [522] WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for ‘arducam-pivariety’
[0:17:57.103451953] [522] WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
[0:17:57.104525990] [522] WARN CameraSensor camera_sensor.cpp:396 ‘arducam-pivariety 10-000c’: Failed to retrieve the camera location
[0:17:57.105674029] [522] ERROR CameraSensor camera_sensor.cpp:535 ‘arducam-pivariety 10-000c’: Camera sensor does not support test pattern modes.
[0:17:57.150778570] [522] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file ‘arducam-pivariety.json’ not found for IPA module ‘raspberrypi’
config file:
[0:17:57.154895711] [522] ERROR IPARPI raspberrypi.cpp:187 Could not create camera helper for arducam-pivariety
[0:17:57.156238756] [522] ERROR RPI raspberrypi.cpp:1203 Failed to load a suitable IPA library
[0:17:57.158125821] [522] ERROR RPI raspberrypi.cpp:1135 Failed to register camera arducam-pivariety 10-000c: -22
ERROR: *** no cameras available ***

You need to use the ipa we provide, and you need to compile a specific version of libcamera:

Compilation instructions:

You need to expand it manually:

Thanks a lot Wong!
The patch you provide seems to be related to focus control.
I’m using the pivariety camera IMX462 low light camera which has no focus control.
Can I just use supplied ipa and recompile without the supplied patch?

It should be possible, but you still need to use the hash value provided in the patch to compile libcamera, otherwise the interface of ipa will not match libcamera.

base on libcamera commit: 2f75a7e5b8c6258dc12e9e3128cb30133f66b4f9

Thank you Wong, we switch to this commit and it work just fine.