Arducam Pivariety HAT with four mono cameras on Pi 4 64-bit: black frames, I2C timeouts

Hi everyone, I’ve been banging my head against this for a while now. I’ve got an Arducam Pivariety HAT with four monochrome Arducam cameras on a Raspberry Pi 4, and I’m trying to get the whole thing running on a 64-bit OS. The only setup I can get working is an old 32-bit stack. Anything newer than that just fails on me. Has anyone managed to get this exact combo working on 64-bit?

Welcome to the forum. Can you give us a bit more detail? Specifically: which 32-bit image/kernel/driver combo actually works for you, and which 64-bit versions have you tried so far? If you’ve got any logs from the failures (dmesg, camera startup output), that would help a lot.

Sure. The known working combo for me is 2022-01-28-raspios-bullseye 32-bit with the old Arducam driver v2.0 (arducam_obisp_camera_driver.tar.gz from the Arducam_OBISP_MIPI_Camera_Module v2.0 release). On the 64-bit side, I’ve tried the 64-bit version of that same OS with its stock kernel, and I also tried a locally compiled 6.1.24 kernel. With those I get black frames, frame format errors, and I2C timeouts. The I2C timeouts happen both when the driver probes and when the pipeline starts.

Thanks, that’s useful. Have you only used the OBISP driver, or have you tried other driver sources too? The 6.1.x kernels behave differently with the older drivers, so it would help to know exactly what you compiled and what changes you made to get things building.

I’ve tried a few different sources. I pulled the Arducam_OBISP_MIPI_Camera_Module.git and Arducam-Pivariety-V4L2-Driver.git repos. I also tried the in-kernel Arducam Pivariety driver. For the older drivers against the 6.1.24 kernel, I had to fix a few lines of code and tweak the “compatible” string just to get them to compile and load. Even after that, I still end up with the same black frames and I2C timeouts at probe time and pipeline start.

Got it. Quick heads-up: OBISP is the older library and Arducam isn’t planning to keep supporting it. Their current direction is libcamera and picamera2, which is what I’d suggest moving to. Before we go any deeper down the old-driver path, is there a reason you’re tied to OBISP specifically? Also, what capture stack were you using when you saw the frame format errors?

I’m not really tied to it, it’s just the only thing I’ve ever gotten to work at all. So two questions: is there a known working 64-bit stack combo (OS version / kernel version / driver version) for this HAT with four cameras? And if I did want to keep debugging, would you start from the latest Raspberry Pi kernel with the in-kernel Arducam Pivariety driver (6.1.24), or should I just go straight to libcamera?

Honestly, I’d skip further debugging of the OBISP path. OBISP is the older library and Arducam has said they don’t plan to support it going forward. The recommended replacement is the libcamera / picamera2 stack, and that’s also where the newer in-kernel Pivariety support is heading. So instead of chasing the old driver on 6.1.24, the cleaner route is: start from a recent 64-bit Raspberry Pi OS with its stock kernel, use the in-kernel Arducam Pivariety driver where possible, and drive the cameras through libcamera/picamera2. That should sidestep the black-frame and I2C-timeout issues you were hitting with the OBISP-based stack. If you still see I2C timeouts there, then we can dig into device tree and cabling/power, but I wouldn’t spend more time trying to make OBISP work on 64-bit.