dman721
Posts: 3
Joined: Sun Sep 18, 2016 1:33 pm

PiCamera detected but not working

Fri Jul 30, 2021 8:30 pm

Hi, I have searched many posts on this topic, but none of them resolved my issue.

I have a Raspberry Pi 3 and a v2.1 PiCamera module. I setup this years ago and it worked fine. I recently tried using it again and it failed. reading through many posts trying reinstalls, upgrading, anything I can find still did not resolve my issue. I even bought a New camera and it still would not work. I tried it on another Raspberry Pi (v2b) and still no luck. So I'm back to square one and trying to start my own thread for help.


Here is the issue when trying to capture an image in a command line:
pi@raspberrypi:~ $ raspistill -o image.jpg
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


Here are a few thinks I tried to see the camera was being detected:
pi@raspberrypi:~ $ ls -ltrh /dev/video*
crw-rw----+ 1 root video 81, 2 Jul 30 15:35 /dev/video12
crw-rw----+ 1 root video 81, 1 Jul 30 15:35 /dev/video11
crw-rw----+ 1 root video 81, 0 Jul 30 15:35 /dev/video10
crw-rw----+ 1 root video 81, 3 Jul 30 15:35 /dev/video0
pi@raspberrypi:~ $ vcgencmd get_camera
supported=1 detected=1


I also have the camera enabled and i2c enabled in my rasp-config. Along with I tripled checked all connections from raspberry pi to camera module, to the b2b connector on the camera module itself.

Also, followed troubleshooting steps from this post comment #2: viewtopic.php?t=211188

I also tried updating picamera:
pi@raspberrypi:~ $ sudo pip install -U picamera
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: picamera in /usr/local/lib/python3.5/dist-packages (1.13)
Collecting picamera
Using cached https://www.piwheels.org/simple/picamer ... ne-any.whl (154 kB)
Using cached https://www.piwheels.org/simple/picamer ... ne-any.whl (120 kB)
pi@raspberrypi:~ $ sudo pip3 install -U picamera
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: picamera in /usr/local/lib/python3.5/dist-packages (1.13)
Collecting picamera
Using cached https://www.piwheels.org/simple/picamer ... ne-any.whl (154 kB)
Using cached https://www.piwheels.org/simple/picamer ... ne-any.whl (120 kB)


Any help would be greatly appreciated.

cleverca22
Posts: 4345
Joined: Sat Aug 18, 2012 2:33 pm

Re: PiCamera detected but not working

Sun Aug 01, 2021 1:45 am

dman721 wrote:
Fri Jul 30, 2021 8:30 pm
pi@raspberrypi:~ $ raspistill -o image.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
i think you need to increase the gpu_mem= in /boot/config.txt, try 128?

pcmanbob
Posts: 11636
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: PiCamera detected but not working

Sun Aug 01, 2021 10:00 am

It might help if you check everything again by following the is tutorial.

https://projects.raspberrypi.org/en/pro ... h-picamera
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

dman721
Posts: 3
Joined: Sun Sep 18, 2016 1:33 pm

Re: PiCamera detected but not working

Sun Aug 01, 2021 3:54 pm

Thank you for your replies.

@cleverca22 my gpu_mem is set at 192

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
start_x=1
gpu_mem=192
start_debug=1

@pcmanbob Thank you, I reran the setup multiple times, with still no luck :-( I even tried it once more

cleverca22
Posts: 4345
Joined: Sat Aug 18, 2012 2:33 pm

Re: PiCamera detected but not working

Sun Aug 01, 2021 4:03 pm

i dont think its valid to mix start_x and start_debug, they do conflicting things

dman721
Posts: 3
Joined: Sun Sep 18, 2016 1:33 pm

Re: PiCamera detected but not working

Sun Aug 01, 2021 5:25 pm

Ok, not sure what those are for, but I commented out the debug and rebooted. No difference.

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
start_x=1
gpu_mem=192
# start_debug=1

Return to “Troubleshooting”