If the camera module isn’t working correctly, there are number of things to try:
- 1. You could use the output of vcgencmd get_camera command to check if the camera is connected, the output should be supported=1 detected=1 if camera is connected, or else is detected = 0.
- 2. Is the ribbon cable attached to the Camera Serial Interface (CSI), not the Display Serial Interface (DSI)? The ribbon connector will fit into either port. The Camera port is located near the HDMI connector.
- 3. The ribbon connectors all firmly seated, and are they the right way round? They must be straight in their sockets.
- 4. Is the Camera Module connector, between the smaller black Camera Module itself and the PCB, firmly attached? Sometimes this connection can come loose during transit or when putting the Camera Module in a case. Using a fingernail, flip up the connector on the PCB, then reconnect it with gentle pressure. It engages with a very slight click. Don’t force it; if it doesn’t engage, it’s probably slightly misaligned.
- 5. Have sudo apt-get update and sudo apt-get upgrade been run?
- 6. Has raspi-config been run and the Camera Module enabled?
- 7. Is your power supply sufficient? The Camera Module adds about 200-250mA to the power requirements of your Raspberry Pi.
- 8. If you get with mmal error shown below: mmal: No data received from sensor. Please check all connections, including the Sunny one on the camera board, this error usually appears because of a faulty connection with the camera.