Libcamera-still fails with arducam-pivariety.json error on Raspberry Pi 4B with AR0234

Hi, I’m stuck getting an AR0234 camera (module B0353) to work on a Raspberry Pi 4B with 4GB RAM. libcamera-still -t 5000 -o test.jpg errors out and it looks like it can’t find the arducam-pivariety.json file.

Setup: fresh Raspberry Pi OS Full (armhf) image from Index of /raspios_full_armhf/images/raspios_full_armhf-2022-09-26, written to the SD card with win32diskimager, inserted into the Pi 4B, booted, went through the initial configuration, then rebooted.

Then I ran:

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_dev
./install_pivariety_pkgs.sh -p libcamera_apps
libcamera-still -t 5000 -o test.jpg

The error is still on the arducam-pivariety.json file. The install script printed:

pi@ubuntu:~ $ ./install_pivariety_pkgs.sh -p libcamera_dev
Hardware Revision: c03112
Kernel Version: 5.10.17-v7l+
OS Codename: buster
ARCH: armv7l

And the errors are:

[0:10:31.837917943] [1835] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'arducam-pivariety.json' not found for IPA module 'raspberrypi'
[0:10:32.461672444] [1835] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/video0

Does anyone know which directory arducam-pivariety.json is supposed to be in? Screenshots attached:
image_44394082271667538340685.png
image001.png
image_47882750521667523999190.png

Hi! First thing to check: did you install the pivariety kernel driver as well, or only the libcamera parts? -p libcamera_dev and -p libcamera_apps on their own won’t bring the camera up — the AR0234 on a pivariety board needs the pivariety kernel driver installed before libcamera can talk to it properly. If you skipped that step, here’s the guide:
https://www.arducam.com/docs/cameras-for-raspberry-pi/pivariety/how-to-install-kernel-driver-for-pivariety-camera/

Run that, reboot, then try libcamera-still -t 5000 -o test.jpg again. If it still fails, paste the whole output (not just the two ERROR lines) so we can see what the sensor is doing.

Thanks. In that run I only did libcamera_dev and libcamera_apps, I didn’t run the kernel_driver step. But adding context, because I’ve been fighting this for a while.

Before all this I tried building everything from source. The v4l2 side works fine that way:

sudo apt update
sudo apt install -y libboost-dev libgnutls28-dev openssl libtiff5-dev qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 meson libegl1-mesa-dev cmake libboost-program-options-dev libdrm-dev libexif-dev libegl1-mesa-dev
sudo pip3 install pyyaml ply
sudo pip3 install --upgrade meson
cd ~
git clone git://linuxtv.org/libcamera.git
cd libcamera
meson build
cd build
meson configure -Dpipelines=raspberrypi -Dtest=false
cd ..
ninja -C build
cd ~
wget https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/ipa-v0.01/ipa_rpi.tar.xz
tar xvf ipa_rpi.tar.xz
cp ipa_rpi.so libcamera/build/src/ipa/raspberrypi/
cd libcamera && sudo ninja -C build install
git clone https://github.com/anholt/libepoxy.git
cd libepoxy
mkdir _build
cd _build
meson
ninja
sudo ninja install
git clone https://github.com/raspberrypi/libcamera-apps.git
cd libcamera-apps
mkdir build
cd build
cmake ..
make -j4
sudo make install

And that ended with libcamera-still -t 5000 -o test.jpg failing: could not find libcamera-app.so.0.0.0. Screenshots from that attempt:
image001.png
image_44394082271667538340685.png
image_47882750521667523999190.png

That explains the json error. libcamera is seeing the sensor node (arducam-pivariety 10-000c), but the IPA module can’t find its tuning file arducam-pivariety.json and there are no static sensor properties registered for it — that’s the usual sign the pivariety kernel driver wasn’t installed through the supported path. The manual source build (ninja + dropping ipa_rpi.so in by hand, then building libcamera-apps yourself) is an old approach and it’s exactly what leaves you with the libcamera-app.so.0.0.0 breakage, because libcamera and libcamera-apps end up out of sync.

Please do a clean run, don’t mix the source build with the packaged install:

  1. Re-flash the stock raspios_full_armhf-2022-09-26 image (or at minimum remove the manual libcamera install).
  2. Run the script with the kernel driver first:
./install_pivariety_pkgs.sh -p kernel_driver
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps
  1. Reboot, then libcamera-still -t 5000 -o test.jpg.

Post the full console output if it still errors out.

Ok, did it in that order this time:

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 kernel_driver
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps
libcamera-still -t 5000 -o test.jpg

Installation completed without errors, every step finished successfully. Then libcamera-still -t 5000 -o test.jpg errors.

System is identical to what you asked for: Hardware Revision: c03112, Kernel Version: 5.10.17-v7l+, OS Codename: buster, ARCH: armv7l.

Ok, can you paste the whole libcamera-still output this time? I want to see what happens before it errors — whether the sensor gets probed, which mode it picks, and where it stops. The two ERROR lines alone don’t tell us enough.

Here’s the full run:

[0:10:31.798082008] [1832]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3139-5baab39e
[0:10:31.801607743] [1835]  WARN CameraSensor camera_sensor.cpp:197 'arducam-pivariety 10-000c': Recommended V4L2 control 0x009a0922 not supported
[0:10:31.822566400] [1835]  WARN CameraSensor camera_sensor.cpp:249 'arducam-pivariety 10-000c': The sensor kernel driver needs to be fixed
[0:10:31.822716989] [1835]  WARN CameraSensor camera_sensor.cpp:251 'arducam-pivariety 10-000c': See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information
[0:10:31.824235733] [1835]  WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for 'arducam-pivariety'
[0:10:31.824342027] [1835]  WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
[0:10:31.824428914] [1835]  WARN CameraSensor camera_sensor.cpp:414 'arducam-pivariety 10-000c': Failed to retrieve the camera location
[0:10:31.837917943] [1835] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'arducam-pivariety.json' not found for IPA module 'raspberrypi'
[0:10:32.461672444] [1835] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/video0
[0:10:32.463838062] [1832]  INFO Camera camera.cpp:937 configuring streams: (0) 960x600-YUV420
[0:10:32.464143944] [1835]  INFO RPI raspberrypi.cpp:122 Mode: 1920x1200 fmt BA10 Score: 1890 (best 1890)
[0:10:32.464354606] [1835]  INFO RPI raspberrypi.cpp:122 Mode: 1920x1080 fmt BA10 Score: 1926.67 (best 1890)
[0:10:32.464528102] [1835]  INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt BA10 Score: 1676.67 (best 1676.67)
[0:10:32.464704913] [1835]  INFO RPI raspberrypi.cpp:122 Mode: 1920x1200 fmt pgAA Score: 1390 (best 1390)
[0:10:32.464873650] [1835]  INFO RPI raspberrypi.cpp:122 Mode: 1920x1080 fmt pgAA Score: 1426.67 (best 1390)
[0:10:32.465044239] [1835]  INFO RPI raspberrypi.cpp:122 Mode: 1280x720 fmt pgAA Score: 1176.67 (best 1176.67)
[0:10:32.588520153] [1835]  INFO RPI raspberrypi.cpp:624 Sensor: /base/soc/i2c0mux/i2c@1/arducam@0c - Selected mode: 1280x720-pgAA
[0:10:32.636542835] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: Sharpness = 1.000000
[0:10:32.636719423] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: Saturation = 1.000000
[0:10:32.636796588] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: Contrast = 1.000000
[0:10:32.636869716] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: Brightness = 0.000000
[0:10:32.636936381] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: FrameDurationLimits = [ 33333, 33333 ]
[0:10:32.637020157] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: NoiseReductionMode = 3
[0:10:32.637109711] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: AeMeteringMode = 0
[0:10:32.637177691] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: AeExposureMode = 0
[0:10:32.637273263] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: ExposureValue = 0.000000
[0:10:32.637400630] [1839]  INFO IPARPI raspberrypi.cpp:633 Request ctrl: AwbMode = 0
[0:10:32.641357634] [1835]  INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:10:32.641506223] [1835]  INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:10:32.641615036] [1835]  INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:10:32.641776217] [1835]  INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0

It hangs there after the last line and never finishes, I have to Ctrl-C out of it.

So the driver is at least probing — you can see arducam-pivariety 10-000c and the sensor gets resolved at /base/soc/i2c0mux/i2c@1/arducam@0c, and it even picks a mode (1280x720-pgAA). But libcamera still warns that the sensor kernel driver needs fixing, there are no static sensor properties for arducam-pivariety, and the IPA can’t find arducam-pivariety.json. The DelayedControls error on control 0x009a090a (that’s the analogue gain control) also points at the sensor driver side.

Can you run these on the freshly rebooted system and paste the output?

uname -a
dmesg | grep -i -E 'arducam|pivariety'
ls /usr/share/libcamera/ipa/raspberrypi/
ls /boot/overlays/ | grep -i ardu
lsmod | grep -i ardu

Specifically, if arducam-pivariety.json isn’t listed under /usr/share/libcamera/ipa/raspberrypi/, then the libcamera_dev package didn’t land where libcamera expects it, and the pivariety driver install likely didn’t complete the way it should have.

I’ve now been through the whole sequence a few times and I can’t get it past this point. A few things:

  • Could you provide an SD card image of a working Raspberry Pi with the AR0234 set up (OS + driver + libcamera parts) hosted somewhere for download? A lot of core-board vendors do exactly that, and it would remove all the guesswork. All I want is a system where libcamera-still works and OpenCV capture works.
  • The documented procedure doesn’t seem to match what’s actually online anymore — the install script versions may have changed since it was written. Has this install procedure been verified recently by one of your own engineers?
  • If an engineer could walk me through this, I’ve left my contact details in a private message.

For reference, I’m on the image and kernel you asked for: Hardware Revision: c03112, Kernel Version: 5.10.17-v7l+, OS Codename: buster, ARCH: armv7l. And just to repeat the reproduction one more time:

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 kernel_driver
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps
libcamera-still -t 5000 -o test.jpg

Every install step reports success and no errors, and then the capture command still errors/hangs. I’d really like to know how the pivariety kernel driver step is meant to end up registering the sensor so the raspberrypi IPA can load its json.

Here’s where this stands:

  • The AR0234 (B0353) on the pivariety board only gets recognized properly by libcamera once the pivariety kernel driver is installed first, on a clean image. libcamera_dev + libcamera_apps alone aren’t enough — that’s what produced the missing arducam-pivariety.json for IPA module ‘raspberrypi’ in the very first run. Install order should be -p kernel_driver, then -p libcamera_dev, then -p libcamera_apps, then reboot. Guide:
    Redirecting...

  • Don’t combine the packaged install with the manual source build (ninja + copying ipa_rpi.so + building libcamera-apps by hand). That mix is what gave you the earlier could not find libcamera-app.so.0.0.0 failure — libcamera and libcamera-apps have to come from the same source.

  • Still unresolved: even with all three script steps reporting success, libcamera-still probes the sensor, resolves /base/soc/i2c0mux/i2c@1/arducam@0c, selects 1280x720-pgAA, then warns ‘The sensor kernel driver needs to be fixed’ / ‘No static properties available’ / missing json, throws the DelayedControls error on 0x009a090a, and then hangs on ‘No buffers available for ISP Output0’.

To move it forward we need the output of these commands from the freshly rebooted system:

uname -a
dmesg | grep -i -E 'arducam|pivariety'
ls /usr/share/libcamera/ipa/raspberrypi/
ls /boot/overlays/ | grep -i ardu
lsmod | grep -i ardu

That will tell us whether the kernel driver/overlay actually loaded and whether arducam-pivariety.json was installed to the IPA path. Please also double-check the libcamera version string in your output — libcamera v0.0.0+3139-5baab39e should match whatever libcamera_dev package the script pulled, otherwise an older manual install may still be shadowing it.

Your two suggestions — a ready-to-write SD image with the AR0234 already working, and having the install docs re-checked against the current script versions by engineering — are reasonable and worth raising separately. For the walkthrough request, please use the private message channel rather than posting contact details in the thread. Post the command outputs above and we’ll take it from there.