User avatar
MinecraftTom16
Posts: 57
Joined: Wed Nov 08, 2017 4:29 am
Location: Budapest, Hungary
Contact: Website Skype YouTube

camera not working

Mon Dec 04, 2017 7:08 am

I was just making a laptop, with the camera module as a webcam, yesterday it still worked, but today I typed the normal $ sudo raspi config and this came up:

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 updated it with

Code: Select all

$ sudo rpi-update
just now, but no luck.
please can you tell me what I'm missing?
I'm hoping for a fast answer, but do what you can, please help

User avatar
DougieLawson
Posts: 37552
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: camera not working

Mon Dec 04, 2017 7:48 am

Have you added

Code: Select all

gpu_mem=128
start_x=1
in /boot/config.txt?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
MinecraftTom16
Posts: 57
Joined: Wed Nov 08, 2017 4:29 am
Location: Budapest, Hungary
Contact: Website Skype YouTube

Re: camera not working

Tue Dec 05, 2017 1:35 am

no, but can you explain how, because I never edit those files; I never need to. Please can you tell me how?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8073
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: camera not working

Tue Dec 05, 2017 6:47 am

Easier to use raspi-config as stated in the https://www.raspberrypi.org/documentati ... /camera.md
Enabling the camera in there makes the changes in config.txt for you.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
MinecraftTom16
Posts: 57
Joined: Wed Nov 08, 2017 4:29 am
Location: Budapest, Hungary
Contact: Website Skype YouTube

Re: camera not working

Tue Dec 12, 2017 8:16 am

I did just that: in terminal I typed

Code: Select all

$ sudo raspi-config
and enabled the camera from interfacing options, and rebooted, but it still didn´t work.

User avatar
MinecraftTom16
Posts: 57
Joined: Wed Nov 08, 2017 4:29 am
Location: Budapest, Hungary
Contact: Website Skype YouTube

Re: camera not working

Tue Dec 12, 2017 12:31 pm

also the gpu memory split right now is set to 128.

SkyRise
Posts: 179
Joined: Tue Jan 24, 2012 1:20 pm

Re: camera not working

Tue Dec 12, 2017 12:35 pm

If it was working before, it may be that the ribbon cable has come loose (at either end)

User avatar
MinecraftTom16
Posts: 57
Joined: Wed Nov 08, 2017 4:29 am
Location: Budapest, Hungary
Contact: Website Skype YouTube

Re: camera not working

Tue Dec 12, 2017 12:36 pm

and i just checked the config.txt file, and those 2 lines you mentioned are there(not commented) and exactly the same.

User avatar
MinecraftTom16
Posts: 57
Joined: Wed Nov 08, 2017 4:29 am
Location: Budapest, Hungary
Contact: Website Skype YouTube

Re: camera not working

Tue Dec 12, 2017 12:37 pm

oh ive checked the ribbon cable and its not that

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8073
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: camera not working

Tue Dec 12, 2017 1:37 pm

Code: Select all

vcgencmd get_camera
It'll reply with something like

Code: Select all

supported=1 detected=1
If supported=0 then you haven't enabled it, or it is otherwise disabled in software.
If detected=0 then the Pi can't talk to the camera. Check the ribbon cable again, and that the little connector between the camera and the PCB is fully home. (*)
If detected=1 but you're still getting errors from raspistill/vid, then something funny is going on in the software.

(*) As a secondary test you could add "dtparam=i2c_vc=on" to /boot/config.txt, "raspi-gpio set 41 dh", and then run "sudo i2cdetect -y 0" to see if the I2C device is responding. The V2 camera should respond on 0x10 and 0x64, V1 responds on 0x36. The raspi-gpio command is based on a B+ or Pi2. Pi3 needs alternate settings.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
MinecraftTom16
Posts: 57
Joined: Wed Nov 08, 2017 4:29 am
Location: Budapest, Hungary
Contact: Website Skype YouTube

Re: camera not working

Wed Dec 13, 2017 12:21 pm

I got

Code: Select all

supported=1 detected=1
, so i dont know whats happening. the raspistill/vid is still not working.

does somebody know by any chance how to reinstall the software?
or a better solution if there is. thx

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8073
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: camera not working

Wed Dec 13, 2017 2:21 pm

Add "start_debug=1" to the end of /boot/config.txt and reboot.
Run raspistill or raspivid
Run "sudo vcdbg log assert". If it includes

Code: Select all

049839.200: assert( 0 ) failed; ../../../../../vcfw/drivers/device/camera/imx219.c::imx219_open line 431 rev 89a5328
vcdbg_ctx_get_dump_stack: dump_stack failed
then I'm afraid you probably have a faulty module.

There haven't been any changes around that area of the camera stack that I'm aware of recently.
Resetting to the standard Raspbian firmware would be a sensible step ("sudo apt-get update" "sudo apt-get install --reinstall raspberrypi-bootloader"). rpi-update is only recommended for those really wanting the cutting edge firmware/kernel, and that they accept there may be regressions.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

jamesdinsmore
Posts: 3
Joined: Sun Jan 18, 2015 6:22 pm

Re: camera not working

Sat Dec 29, 2018 9:40 pm

I had a funny issue that relates to this. I had 2 surveillance Pi camera that were working until I purchased acrylic camera cases for them. The case itself pushed on the camera element's micro-connector so the camera was not being detected. Then a reboot was needed to make the system work as before. Maybe this will help somebody.

pulkit2328
Posts: 10
Joined: Tue Jan 15, 2019 6:31 pm

Re: camera not working

Wed Feb 27, 2019 9:16 pm

I am getting supported=1 detected=0
I have triple checked both ends of the cable and SUNNY too.
Camera was working yesterday but today it is showing NOT ENABLED and OUT OF MEMORY.

cyborg07
Posts: 7
Joined: Mon Oct 10, 2016 9:03 am

Re: camera not working

Thu Mar 07, 2019 5:14 pm

Same was the issue with me today. I doubt it is the broken flex cable.I am moving to USB cam now.
anything new on your side?

pulkit2328
Posts: 10
Joined: Tue Jan 15, 2019 6:31 pm

Re: camera not working

Thu Mar 07, 2019 5:36 pm

I have ordered a ribbon cable lets see if this problem goes away with a new cable.
My application requires a smaller camera so cant use a USB one.

pulkit2328
Posts: 10
Joined: Tue Jan 15, 2019 6:31 pm

Re: camera not working

Fri Mar 29, 2019 1:06 pm

Camera is working fine with the new cable.

battal51280
Posts: 4
Joined: Sat Jan 11, 2020 1:50 pm

Re: camera not working

Tue Jan 21, 2020 4:37 pm

i have a really weird situation, vcgencmd shows detected=1 while camera is not connected and camera name is toshh2c
again camera not connected, csi port is empty, rebooted after disconnecting camera.
same thing happens when camera connected, maybe csi port on raspberry could be broken but i can't see any defect on port
~# raspistill -v -f

"raspistill" Camera App (commit a14ee020d361 Tainted)

Camera Name toshh2c
Width 1920, Height 1080, filename (null)
Using camera 0, sensor mode 0

GPS output Disabled

Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
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'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
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

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25408
Joined: Sat Jul 30, 2011 7:41 pm

Re: camera not working

Tue Jan 21, 2020 5:52 pm

battal51280 wrote:
Tue Jan 21, 2020 4:37 pm
i have a really weird situation, vcgencmd shows detected=1 while camera is not connected and camera name is toshh2c
again camera not connected, csi port is empty, rebooted after disconnecting camera.
same thing happens when camera connected, maybe csi port on raspberry could be broken but i can't see any defect on port
~# raspistill -v -f

"raspistill" Camera App (commit a14ee020d361 Tainted)

Camera Name toshh2c
Width 1920, Height 1080, filename (null)
Using camera 0, sensor mode 0

GPS output Disabled

Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
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'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
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
Please start a new thread for a new problem.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

vaden_arth
Posts: 1
Joined: Mon Feb 03, 2020 8:37 pm

Re: camera not working

Mon Feb 03, 2020 8:41 pm

My camera had the smaller lens board connected the other way round.
i.e the lens board was hanging outside the camera board , rather than on the board , like how it is supposed to be

Do check that too, I was stuck with this issue for a long time now , this is my first time using rasp pi

Return to “Camera board”