KAMAMI OV7251 camera not detected by libcamera on Raspberry Pi 4/5

Hi everyone, I’ve been fighting with an Arducam OV7251 global shutter camera on a Raspberry Pi 4/5 and I’m completely stuck. libcamera just never detects the sensor, no matter what I do. The only official guide I could find is the Global Shutter 0.3MP OV7251 page (0.3MP OV7251 - Arducam Wiki) and it’s honestly not enough for this module. The camera is basically unusable for our project right now. Has anyone managed to get this working with libcamera?

Thanks for reaching out. Can you share a bit more about what you’ve already tried? That’ll help me avoid suggesting things you’ve already done. Also, which OS version and Pi model are you on when it fails?

Sure. I’ve verified all the physical connections carefully, updated the Raspberry Pi firmware and all relevant software to the latest versions, reinstalled libcamera and all dependencies multiple times, and tested on several different Raspberry Pi units. I followed the provided documentation exactly, but the camera is still not detected at all. At this point I’d really appreciate a step-by-step OV7251 setup guide, some help with libcamera detection, and clarification on whether the OV7251 is actually compatible with current Pi models and libcamera versions (including any patches or firmware updates). If it’s simply unsupported, I’d also like alternative module recommendations.

To be upfront with you: the Arducam OV7251 model can’t be directly accessed through libcamera. It’s not a plug-and-play module with that sensor, and getting it working takes some specific low-level work. For your requirements - seamless integration with Pi 4/5 systems and full libcamera support - the OV7251 itself is the root problem, since it lacks direct libcamera access/support. As an alternative, I’d suggest the B0381 ArduCam 2MP OV2311 Global Shutter NoIR Mono Camera Module (https://www.arducam.com/product/arducam-2mp-ov2311-global-shutter-noir-mono-camera-modules-pivariety/). It’s much easier to set up, fully supported by libcamera, and designed to work with current Raspberry Pi models.

Thanks, but the OV2311 won’t work for us. The OV7251 is the only sensor that fits our strict size constraints, so swapping modules is not an option. The Arducam site really doesn’t have a comprehensive setup guide for the OV7251 - the existing page isn’t enough. I also found a community libcamera fork at GitHub - 6by9/libcamera at ov7251 · GitHub and tried those implementations, but still no luck. Would it be possible to have a dedicated libcamera fork maintained for the OV7251? We’d potentially be ordering in higher volumes if we can get this working.

Understood about the size constraint. Just to set expectations: there are no plans to maintain a dedicated libcamera fork for the OV7251 sensor. That said, I’ve put together two scripts to preview the OV7251 camera. I’ve sent them to you through private message - please check your messages and give them a try. They’re not a complete solution, but they should give you a starting point and some insight into working with the sensor. The community fork you found (the 6by9/libcamera ov7251 branch) is also reported to work for some people, so it’s worth keeping that in mind as well.

So I tried the scripts, and unfortunately they don’t work for me. I’m on the latest Raspberry Pi OS on a Raspberry Pi 5. The interesting thing is that the video devices do show up when the cameras are connected. I’ve tried all sorts of config.txt combinations:

camera_auto_detect=1 or =0
dtoverlay=ov7251,cam1
dtoverlay=ov7251,cam0
dtoverlay=ov7251,media-controller=1,cam1
dtoverlay=ov7251,media-controller=1cam0
dtoverlay=ov7251,media-controller=0,cam1
dtoverlay=ov7251,media-controller=0cam0

The video devices appear, but the preview scripts still fail. Any idea what I’m doing wrong?

Based on what you’re describing, the RPI5 + latest Raspberry Pi OS combination is likely the incompatibility here. The fact that video devices show up means the sensor is being detected at the device level, but the software/config has to match the right OS. Can you test this on a Raspberry Pi 4 with Bullseye OS instead? In the config file, add just this entry:

dtoverlay=ov7251,media-controller=1

For reference, those config.txt values you tried (the cam0/cam1 and media-controller combinations) were mostly variations, but the right target here is Bullseye on a Pi 4 with that single overlay line. If it still doesn’t work there, we’ll need to dig further, but that’s the combination I’d start with.