reddreadmorgan
Posts: 3
Joined: Fri Dec 28, 2018 1:59 am

RPiZ + rpi camera v2.1 results in ENOSPC error.

Fri Dec 28, 2018 2:48 am

Camera refuses to work (but IS detected, see below), and always results in the ENOSPC error when trying the command line utilities or scripts.

I have worked on this for hours and collected the following information before arriving here. I have read through the sticky RPIZ thread 'not detecting' the camera, and this isn't the same, as the OS and firmware are not the problem versions listed.

camera and rpiz came in official packaging from a trusted electronics supplier. no knockoffs or refurbished/2nd hand devices.


/etc/init.d/webcamd and raspistill both report the following error:

Code: Select all

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

Notes:
  • I am running headless mode for Octoprint.
  • V2.1 module doesn't have an LED, so all I have to know that the camera is powered is from logs and the get_camera command.
  • I do not have a /dev/video0 device. With no /dev/video device, I am unable to use 'fuser' to find other clients that might be interfering, as this is a common problem / fix for other users on the internet. If there is another way to detect processes that have locked down the camera, it would be great to know what this magic command is. I do not know if /dev/video0 is even the preferred way of interacting with the camera any more.
  • I've run apt-get update and apt-get upgrade and rpi-update, no change in behavior.
  • Code: Select all

    modprobe bcm2835-v4l2
    creates a /dev/video0 device, but this doesn't change behavior of raspistill or other applications. octoprint and webcamd appear to latch onto it, but killing both of those processes doesn't change the behavior of raspistill.
    I'm no longer trying load this module on startup.
  • Raspbian GNU/Linux 9 (stretch)

    Code: Select all

    > uname -r
    4.14.79+
  • In config.txt:

    Code: Select all

    start_x=1
    gpu_mem=256
  • Code: Select all

    vcgencmd version
    Nov  4 2018 16:35:17
    Copyright (c) 2012 Broadcom
    version ed5baf9520a3c4ca82ba38594b898f0c0446da66 (clean) (release)
With camera attached:

Code: Select all

vcgencmd get_camera
supported=1 detected=1
Without camera attached:

Code: Select all

vcgencmd get_camera
supported=1 detected=0
No errors found in dmesg.
syslog shows mjpeg streamer start up, and then shut down 20 seconds later, with no errors reported.
Starting mjpegstreamer from the command line manually reports, you guessed it, ENOSPC error again.

Code: Select all

vcdbg log msg
023047.138: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 40, power enable gpio = 44
023347.887: camsubs: Camera not found
023347.940: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 40, power enable gpio = 44
023648.692: camsubs: Camera not found
023648.748: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 40, power enable gpio = 44
023650.394: camsubs: Camera found OK
023652.503: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined

vcdbg log assert has no results.


Any ideas or thoughts on what to do next would be great. I would like a way to conclusively determine if it is defective hardware or a config issue.

bonanzaguy
Posts: 2
Joined: Sat Jan 05, 2019 4:55 am

Re: RPiZ + rpi camera v2.1 results in ENOSPC error.

Sun Jan 06, 2019 3:54 am

I'm unfortunately in the exact same boat as you. RPi Zero W w/ RPi camera v2.1. Exact same symptoms and errors. I ordered a replacement camera with exact same result.

I have an RPi 3B I use as a network drive. I tried the cameras on that with the same results. I've lost track of how many hours I've spent trying to get this to work now--I'm about to give up.

Out of curiosity, where did you get your camera? I got mine (both) on Amazon and they were sold by R'S Plaza. The only idea I have left at this point is a bad manufacturer, but getting two bad cameras over a month apart from each other seems very unlikely.

I would love a way to definitively determine what/where the issue is.

reddreadmorgan
Posts: 3
Joined: Fri Dec 28, 2018 1:59 am

Re: RPiZ + rpi camera v2.1 results in ENOSPC error.

Sun Jan 06, 2019 4:57 am

I got my raspi gear via sparkfun. Everything was in official raspi boxes and i've been shopping zero issues from them for years. (never raspi stuff though) They are working with me now to send a new module.

BTW, I changed dtdebug=1 to "start_debug=1" in config.txt, and now i get the same errors mentioned in another thread, namely this one, when i use:

Code: Select all

sudo vcdbg log assert

Code: Select all

507356.624: assert( 0 ) failed;
../../../../../vcfw/drivers/device/camera/imx219.c::imx219_open line 432
rev ed5baf9
vcdbg_ctx_get_dump_stack: dump_stack failed
So now I match that thread behavior in every way, though the supposed fix was a replacement module, however the OP never responded to see if that worked or not.

reddreadmorgan
Posts: 3
Joined: Fri Dec 28, 2018 1:59 am

Re: RPiZ + rpi camera v2.1 results in ENOSPC error.

Sat Jan 12, 2019 11:36 pm

Vendor sent a replacement camera, and it worked the first time. Old camera must've been a dud.

HermannSW
Posts: 880
Joined: Fri Jul 22, 2016 9:09 pm

Re: RPiZ + rpi camera v2.1 results in ENOSPC error.

Tue Jan 15, 2019 9:03 pm

reddreadmorgan wrote:
Fri Dec 28, 2018 2:48 am
... and raspistill both report the following error:

Code: Select all

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
That is exactly the error message I just saw for my working v2 camera.
Reason was that while trying to capture an image with raspistill, a browser tab with "http://192.168.178.80:8080/stream" blocked the camera.
Clicking on "back" in the browser freed the resource and returned to UV4L Streaming Server page, and following raspistill worked without issues.
bookmark list: https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/fork-raspiraw      https://github.com/Hermann-SW/userland
https://github.com/Hermann-SW/wireless-control-Eachine-E52-drone      https://twitter.com/HermannSW

Return to “Camera board”