OV5647 not detected on Raspberry Pi 4 — “no cameras available”
Hi, I can’t get this OV5647 camera to work at all. It’s on a Raspberry Pi 4 8GB running the 64-bit Bullseye image, and no matter what I do I get no cameras available. I honestly never got it to work once.
Made X/EGL preview window
[0:01:50.060163995] [1505] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3544-22656360
[0:01:50.077376048] [1506] ERROR CameraSensor camera_sensor.cpp:591 ‘ov5647 10-0036’: Camera sensor does not support test pattern modes.
[0:01:50.101355208] [1506] INFO RPI raspberrypi.cpp:1356 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media2 and ISP device /dev/media0
[0:01:50.102255538] [1505] INFO Camera camera.cpp:1029 configuring streams: (0) 1296x972-YUV420
[0:01:50.102763925] [1506] INFO RPI raspberrypi.cpp:760 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1296x972-SGBRG10_1X10 - Selected unicam format: 1296x972-pGAA
[0:01:51.746255648] [1506] WARN V4L2 v4l2_videodevice.cpp:1952 /dev/video0[16:cap]: Dequeue timer of 1520000.00us has expired!
[0:01:51.746407407] [1506] ERROR RPI raspberrypi.cpp:1794 Unicam has timed out!
[0:01:51.746447296] [1506] ERROR RPI raspberrypi.cpp:1795 Please check that your camera sensor connector is attached securely.
[0:01:51.746521647] [1506] ERROR RPI raspberrypi.cpp:1796 Alternatively, try another cable and/or sensor.
ERROR: *** no cameras available ***
Stuff I already tried:
everything on the paper that came with the camera plus a bunch of online guides
connected it to 4 different Pis, none of them detect it
added dtoverlay=ov5647,clock-frequency=25000000 under the [all] line in /boot/config.txt
commented out the dtoverlay=imx519 line
reseated the cable and the connector on the sensor a few times
reburned the system image (2022-04-04-raspios-bullseye-arm64-full, 64-bit)
Running out of ideas here. Any help would be great.
Hi, sorry to hear it’s giving you trouble. Before we go further, can you grab a bit of system info so we can see exactly what you’re running? Please input these one by one:
uname -a
cat /etc/os-release
cat /proc/meminfo
cat /boot/config.txt
dmesg is also useful but it’s usually long, so instead of dumping the whole thing try:
dmesg | grep -i -E “ov5647|unicam|i2c|unicam”
Also a photo of how the ribbon is seated in the connector on both ends (Pi side and sensor side) would help. Occasionally the cable is flipped the wrong way or not fully pushed in.
One more thing: your config.txt may still have a driver for a different sensor in it. Please run:
sudo nano /boot/config.txt
and look for the line dtoverlay=imx519 — if it’s there, comment it out (put a # in front). Then test with libcamera-still -t 0.
Also meant to add — the overlay line for ov5647 is in there under [all] like you said, saved and rebooted, no change. Reconnecting the cable and the connector on the sensor didn’t change anything either. Same no cameras available.
Thanks, that’s useful. A couple of observations from your log:
“Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36” means the sensor IS being seen on the I2C bus (address 0x36). So the ribbon isn’t completely dead.
But then “Unicam has timed out” and the dequeue timer expiring means no frame data is ever coming back from the sensor. So it’s detected on I2C but the capture path never streams.
The imx519 overlay line would definitely be worth removing, which you’ve now done. Having two sensor overlays active can cause weird behaviour.
Also, since the error message itself says to check the connector: can you double check the ribbon is fully latched in the Pi’s CSI port with the silver contacts facing the right way, and that it’s not creased or nicked anywhere? If you have a spare ribbon, try swapping it.
And to rule out the software side, try a clean image: burn 2022-04-04-raspios-bullseye-arm64-full and test straight away with a libcamera app (libcamera-still -t 0) before installing anything else.
The 0x36 device shows up on i2c, and /dev/video0 exists via unicam. dmesg filtered shows the sensor registering and then the unicam timeouts (same messages as the libcamera output basically).
Ribbon looks seated properly, contacts facing the right way, no creases I can see. I don’t have a spare ribbon to swap.
I reburned the image anyway with 2022-04-04-raspios-bullseye-arm64-full and it still gives me no cameras available as soon as I run libcamera-still -t 0.
One more thing I forgot — I also tried testing on another Pi board and on a Pi 3, same result on all of them, nothing detected. So it’s four boards total now.
Alright, that narrows it down quite a bit. Here’s where we stand:
The sensor answers on I2C at 0x36 on every board you tried, so the Pi side and the I2C lines are fine.
The unicam driver binds (/dev/video0 exists) and the sensor format gets selected, but every capture attempt times out with “Unicam has timed out”, so no frames ever arrive from the sensor.
This is consistent across four different Pi boards, a fresh 64-bit image, with and without the ov5647 overlay, and after reseating the connector.
Some things worth knowing so we don’t chase the wrong thing: on Bullseye with a Pi 4 you should be using the libcamera apps (libcamera-still, libcamera-vid) and not raspistill/raspivid. Also vcgencmd get_camera is for the old legacy camera stack — on Bullseye it will report supported=0 detected=0 even on a working camera, so that output alone doesn’t tell us much. The libcamera log is the relevant one.
Two last software checks before we conclude anything:
Set the clock-frequency explicitly and make sure it’s under [all] in /boot/config.txt, then save and reboot:
If libcamera-hello --list-cameras still shows nothing / the unicam timeout keeps happening after all of that, we’re looking at the sensor or the ribbon rather than the software, since the same setup works on our test Pi 4B and Pi 3 with the 64-bit image.
Thanks for sticking with it through all of that. Current conclusion: the sensor is being detected on the I2C bus (0x36) and the unicam driver binds correctly, but no frame data ever reaches the ISP — every capture times out with “Unicam has timed out”. Since this reproduces on four separate Pi boards, with a freshly burned 64-bit image, with the imx519 driver commented out, with dtoverlay=ov5647,clock-frequency=25000000 under [all], and after reseating the connector, the software/config side is pretty much ruled out.
To summarize what the thread has confirmed:
vcgencmd get_camera returning supported=0 detected=0 on Bullseye is expected for the legacy stack — not a useful signal; libcamera is what matters here.
The failing marker is the Unicam timeout / “no cameras available” from libcamera-still and libcamera-hello --list-cameras.
i2cdetect sees the sensor, so the I2C side works; the data path doesn’t, which typically points at the ribbon cable or the sensor module itself.
The only remaining things left untested on your side would be a different ribbon cable or another known-good module on the same Pi, and neither of those has been available to try. So there’s no software workaround that gets frames out of this unit — it’s most likely a hardware fault in the module or its ribbon. If you get hold of a spare cable and it still times out, that confirms the sensor itself is the problem. Keep the thread open if anything changes and post back.