arashi256
Posts: 9
Joined: Thu Mar 06, 2014 11:03 pm

NoIR camera - raspistill giving error

Thu Mar 06, 2014 11:10 pm

Hello - first post :)

I've recently been using the Camera module with success and just bought the NoIR infrared camera module. I've run the following to check that it's detected: -

Code: Select all

vcgencmd get_camera
which returns success: -

Code: Select all

supported=1 detected=1
...but when I run raspistill I get 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
I'm up to date on everything, eg: -

Code: Select all

sudo apt-get update && sudo apt-get upgrade
sudo rpi-update
and obviously the camera has been enabled. The normal camera module works fine with raspistill but the NoIR camera fails. What does "mmal: mmal_vc_component_enable: failed to enable component: ENOSPC" mean? Any fix or advice?

NewPi
Posts: 66
Joined: Sat Aug 18, 2012 2:52 pm

Re: NoIR camera - raspistill giving error

Sat Mar 08, 2014 10:38 am

Exactly the same error, I am using the RPi camera module.
Raspberry Pi Howto, Tips, Tricks and Tools -> http://bit.ly/RPiTricks

arashi256
Posts: 9
Joined: Thu Mar 06, 2014 11:03 pm

Re: NoIR camera - raspistill giving error

Sat Mar 08, 2014 10:43 am

I've actually fixed it. The little "sunny" connector between the camera module and the board needed to be gently pushed down until it clicks. I discovered the camera module case I use was pushing the connector out ever so slightly when I inserted the camera. This worked with another normal camera module I thought was broken too.

NewPi
Posts: 66
Joined: Sat Aug 18, 2012 2:52 pm

Re: NoIR camera - raspistill giving error

Sat Mar 08, 2014 10:45 am

arashi256 wrote:I've actually fixed it. The little "sunny" connector between the camera module and the board needed to be gently pushed down until it clicks. I discovered the camera module case I use was pushing the connector out ever so slightly when I inserted the camera. This worked with another normal camera module I thought was broken too.
With "
The little "sunny" connector between the camera module and the board
" do you mean the Flex cable?
Raspberry Pi Howto, Tips, Tricks and Tools -> http://bit.ly/RPiTricks

arashi256
Posts: 9
Joined: Thu Mar 06, 2014 11:03 pm

Re: NoIR camera - raspistill giving error

Sat Mar 08, 2014 11:10 am

No. On the camera board itself just under the black plastic camera module there is a tiny plastic flap (which is yellow on mine) labelled "sunny". This connects the camera to the camera board. This can come loose which - for me at least - caused all sorts of strange errors with raspistill. Give it a little push with your thumb until it clicks and you're golden.

NewPi
Posts: 66
Joined: Sat Aug 18, 2012 2:52 pm

Re: NoIR camera - raspistill giving error

Sat Mar 08, 2014 11:16 am

arashi256 wrote:No. On the camera board itself just under the black plastic camera module there is a tiny plastic flap (which is yellow on mine) labelled "sunny". This connects the camera to the camera board. This can come loose which - for me at least - caused all sorts of strange errors with raspistill. Give it a little push with your thumb until it clicks and you're golden.

For me an

Code: Select all

rpi-update
seems to have fixed the issue.
Raspberry Pi Howto, Tips, Tricks and Tools -> http://bit.ly/RPiTricks

wesman732
Posts: 2
Joined: Sat Mar 08, 2014 10:30 pm

Re: raspivid giving error in bash

Sat Mar 08, 2014 11:19 pm

Preview Yes, Full screen No
Preview window 700,200,200,100
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip Yes, vflip Yes
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
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


I get the above but only when running a bash script. Googleing ENOSPC seems to be related to too many open files. In bash how does one close down raspivid properly and close all files?
I have tried updating the software and firmware. i tried changing the /etc/modules.
rastistill and raspivid work fine from the command line. i actually get files saved some of the time. i want to bee sure i get recorded video for 5 or 10 minutes. i tried the memory split. i tried under and over clocking. something strange here.

Code: Select all

#!/bin/bash
#for automatically taking timelapse photos
sudo modprobe bcm2835-v4l2
sleep 10;

SAVEDIR=/home/pi/images/

while [ true ]; do

filename=PiCam-$(date +"%Y%m%d%H%M%S").h264


raspivid -o $SAVEDIR/$filename -t 600000 -vf -hf -p 700,200,200,100 -v  

#sleep for 10 ten seconds

sleep 10

done;



wesman732
Posts: 2
Joined: Sat Mar 08, 2014 10:30 pm

Solved

Sun Mar 09, 2014 7:27 pm

My script above actually works. When I started another lxterminal instance to view the verbose camera status, it started a second instance of RASPISTILL or RASPIVID. As stated in this forum only one can operate at a time.

echo .bashrc : Running Camera Application
bash /etc/init.d/takevideo.sh

There is probably a way to open a LXTerminal first before starting my takevideo.sh but an entry in .bashrc was an effective autostart up of the camera at boot up. Some of the example I've see on when googeling either did not work or they seemed more complex than necessary. I enabled boot to GUI in Raspi-config. My next steps in my project are to get solution to running off a battery and a check to shutdown properly when the SD card is full. I have a 32GB SD card for video recording. The default options give a 700MB file for 10 minutes of video.

Return to “Camera board”