OV9281 on Raspberry Pi 4: arducamstill/list_format returns init camera status 4099

Hi everyone, I’m stuck trying to get an OV9281 module working on a Raspberry Pi 4 and I keep running into ‘init camera status = 4099’. Both arducamstill and the list_format command end with that same 4099 status no matter what I try. I’ve been digging through the forums about code 4099 and followed the advice to check with utils/camera_i2c, but it’s been a rabbit hole.

What I’ve done so far:

  • The utils/camera_i2c script doesn’t include c03115 (I checked GitHub as well), so I modified it to detect the sensor the way previous versions did.
  • /dev/i2c1 did not exist at first. After I enabled the i2c interface it showed up, and then camera_i2c actually reported results.
  • v12-ctl runs fine and finds the camera formats, so the sensor itself seems alive.

Full logs/files attached below. I’m starting to suspect there’s some kind of conflict in my /boot/config.txt. Any pointers would be appreciated.

camera_i2c: https://cdn.arducam.com/forum/4646221043b25a0ca246d0c706ab3513/camera_i2c
test.txt: https://cdn.arducam.com/forum/4646221043b25a0ca246d0c706ab3513/test.txt
formats.txt: https://cdn.arducam.com/forum/4646221043b25a0ca246d0c706ab3513/formats.txt
config.txt: https://cdn.arducam.com/forum/4646221043b25a0ca246d0c706ab3513/config.txt

Thanks for the detailed writeup, this helps a lot. Before we go after config.txt, I need to confirm exactly which camera you have. The fact that your camera_i2c script has no c03115 entry and had to be manually patched to detect “as previous versions” suggests a possible version mismatch between the tool and the actual module you’re using. If we know the exact model we can tell whether you should be running a newer script or something different entirely.

Two quick questions:

  1. Which exact camera model are you using?
  2. When you edited config.txt, did you fully reboot before re-running arducamstill?

It’s the OV9281 MIPI 1MP Monochrome Global Shutter Camera Module with M12 Mount Lens for Raspberry Pi - this one: https://www.arducam.com/product/ov9281-mipi-1mp-monochrome-global-shutter-camera-module-m12-mount-lens-raspberry-pi/

I’ve since updated the system to Bullseye and I’m planning to move over to libcamera instead of the older stack. And yes, I rebooted after editing config.txt, though it didn’t change the 4099 result.

Here’s what test.txt shows on the failure:
init camera status = 4099

Got it, thanks. That 4099 init error is generally the driver failing to detect/open the sensor over i2c, so it lines up with what you were seeing with the missing /dev/i2c1 earlier.

Since you already enabled i2c and camera_i2c gives results now, let’s compare what camera_i2c reports against the formats v12-ctl found in your formats.txt. Can you paste the actual lines from camera_i2c output (the sensor i2c address / model it prints)?

Also, a few things to check in config.txt:

  • Any duplicate or leftover camera overlay lines (dtoverlay=ov9281, dtoverlay=arducam-* etc.) that might conflict.
  • Make sure the i2c_arm / i2c_vc settings aren’t stepping on each other.
  • Any old camera_auto_detect line still enabled.

You can sanity check by commenting out the camera overlays and just testing libcamera-hello to see if the sensor is detected there.

OK, here’s what I pulled from camera_i2c - it reports:

Checking for camera at i2c address 0x60 …
Found sensor, model id 0x9281 (c03115)
…
result: camera detected

But arducamstill still gives init camera status = 4099.

I tried commenting out the overlays as you suggested. Removed the ov9281 line and the arducam auto-detect line so config.txt has basically no camera overlay at all now, rebooted, and still got 4099 from arducamstill. libcamera-hello didn’t detect anything either at that point.

Feels like it’s not the overlay conflict then, or maybe it’s something else in config.txt. I’ve attached the current config.txt above if you want to eyeball it.

That’s useful - if camera_i2c sees the sensor at 0x60 and v12-ctl finds the formats, but arducamstill/libcamera can’t, that points more toward the software stack than wiring or power.

One thing worth trying: since you’re on Bullseye now, do you get any libcamera-hello output at all, or does it just error out? If you can build/run libcamera-hello directly it would tell us whether the kernel driver is exposing the sensor to libcamera properly. If arducamstill relies on the older V4L2/MMAL path, the 4099 might just be that tool being incompatible with Bullseye rather than a hardware fault.

You were right - I went ahead and compiled my own libcamera-hello and it works now. So the init camera status = 4099 was basically the old arducamstill path not playing nice with the new stack; once I moved to libcamera and built it myself, the camera comes up fine. Issue resolved on that front, thanks!

One follow-up though: I need to look into syncing cameras. Is it possible to drive the external sync from the Raspberry Pi’s GPIO pins if I convert the level to 1.8 V? I’d like to trigger multiple OV9281 modules from the Pi itself rather than an external generator.

Glad the libcamera build sorted it - that matches what we saw, the sensor was fine and the 4099 was the old toolchain on Bullseye.

On your sync question: yes, you can drive the external trigger from a Pi GPIO, but you have to watch the levels. The OV9281 external trigger (XVS/FSIN) is 1.8 V logic, and the Pi GPIO is 3.3 V, so you do need a proper level shifter - don’t feed 3.3 V straight in. Keep the wiring short and make sure the ground is common between the Pi and all cameras.

For multiple cameras and solid simultaneous capture, the common approach is to use a separate trigger generator/shield so all sensors get the same edge at the exact same time, since a single Pi GPIO driving several modules can get flaky. There’s a walkthrough here that covers the hardware trigger setup for multiple OV9281 global shutter cameras: https://www.arducam.com/docs/usb-cameras/connect-and-sync-multi-stereo-cameras/hardware-trigger-external-signal-multiple-ov9281-global-shutter-camera/

If you’d rather go software-triggered, running dual Raspberry Pi boards and collecting data that way works too - let us know what route you pick and we can go deeper on the sync wiring.