IMX462 libcamera driver / media controller or not?

  • Where did you get the camera module(s)?
    Amazon

  • Model number of the product(s).
    B0333/B0444

  • What hardware/platform were you working on?
    rPi Zero 2 W, OS 6.1.21

  • Instructions you have followed. (link/manual/etc.)
    pivariety quick start guide

  • Problems you were having.
    I was following the guide to install the libcamera package. libcamera apps work fine until I added the “media-controller=0” to the last line of /boot/config.txt, as the guide instructed. I’d like to be able to adjust exposure and analogur gain through the v4l2-ctl tool which seems requiring enable the media-controller. But then libcamera app stopped working. Also the gstreamer stopped working too. I guess it’s because it depends on libcamera.

The error messages when invoke libcamera app::
pi@rpi02w:~/test $ libcamera-still -t 0
Made X/EGL preview window
[0:02:13.058914725] [1453] INFO Camera camera_manager.cpp:297 libcamera v0.0.0+4367-ad9428b4
[0:02:13.201819776] [1455] WARN CameraSensorProperties camera_sensor_properties.cpp:261 No static properties available for ‘arducam-pivariety’
[0:02:13.201958739] [1455] WARN CameraSensorProperties camera_sensor_properties.cpp:263 Please consider updating the camera sensor properties database
[0:02:13.363688084] [1455] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file ‘arducam-pivariety.json’ not found for IPA module ‘rpi/vc4’
[0:02:13.741238924] [1455] ERROR RPI vc4.cpp:418 Unicam driver does not use the MediaController, please update your kernel!
[0:02:13.741472942] [1455] ERROR RPI vc4.cpp:219 Failed to register camera arducam-pivariety 10-000c: -22
ERROR: *** no cameras available ***

  • The dmesg log from your hardware.
    pi@rpi02w:~ $ dmesg |grep arducam
    [ 0.114866] platform 3f801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/arducam_pivariety@c
    [ 12.996471] arducam-pivariety 10-000c: firmware version: 0x10002
    [ 13.151864] arducam-pivariety 10-000c: Consider updating driver arducam-pivariety to match on endpoints

  • Troubleshooting attempts you’ve made.
    I’m followingthe guide closely. So not sure what else to try.

  • What help do you need?
    Eventually I’ll need to capture frames from the image sensor (IMX462) and feed them to my openCV program. I’d also like to have the ability to change exposure/gain based on the frame received. So what’s the right path? Should this concern me that the v4l2-ctl and libcamera can’t work together? Also do you have any guide for integrating with openCV?
    Thanks!

@wandmaker

Please do not add media-controller .

And here a example:

Ok, I’ll leave it out.
But the guide specifically says: “Please manually add dtoverlay=arducam-pivariety,media-controller=0 at the end of the last line of config.txt file”.
Maybe the guide should be updated. Or maybe I misunderstood it. The v4l2 tools shouldn’t be used at all?

On the IMX462 image sensor, I can’t find any info regarding the valid values for the --shutter and --gain as in command like: libcamera-still --shutter xxxx --gain yyy. I understand there’s digital gain. But I’d like to know what the analogue gain is for IMX462.

Our openCV application was written in C/C++. So I’ll have to do the integration in C/C++ as well. Is the libcamera API the way to go? Is there any other way? Do you have example, or any info regarding that?

Thanks for your help!

Frankly, I want to raise this question again. What do you think is the most practical way to use this camera for our C++ applications?