IMX327 camera not detected on Raspberry Pi Zero 2 W with libcamera

Hi all, I’m trying to get an Arducam IMX327 low-light / Starvis camera working on a Raspberry Pi Zero 2 W, but it won’t show up at all. libcamera reports “No cameras available!” and the arducam-pivariety probe fails. Before I go further: does this camera actually work on the Pi Zero 2? I’ve followed the pivariety quick start guide but nothing is detected.

Let’s start with the basics. Can you post:

  • A photo of the cable connection at both ends
  • Your OS/kernel and libcamera package versions
  • /boot/config.txt
  • The output of ls /dev/video* and i2cdetect -y -r 10

That’ll help us see whether the sensor is even being found on I2C.

Here’s the cable as it’s currently connected:

image0.jpeg

Environment:

  • Model: Raspberry Pi Zero 2 W Rev 1.0
  • Hardware: BCM2835; Revision: 902120; Serial: 000000006d52fac7
  • hostname: raspberrypi
  • uname -r: 6.1.21-v7+
  • uname -a: Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
  • OS: Raspbian GNU/Linux 11 (bullseye)
  • libcamera packages:
    • libcamera-apps 1.2.1-1 armhf
    • libcamera-tools 0~git20230720+bde9b04f-1 armhf
    • libcamera0:armhf 0~git20230720+bde9b04f-1 armhf
    • python3-libcamera 0~git20230720+bde9b04f-1 armhf

Thanks. Could you also paste /boot/config.txt and list what’s in /boot/overlays and the media/i2c kernel module directory? I want to confirm the overlay and driver files are actually there for that kernel.

/boot/config.txt:

camera_auto_detect=0
display_auto_detect=1
dtoverlay=vc4-kms-v3d
max_framebuffers=2
dtoverlay=arducam-pivariety

/boot/overlays contains:

arducam-64mp.dtbo
arducam-pivariety.dtbo
imx219.dtbo
imx258.dtbo
imx290.dtbo
imx296.dtbo
imx327.dtbo
imx378.dtbo
imx462.dtbo
imx477.dtbo
imx519.dtbo
imx708.dtbo

/lib/modules/$(uname -r)/kernel/drivers/media/i2c contains:

arducam_64mp.ko.xz
arducam-pivariety.ko.xz
imx219.ko.xz
imx258.ko.xz
imx290.ko.xz
imx296.ko.xz
imx477.ko.xz
imx519.ko.xz
imx708.ko.xz
etc.

Everything looks present so far. Now run these and paste the full output:

  • ls /dev/video*
  • libcamera-still --list-cameras
  • i2cdetect -y -r 10
  • dmesg | grep arducam

Also try an actual capture: libcamera-still -n -t 1000 -o arducam-test.jpg --width 1920 --height 1080, then check if arducam-test.jpg exists.

Outputs below.

ls /dev/video*:

/dev/video10 /dev/video11 /dev/video12 /dev/video13 /dev/video14 /dev/video15 /dev/video16 /dev/video18 /dev/video20 /dev/video21 /dev/video22 /dev/video23 /dev/video31

libcamera-still --list-cameras:

No cameras available!

i2cdetect -y -r 10:

no devices detected (all --)

dmesg | grep arducam:

[    0.056804] platform 3f801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/arducam_pivariety@c
[   12.869623] arducam-pivariety 10-000c: pivariety_read: Reading register 0x103 failed
[   12.869666] arducam-pivariety 10-000c: probe failed

Capture test:

libcamera-still -n -t 1000 -o arducam-test.jpg --width 1920 --height 1080
[0:03:09.454982921] [1195]  INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
ERROR: *** no cameras available ***

ls -lh arducam-test.jpg:

ls: cannot access 'arducam-test.jpg': No such file or directory

The I2C scan returning all dashes means the sensor isn’t answering on address 0x0c at all, which usually points to wiring/cable rather than software. What else have you tried with the cable so far, and exactly which install steps did you follow?

Things I’ve tried:

  • Installed libcamera_dev and libcamera_apps from steps 1-3 of the pivariety quick start guide.
  • Changed to dtoverlay=arducam-pivariety.
  • Did not do step 4 or beyond (the guide notes latest Bullseye already covers that).
  • Turned the cable over at the camera end: the Pi won’t boot. Changed to another cable and it also won’t boot.
  • Tried the new cable in every orientation: silver up CPU, silver down CPU, silver up camera, silver down camera.
  • Noted the IMX462 (the sensor in the B0444 board) isn’t listed on the native-camera libcamera user guide, but it is shown on the pivariety IMX462 page.

Looking at the photo you posted, that looks like a peer cable, not a camera cable. That would explain everything, including the Pi refusing to boot when you flipped the cable around — a peer cable can short the Pi.

For this camera on a Pi Zero 2 you need a proper 22-pin to 22-pin camera cable (0.5mm pitch). I’ve sent you a picture of the correct cable privately so you can compare the connector ends. Swap that in and the sensor should finally respond on I2C.

Thanks. Can you clarify what ‘peer cable’ actually means? I’m pretty sure these cables came with the cameras when I ordered them, so I assumed they were the right ones. What’s the difference I should be looking for between what I have and the 22-pin to 22-pin camera cable?

I’ve sent you a marked-up version of your photo privately with arrows on the parts to compare. Short version: the cable in your photo is a peer cable — the connector/pin arrangement is different from the correct 22-pin to 22-pin camera cable. Look at the areas I pointed to and compare them with the reference picture from my previous message; the contact layout doesn’t match.

Success! Replacing the peer cable with the correct camera cable did the trick — preview works now. I honestly didn’t realize there was a difference between a peer cable and a camera cable, so it might be worth adding a note about that on the wiki.

The only remaining output is these warnings/error at startup:

WARN CameraSensorProperties camera_sensor_properties.cpp:261 No static properties available for 'arducam-pivariety'
WARN CameraSensorProperties camera_sensor_properties.cpp:263 Please consider updating the camera sensor properties database
ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'arducam-pivariety.json' not found for IPA module 'rpi/vc4'

Setup now: Pi Zero 2 W + IMX327, libcamera v0.0.0+4367-ad9428b4, dtoverlay=arducam-pivariety, libcamera-apps/-dev installed from steps 1-3 of the guide.

Glad the cable swap fixed detection. Those warnings are worth checking but let’s see the full startup log — can you paste the complete libcamera output from a run after the swap?

Here’s the full log:

[0:06:36.987365635] [1232]  INFO Camera camera_manager.cpp:297 libcamera v0.0.0+4367-ad9428b4
[0:06:37.026203506] [1234]  WARN CameraSensorProperties camera_sensor_properties.cpp:261 No static properties available for 'arducam-pivariety'
[0:06:37.026308089] [1234]  WARN CameraSensorProperties camera_sensor_properties.cpp:263 Please consider updating the camera sensor properties database
[0:06:37.085490490] [1234] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'arducam-pivariety.json' not found for IPA module 'rpi/vc4'
[0:06:37.425150195] [1234]  INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/arducam_pivariety@c to Unicam device /dev/media2 and ISP device /dev/media0
[0:06:37.425290819] [1234]  INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:06:37.426876232] [1232]  INFO Camera camera.cpp:1033 configuring streams: (0) 960x540-YUV420
[0:06:37.471983512] [1234]  INFO RPI vc4.cpp:572 Sensor: /base/soc/i2c0mux/i2c@1/arducam_pivariety@c - Selected sensor format: 1920x1080-SRGGB10_1X10 - Selected unicam format: 1920x1080-pRAA

Good, the important line is:

Registered camera /base/soc/i2c0mux/i2c@1/arducam_pivariety@c to Unicam device /dev/media2 and ISP device /dev/media0

That confirms the sensor is now probing correctly after the cable swap.

The warnings are harmless for this setup. “No static properties available” and the missing ‘arducam-pivariety.json’ just mean the libcamera sensor-properties database and IPA config don’t have an entry for this overlay name. The pipeline falls back to the default rpi_apps.yaml (visible in your log) and still negotiates 1920x1080-SRGGB10_1X10, so preview/capture work despite them.

Summary: root cause was the peer cable. Replacing it with the correct 22-pin to 22-pin camera cable fixed detection. I’ll pass along the suggestion to add a cable-type note to the wiki so others don’t hit the same confusion.