How can I diagnose potential issues with Raspberry Pi camera?

I had this camera hooked up to Raspberry Pi 2B v1.1. The Pi broke, and I hypothesize that the camera could have fried at the same time. I would like to get some clarity before purchasing another camera.

Often v4l2-ctl -V returns Cannot open device /dev/video0, exiting. and raspistill produces failed to create component 'vc.ril.camera' (1:ENOMEM). vcgencmd get_camera returns supported=1 detected=0

Rarely, it produces output with some camera specs, although it might be bogus the resolution is not 1080 vertical pixels. In these cases raspistill produces failed to enable component: ENOSPC. I read somewhere that ENOSPC message may indicate that someone else is using the camera, making me think that perhaps the camera is not fried?

Below are the details. I can produce more logs and outputs as needed.

  • Running Raspbian 10 (buster), Linux 4.19.108+ armv6l.
  • I got a Raspberry Pi Zero and a 15pin-22pin adapter cable so I can connect the camera.
  • I followed the troubleshooting checklist, including:
  • I updated raspberry pi,
  • enabled camera in raspi-config,
  • set aside 256MB RAM for GPU,
  • added my user to the video group.
  • Verified with multimeter that there is voltage (1.3V) on the camera (the cable is correctly seated)
  • Unplugged any extra usb devices
  • using power source with 2.5A output

Twice, by a fluke, v4l2-ctl -V produced a good output (but not 1080p resolution). I did not get a chance to run vcgencmd get_camera at that time.

ama@raspberrypi:~ $ sudo modprobe bcm2835-v4l2
[sudo] password for ama:

ama@raspberrypi:~ $ v4l2-ctl -V
Format Video Capture:
Width/Height : 1024/768
Pixel Format : 'JPEG' (JFIF JPEG)
Field : None
Bytes per Line : 0
Size Image : 786432
Colorspace : JPEG
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :

ama@raspberrypi:~ $ raspistill -o test.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

Typically, however, it can't find the device

ama@raspberrypi:~ $ sudo modprobe bcm2835-v4l2
[sudo] password for ama:

ama@raspberrypi:~ $ vcgencmd get_camera
supported=1 detected=0

ama@raspberrypi:~ $ v4l2-ctl -V
Cannot open device /dev/video0, exiting.

ama@raspberrypi:~ $ raspistill -o test.jpg
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detected. Please check carefully the camera module is installed correctly

By the way, v4l2-ctl -V detects three devices at /dev/video10, /dev/video11 and /dev/video12 - could this be a real camera, or are these virtual devices used by the driver?

Thank you for your tips!

  • 1
    Which OS +version? Can't see any reference to these details... And what is the output of vcgencmd get_camera? Please add details to the question.
    – Dirk
    Apr 1 '20 at 8:37
  • 1
    Re extra v4l2 devices: they are normal with current driver, see raspberrypi.org/forums/…
    – Dirk
    Apr 1 '20 at 8:45
  • Good catch, I updated the post. Thanks for sharing re extra devices! Apr 3 '20 at 5:40

I had the same problem with one of this cameras and a raspberry pi zero. Try to dismount the IR-Diodes - they have a high power demand and my guess is the CSI of the zero can´t deliver enough power - probably because of the smaller dimensions of the port and conductive tracks.

  • This is it! The camera worked after removing the extra IR LEDs. I will try to find out their specs and power them from GPIO. Do you happen to know what's the preferred voltage for these? Apr 4 '20 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.