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.
v4l2-ctl -V returns
Cannot open device /dev/video0, exiting. and
failed to create component 'vc.ril.camera' (1:ENOMEM).
vcgencmd get_camera returns
Rarely, it produces output with some camera specs, although it might be bogus the resolution is not 1080 vertical pixels. In these cases
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/video12 - could this be a real camera, or are these virtual devices used by the driver?
Thank you for your tips!