I have a Raspberry Pi 4 Model B. Certain pins are used by some sensors. Once I plug my sensors into my system, the camera cannot be found by the Raspberry, on the other hand, everything works fine when I unplug my devices. I tried disabling and then re-enabling the Camera Interface. Didn't work.

pi@raspberrypi:~ $ vcgencmd get_camera
supported=1 detected=0, libcamera interfaces=0


pi@raspberrypi:~ $ raspistill -o test3.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

Raspi PinOut -- Highlighted pins mean that it is used.

What could be the issue here? I wonder whether the Raspberry Pi Camera port has a connection to one of the GPIO pins in its scheme or anything similar. If so, is it possible to migrate those pins by editing /boot/config.txt?

Thanks in advance!

  • 1
    You plug in sensors. Plug in one by one until the camera fails. Which sensor causes the problem? Please edit the information into your question.
    – joan
    Commented Apr 26, 2022 at 10:30
  • Unfortunately, it is not possible at this moment. All sensors are already soldered and I can only un/plug them all at once via an external pin.
    – Nihat
    Commented Apr 26, 2022 at 12:56
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented May 3, 2022 at 21:20

2 Answers 2


The camera uses a number of GPIO pins, but not those on the expansion header.

This is poorly documented, but it also appears to use an I²C interface - almost certainly the reserved interface on pins 27,28 which should NOT be used for anything except HATs.

  • I also knew the same but since I don’t use them, it shouldn’t be a problem for me though. It is weird. Is there anything possible other than this?
    – Nihat
    Commented Apr 26, 2022 at 12:58

@milliways is correct. connecting GPIO0,1 (pins 27/28) to anything yields a strange error in picamera2. The error does not give any indication of the cause, hence I list it here so search-engines might find it.

IndexError: list index out of range
Exception ignored in: <function Picamera2.__del__ at 0x7f76fea5c0>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 404, in __del__
  File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 604, in close
    if self._preview:
AttributeError: 'Picamera2' object has no attribute '_preview'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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