Arducam B0392 imx219 camera not working

Camera model
Arducam B0392
"Arducam 8MP IMX219 175 Degree Ultra Wide Angle Raspberry Pi Camera Module"

What is the problem?
webcam stream fails to load

What did you already try to solve it?
edit /boot/config.txt

camera_auto_detect=0
dtoverlay=imx219

reboot
(as instructed to in the amazon listing)

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
octoprint-systeminfo-20220821151334.zip (214.5 KB)

Additional information about your setup (OctoPrint version, OctoPi version, ...)
octoprint Version 1.8.2
Raspberry Pi 3B+

Try it with the guides from Arducam

You might find some usable information in this thread.

I am following this guide

on step 4 I get this error

pi@octopi:~/mjpg-streamer-libcamera/mjpg-streamer-experimental $ make
[ -d _build ] || mkdir _build
[ -f _build/Makefile ] || (cd _build && cmake  -DCMAKE_BUILD_TYPE=Release ..)
make -C _build
make[1]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[2]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 58%] Built target mjpg_streamer
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 58%] Built target input_file
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 58%] Built target input_http
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 58%] Built target input_raspicam
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 58%] Built target input_uvc
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 58%] Building CXX object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/input_libcamera.cpp.o
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/input_libcamera.cpp: In function ‘int input_cmd(int, unsigned int, unsigned int, int)’:
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/input_libcamera.cpp:480:31: error: ‘AfTrigger’ is not a member of ‘libcamera::controls’
       controls_.set(controls::AfTrigger, 0);
                               ^~~~~~~~~
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/input_libcamera.cpp:480:31: note: suggested alternative:
In file included from /home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/LibCamera.h:21,
                 from /home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/input_libcamera.cpp:31:
/usr/include/libcamera/libcamera/control_ids.h:140:31: note:   ‘libcamera::controls::draft::AfTrigger’
 extern const Control<int32_t> AfTrigger;
                               ^~~~~~~~~
make[3]: *** [plugins/input_libcamera/CMakeFiles/input_libcamera.dir/build.make:63: plugins/input_libcamera/CMakeFiles/input_libcamera.dir/input_libcamera.cpp.o] Error 1
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[2]: *** [CMakeFiles/Makefile2:483: plugins/input_libcamera/CMakeFiles/input_libcamera.dir/all] Error 2
make[2]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make: *** [Makefile:19: all] Error 2

I just tested it on the latest OctoPi nightly
Bildschirmfoto vom 2022-08-23 06-39-20

try to install those packages

sudo apt -y install cmake libjpeg9-dev

delete the mjpeg streamer folder with

cd
rm -rf mjpg-streamer-libcamera

and repeat step 4 of the guide

pi@octopi:~ $ rm -rf mjpg-streamer-libcamera/
pi@octopi:~ $ git clone https://github.com/ArduCAM/mjpg-streamer.git mjpg-streamer-libcamera
cd mjpg-streamer-libcamera/mjpg-streamer-experimental
make
Cloning into 'mjpg-streamer-libcamera'...
remote: Enumerating objects: 3034, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 3034 (delta 39), reused 51 (delta 33), pack-reused 2964
Receiving objects: 100% (3034/3034), 3.52 MiB | 4.09 MiB/s, done.
Resolving deltas: 100% (1924/1924), done.
[ -d _build ] || mkdir _build
[ -f _build/Makefile ] || (cd _build && cmake  -DCMAKE_BUILD_TYPE=Release ..)
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMAKE_BUILD_TYPE = Release
-- Looking for include file sys/inotify.h
-- Looking for include file sys/inotify.h - found
CMake Warning at plugins/input_opencv/CMakeLists.txt:4 (find_package):
  By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCV", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (Gphoto2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindPkgConfig.cmake:59 (find_package_handle_standard_args)
  cmake/FindGphoto2.cmake:21 (include)
  plugins/input_ptp2/CMakeLists.txt:2 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (GPHOTO2)
  does not match the name of the calling package (Gphoto2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindGphoto2.cmake:44 (find_package_handle_standard_args)
  plugins/input_ptp2/CMakeLists.txt:2 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find GPHOTO2 (missing: GPHOTO2_LIBRARY GPHOTO2_INCLUDE_DIR) 
-- Looking for include file linux/videodev2.h
-- Looking for include file linux/videodev2.h - found
-- Checking for module 'libcamera'
--   Found libcamera, version 0.0.0
PLUGIN_INPUT_LIBCAMERA
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) 
-- Could NOT find protobuf-c (missing: PROTOBUF_C_LIBRARY PROTOBUF_C_INCLUDE_DIR) 
-- The following features have been enabled:

 * PLUGIN_INPUT_FILE, File input plugin
 * PLUGIN_INPUT_HTTP, HTTP input proxy plugin
 * PLUGIN_INPUT_UVC, Video 4 Linux input plugin
 * PLUGIN_INPUT_LIBCAMERA, Libcamera input plugin
 * PLUGIN_OUTPUT_FILE, File output plugin
 * PLUGIN_OUTPUT_HTTP, HTTP server output plugin
 * PLUGIN_OUTPUT_RTSP, RTSP output plugin
 * PLUGIN_OUTPUT_UDP, UDP output stream plugin

-- The following OPTIONAL packages have been found:

 * Threads

-- The following REQUIRED packages have been found:

 * PkgConfig

-- The following features have been disabled:

 * WXP_COMPAT, Enable compatibility with WebcamXP
 * PLUGIN_INPUT_OPENCV, OpenCV input plugin (unmet dependencies)
 * PLUGIN_INPUT_RASPICAM, Raspberry Pi input camera plugin (unmet dependencies)
 * PLUGIN_INPUT_PTP2, PTP2 input plugin (unmet dependencies)
 * ENABLE_HTTP_MANAGEMENT, Enable experimental HTTP management option
 * PLUGIN_OUTPUT_VIEWER, SDL output viewer plugin (unmet dependencies)
 * PLUGIN_OUTPUT_ZMQSERVER, ZMQ Server output plugin (unmet dependencies)

-- The following OPTIONAL packages have not been found:

 * OpenCV
 * Gphoto2
 * SDL

-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build
make -C _build
make[1]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[2]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target mjpg_streamer
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[  3%] Building C object CMakeFiles/mjpg_streamer.dir/mjpg_streamer.c.o
[  7%] Building C object CMakeFiles/mjpg_streamer.dir/utils.c.o
[ 11%] Linking C executable mjpg_streamer
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 11%] Built target mjpg_streamer
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target input_file
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 14%] Building C object plugins/input_file/CMakeFiles/input_file.dir/input_file.c.o
[ 18%] Linking C shared library input_file.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 18%] Built target input_file
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target input_http
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 22%] Building C object plugins/input_http/CMakeFiles/input_http.dir/input_http.c.o
[ 25%] Building C object plugins/input_http/CMakeFiles/input_http.dir/misc.c.o
[ 29%] Building C object plugins/input_http/CMakeFiles/input_http.dir/mjpg-proxy.c.o
[ 33%] Linking C shared library input_http.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 33%] Built target input_http
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target input_uvc
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 37%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/dynctrl.c.o
[ 40%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/input_uvc.c.o
[ 44%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/jpeg_utils.c.o
[ 48%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/v4l2uvc.c.o
[ 51%] Linking C shared library input_uvc.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 51%] Built target input_uvc
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target input_libcamera
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 55%] Building CXX object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/input_libcamera.cpp.o
[ 59%] Building CXX object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/LibCamera.cpp.o
[ 62%] Building C object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/jpeg_utils.c.o
[ 66%] Linking CXX shared library input_libcamera.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 66%] Built target input_libcamera
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target output_file
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 70%] Building C object plugins/output_file/CMakeFiles/output_file.dir/output_file.c.o
[ 74%] Linking C shared library output_file.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 74%] Built target output_file
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target output_http
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 77%] Building C object plugins/output_http/CMakeFiles/output_http.dir/httpd.c.o
[ 81%] Building C object plugins/output_http/CMakeFiles/output_http.dir/output_http.c.o
[ 85%] Linking C shared library output_http.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 85%] Built target output_http
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target output_rtsp
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 88%] Building C object plugins/output_rtsp/CMakeFiles/output_rtsp.dir/output_rtsp.c.o
[ 92%] Linking C shared library output_rtsp.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 92%] Built target output_rtsp
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
Scanning dependencies of target output_udp
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 96%] Building C object plugins/output_udp/CMakeFiles/output_udp.dir/output_udp.c.o
[100%] Linking C shared library output_udp.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[100%] Built target output_udp
make[2]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[1]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'

1 Like

after installing nightly octoprint onto a new sd card and following that guide I have the camera showing up.

/boot/octopi.txt

camera="libcamera"
camera_libcamera_options="-r 1280x720 -f 15"

the camera will show up for a few minutes and then it will say the webcam stream failed to load

if I run

sudo systemctl restart webcamd

the camera will come back up for a few minutes and then it will go away

if I do

sudo systemctl status webcamd

after the camera goes away. I see

pi@octopi:~ $ sudo systemctl status webcamd
● webcamd.service - the OctoPi webcam daemon with the user specified config
     Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-08-24 16:04:30 PDT; 14min ago
   Main PID: 20794 (webcamd)
      Tasks: 2 (limit: 1472)
        CPU: 5min 45.433s
     CGroup: /system.slice/webcamd.service
             ├─20794 /bin/bash /root/bin/webcamd
             └─21337 sleep 120

Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: MJPG Streamer Version: git rev: d3bb80e4061d5d0b85170bb601074ed78b49516e
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: Desired Resolution: 1280 x 720
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: www-folder-path......: -n/
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: HTTP TCP port........: 8080
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: HTTP Listen Address..: (null)
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: username:password....: disabled
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: commands.............: enabled
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: starting input plugin input_libcamera.so
Aug 24 16:16:10 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: starting output plugin: output_http.so (ID: 00)
Aug 24 16:18:07 octopi mjpg_streamer[21242]: MJPG-streamer [21242]: switch_resolution(): Failed to switch camera resolution.

should I remove the resolution flag and let it automatically select?

I changed my config to look like this

#/boot/octopi.txt
camera="libcamera"
camera_libcamera_options=""

still getting this error

pi@octopi:~ $ sudo systemctl status webcamd
● webcamd.service - the OctoPi webcam daemon with the user specified config
     Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-08-25 11:59:26 PDT; 6min ago
   Main PID: 1539 (webcamd)
      Tasks: 2 (limit: 1472)
        CPU: 2min 45.455s
     CGroup: /system.slice/webcamd.service
             ├─1539 /bin/bash /root/bin/webcamd
             └─1800 sleep 120

Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: MJPG Streamer Version: git rev: d3bb80e4061d5d0b85170bb601074ed78b49516e
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: Desired Resolution: 640 x 480
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: www-folder-path......: -n/
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: HTTP TCP port........: 8080
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: HTTP Listen Address..: (null)
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: username:password....: disabled
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: commands.............: enabled
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: starting input plugin input_libcamera.so
Aug 25 12:03:02 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: starting output plugin: output_http.so (ID: 00)
Aug 25 12:04:04 octopi mjpg_streamer[1715]: MJPG-streamer [1715]: switch_resolution(): Failed to switch camera resolution.
pi@octopi:~ $

here is a new system info bundle incase that is helpful
octoprint-systeminfo-20220825120804.zip (846.5 KB)