Pi Cam problem

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Pi B running Raspbrian

I've had a Pi Cam hooked up to my Pi for a while now, and whilst it has  
only been used intermittently, it has worked.  I've been able to run  
Motion and (from a Ubuntu box) vlc successfully.

A few weeks back, I noticed that the camera was no longer working.  I've  
now had time to do a bit of digging, and if I run :

raspistill -o test.jpg

I get :

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've tried swapping the Pi Cam for another brand new one, and I still  
get the same result.  Any suggestions as to where to look next ?

Thanks

Adrian
--  
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
We've slightly trimmed the long signature. Click to see the full one.
Re: Pi Cam problem
On Sat, 18 Apr 2015 11:12:38 +0100, Adrian wrote:

Quoted text here. Click to load it

As the error message mentions checking for firmware updates, is it  
possibly one of those occasions where executing `sudo rpi-update` is  
called for?

--  
Alex

Re: Pi Cam problem
On 18/04/2015 12:58, Alex Potter wrote:
Quoted text here. Click to load it

Also, and probably regularly:
sudo apt-get update && sudo apt-get upgrade

Re: Pi Cam problem
Quoted text here. Click to load it

Sorry, I should have said, I did that before the rpi-update.


Adrian
--  
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
We've slightly trimmed the long signature. Click to see the full one.
Re: Pi Cam problem
On 18/04/15 11:12, Adrian wrote:
Quoted text here. Click to load it

What is your memory split? I think the ENOSPC error can occur if you
haven't allocated enough memory to the GPU in config.txt.

You can check how much is allocated with

vcgencmd get_mem gpu

Re: Pi Cam problem
After look through the whole internet, I solved the problem by raising the memory allocated for the GPU. Thank very, very much!!!

Re: Pi Cam problem
Quoted text here. Click to load it

Thanks to Dom and Alex Potter for their replies.

vcgencmd get_mem gpu

gpu12%8M

rpi-update appears to have succeeded (no error messages, and a  
successful reboot afterwards), but still no success with the camera,  
running the raspistill command gives the same output as before.


Adrian
--  
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
We've slightly trimmed the long signature. Click to see the full one.
Re: Pi Cam problem
On Sat, 18 Apr 2015 11:12:38 +0100, Adrian wrote:

Quoted text here. Click to load it

The camera is still enabled via raspi-config isn't it?

--  
Cheers
Dave.




Re: Pi Cam problem
Quoted text here. Click to load it

Thanks for the suggestion.

I've run raspi-config, and that suggested that the camera was disabled.  
I set it to enabled, and rebooted, and I'm still getting the same error.

Not sure if this is right or not, but post reboot, I checked  
raspi-config again, and it still had the camera as disabled.

For what it's worth, the red light on the camera is on, so if nothing  
else, it is getting power.


Adrian
--  
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
We've slightly trimmed the long signature. Click to see the full one.
Re: Pi Cam problem
On Sun, 19 Apr 2015 19:11:12 +0100, Adrian wrote:

Quoted text here. Click to load it

That's what raspi-config does here. My camera is working.

Quoted text here. Click to load it

Wonder if this bit of python will do what it's supposed to do?

ledflash.py

#!/usr/bin/env python
import time
import RPi.GPIO as GPIO

# Use GPIO numbering
GPIO.setmode(GPIO.BCM)

# Set GPIO for camera LED
CAMLED = 5

# Set GPIO to output
GPIO.setup(CAMLED, GPIO.OUT, initial=False)

# Five iterations with half a second
# between on and off
for i in range(100):
  GPIO.output(CAMLED,True)  # On
  time.sleep(0.5)
  GPIO.output(CAMLED,False) # Off
  time.sleep(0.5)

GPIO.cleanup()

--  
Cheers
Dave.




Re: Pi Cam problem
Quoted text here. Click to load it

Thanks.

If it is supposed to flash the light on and off, it works (I had to run  
it as root).


Adrian
--  
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
We've slightly trimmed the long signature. Click to see the full one.
Re: Pi Cam problem
On Sun, 19 Apr 2015 21:41:47 +0100, Adrian wrote:

Quoted text here. Click to load it

Yep, flashes the LED, though that probably just means that the LED is
connected to the relevant GPIO pin. Rather than sending a command to
the camera module to switch the LED on/off...

--  
Cheers
Dave.




Re: Pi Cam problem
Quoted text here. Click to load it

Right, I think I have the answer to this one.

It seems that you can't run either vlc or raspistill if motion is  
already running.  However, if you stop motion, you can run either vlc or  
raspistill.

I assume that in the past when I've had vlc running, I've had motion  
turned off.


Adrian
--  
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline