Cam detected but not working

Camera model

OV5647 (RPI CAM NOIR MF: Raspberry Pi - Kamera, 5MP, 75°, IR-LEDs bei reichelt elektronik)

What is the problem?

Octoprint is detecting my Camera but not working.

What did you already try to solve it?

  • sudo apt-get update
  • sudo apt-get upgrade --with-new-pkgsList
  • I2C enabeled

Have you tried running in safe mode?

yes

Did running in safe mode solve the problem?

no

Systeminfo Bundle

octoprint-systeminfo-20230722232941.zip (22.4 KB)

additional info

felix@CR10MAX:~ $ libcamera-hello --list-cameras
Available cameras
-----------------
0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1/ov5647@36)
    Modes: 'SGBRG10_CSI2P' : 640x480 [30.00 fps - (0, 0)/0x0 crop]
                             1296x972 [30.00 fps - (0, 0)/0x0 crop]
                             1920x1080 [30.00 fps - (0, 0)/0x0 crop]
                             2592x1944 [30.00 fps - (0, 0)/0x0 crop]
felix@CR10MAX:~ $ vcgencmd get_camera
supported=1 detected=0, libcamera interfaces=1

felix@CR10MAX:~ $ libcamera-hello -v3
Options:
    verbose: 3
    info_text:#%frame (%fps fps) exp %exp ag %ag dg %dg
    timeout: 5000
    width: 0
    height: 0
    output:
    post_process_file:
    rawfull: 0
    preview: default
    qt-preview: 0
    transform: identity
    roi: all
    metering: centre
    exposure: normal
    ev: 0
    awb: auto
    flush: false
    wrap: 0
    brightness: 0
    contrast: 1
    saturation: 1
    sharpness: 1
    framerate: 30
    denoise: auto
    viewfinder-width: 0
    viewfinder-height: 0
    tuning-file: (libcamera)
    lores-width: 0
    lores-height: 0
    autofocus-range: normal
    autofocus-speed: normal
    autofocus-window: all
    mode: unspecified
    viewfinder-mode: unspecified
    metadata:
    metadata-format: json
No connector ID specified.  Choosing default from list:
Connector 32 (crtc 0): type 11, 0x0
Connector 42 (crtc 0): type 11, 0x0
Preview window unavailable
Running without preview window
Opening camera...
[0:02:14.931499846] [1005]  INFO Camera camera_manager.cpp:297 libcamera v0.0.5+82-2783c8d8
[0:02:14.970485905] [1006]  INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media1 and ISP device /dev/media0
[0:02:14.970571404] [1006]  INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:02:14.970981012] [1005]  INFO Camera camera.cpp:840 Pipeline handler in use by another process
Closing Libcamera application(frames displayed 0, dropped 0)
Camera stopped!
Tearing down requests, buffers and configuration
Camera closed
ERROR: *** failed to acquire camera /base/soc/i2c0mux/i2c@1/ov5647@36 ***
arm_64bit=0
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]
# enable raspicam
start_x=1
gpu_mem=128


octopi.txt

### IMPORTANT: Looking for the camera settings? Those are now located
### in the camera-streamer directory! libcamera.conf to configure the Raspberry Pi
### camera and usb-default.conf to configure USB cameras. Read more about it here:
### https://faq.octoprint.org/camera-streamer-config

### Windows users: To edit this file use Notepad++, VSCode or SublimeText.
### Do not use Notepad or WordPad.

### MacOSX users: If you use Textedit to edit this file make sure to use
### "plain text format" and "disable smart quotes" in "Textedit > Preferences"

# Configuration of network monitoring
#
# This enables network monitoring for wifi connections with a simple ping test.
# If connection terminates by variable reasons system tries to restart the wifi connection to reestablish a connection.
# The connection test is done every minute.
# By default it is disabled (0 = off / 1 = on)
# destination_host can be an ip address or a hostname (for hostname ensure dns resosultion is working correctly)

enable_network_monitor=0

# Be sure to change this to match your network!
destination_host=192.168.1.1

### EXPERIMENTAL
# Support for different streamer types.
#
# Available options:
#   mjpeg [default] - camera-streamer
#   hls - FFMPEG HLS streamer
#camera_streamer=mjpeg

libcamera.config

### Options for libcamera based cameras (PiCam, Arducam, ...)

# The port on which the webcam server for the camera should listen on. If you have only
# one camera, leave at 8080. If you have more, change to 8081, 8082, etc. The primary
# camera will be considered the one with 8080.
PORT=8080

# The resolution to request on the camera sensor. Defaults to 1280x720.
WIDTH=1920
HEIGHT=1080

# The height to use for the video stream. Defaults to 720.
VIDEO_HEIGHT=720

# The height to use for the snapshots. Defaults to 1080.
SNAPSHOT_HEIGHT=1080

# The framerate to set on the camera. Defaults to 15fps.
FRAMERATE=15

# Additional options. By default enables continuous auto focus (if possible).
OPTIONS='--camera-options="AfMode=2" --camera-options="AfRange=2"'


Please share a systeminfo bundle

Hi so sorry, forgott..

i updated it in the first post and also some additional steps i did so far. And all files updated too.

Some more maybe "usefull" information:

Hi, did you resolve this as I've got exactly the same issue and my running the same commands basically get the same responses as you did. I have a clean install of Octoprint 'new camera' from yesterday, with apts updated. I manually added the dtoverlay=ov5647 to the config.txt file and that resulted in the libcamera count going 0 to 1, but at the same time the detected count went from 1 to 0. I'll create a new post if you didn't manage to solve it. The reason I reinstalled is because a few months ago after an octoprint update (not new camera version) the camera stream stopped working in Octoprint...but using the raspstill command I could take still images so Pi was recognising the camera

It sounds like you forgot to permit the stream to be accessible from all network devices.

Make sure the line for options reads

OPTIONS=--http-listen=0.0.0.0

in the camera.conf file.

Then reboot.