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

STICKY: Pi Zero not seeing camera module? Please read.

Thu Sep 22, 2016 9:22 am

If you're having problems with the Pi Zero not seeing the camera module, please read on.

There have been observed now a couple of Pi Zero boards that have escaped the factory without the correct Pi revision code programmed into them. This means they pick up the wrong GPIO configuration for the GPU and are try talking to the camera using the wrong set of pins. Unsurprisingly this fails.

If you have problems, please initially try:

Code: Select all

vcgencmd otp_dump |grep ^30
if you get back the result "30:00000000", then I'm afraid your board falls into this category, and I'd also expect to see "cat /proc/cpuinfo | grep Revision" return 000F which is an original Pi B and used as a default.

When I hit this I managed a temporary workaround by adding "force_board_rev=0x900093" to the end of /boot/config.txt. I haven't reconfirmed this recently though.

There is a mechanism to set the board revision in the OTP, but I want to confirm it before adding it - being OTP you only get one chance at getting it right!

I will update this post when there is more concrete information.

This is not believed to be a widespread problem, but obviously it will be frustrating for those who hit it hence trying to provide information and a solution.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
daveake
Posts: 181
Joined: Thu Jul 12, 2012 12:07 am

Re: Pi Zero not seeing camera module? Please read.

Thu Sep 22, 2016 12:58 pm

I've tried the "force_board_rev=0x900093" bit again, and this time it worked. Dunno why it didn't yesterday.

Dave

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

Re: Pi Zero not seeing camera module? Please read.

Thu Sep 22, 2016 1:32 pm

Glad it's working now. I was a bit confused when you said it wasn't.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
daveake
Posts: 181
Joined: Thu Jul 12, 2012 12:07 am

Re: Pi Zero not seeing camera module? Please read.

Thu Sep 22, 2016 1:57 pm

Yeah, dunno what happened there. The camera has been enabled all the time in raspi-config, and after the edit /proc/cpuinfo showed the changed value, yet raspistill couldn't see the camera. Odd. Anyway working now, which saves me desoldering this zero (hard-wired to GPS/radio) and replacing it.

Dave

laurent
Posts: 240
Joined: Thu Jul 26, 2012 11:24 am

Re: Pi Zero not seeing camera module? Please read.

Fri Sep 23, 2016 12:50 pm

Thanks for the workaround :)
Does it also means that a misconfigured zero will also have a orginial B CPU frequency and memory size ? (256MB right ?)

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

Re: Pi Zero not seeing camera module? Please read.

Fri Sep 23, 2016 1:35 pm

laurent wrote:Does it also means that a misconfigured zero will also have a orginial B CPU frequency and memory size ? (256MB right ?)
Not certain.
I'd have thought that memory size was auto-detected, but that's only a hunch. I don't know for certain where governor settings come from - I'd guess Linux device tree, but could be wrong.

If you do have this issue then please let us know. Questions are being asked as to how these devices might have escaped the factory without this set correctly, so knowing how big the problem is is useful information.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Noppadol
Posts: 1
Joined: Mon Oct 17, 2016 12:59 am

Re: Pi Zero not seeing camera module? Please read.

Mon Oct 17, 2016 1:11 am

Hi,

I am very new to raspberry pi. My first Pi zero came with the same problem. However, after 2 weeks of headache it did fixed with the "force_board_rev=0x900093". Hope it is a permaent fix so i don't have to send it back to pimoroni.

Thank you everyone for the solution. Great resource!

Noppadol

Andrewides
Posts: 2
Joined: Wed Dec 21, 2016 8:08 pm
Location: Stockholm
Contact: Website

Re: Pi Zero not seeing camera module? Please read.

Wed Dec 21, 2016 8:16 pm

Thank's a lot, very useful information. I wanted to ask, and found the answer, well done!

haidi
Posts: 1
Joined: Sun Feb 05, 2017 1:30 am

Re: Pi Zero not seeing camera module? Please read.

Sun Feb 05, 2017 2:21 am

I connected the cam to a PI Zero and it didn't run, the cam-module isn't seen.

triing vcgencmd otp_dump |grep ^30 I got 00900093

I tried a second cable for the camera - it also didn't work

I used my second Raspi Zero - it didn't work.

I connect the Cam to a Raspberry 3 and used the same micro-SD-card - it worked.

On the Rasperry 3 I also tried vcgencmd otp_dump |grep ^30 - the result was 00a01041

So I changed to the Rasp Zero, added "force_board_rev=0xa01041" to the end of /boot/config.txt and rebooted.

I tried again vcgencmd otp_dump |grep ^30 and I got 00900093

What can I do?


Sorry for my bad english - I hope you understand me.

Laen
Posts: 9
Joined: Thu Mar 23, 2017 9:02 pm

Re: Pi Zero not seeing camera module? Please read.

Fri Mar 24, 2017 2:49 pm

I just received 5 Pi Zero W's which seem to be affected by this issue. They identify as B Rev 2s, and I get

Code: Select all

vcgencmd otp_dump |grep ^30
30:00000000

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

Re: Pi Zero not seeing camera module? Please read.

Fri Mar 24, 2017 3:15 pm

Laen wrote:I just received 5 Pi Zero W's which seem to be affected by this issue. They identify as B Rev 2s, and I get

Code: Select all

vcgencmd otp_dump |grep ^30
30:00000000
Do all 5 give the wrong results?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: Pi Zero not seeing camera module? Please read.

Fri Mar 24, 2017 3:40 pm

jamesh wrote:
Laen wrote:I just received 5 Pi Zero W's which seem to be affected by this issue. They identify as B Rev 2s, and I get

Code: Select all

vcgencmd otp_dump |grep ^30
30:00000000
Do all 5 give the wrong results?
Don't worry - have seen your other post - 5 from 10 show the problems. All from Adafruit? All purchased at the same time?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Laen
Posts: 9
Joined: Thu Mar 23, 2017 9:02 pm

Re: Pi Zero not seeing camera module? Please read.

Fri Mar 24, 2017 4:52 pm

Yes, all purchased from Adafruit in the same order, shipped to me on March 18th.

I didn't run the otp_dump on all of them, but they all have the same Revision in /proc/cpuinfo, so I'd strongly suspect they'd give the same results.

I'm going to be out of office for the next week, but I have a "bad" one with me to debug with.

blackkitten
Posts: 3
Joined: Mon Apr 17, 2017 9:53 am

Re: Pi Zero not seeing camera module? Please read.

Mon Apr 17, 2017 9:58 am

Hi,
I have just received my Pi Zero W and I have no luck with the NoIR camera...
Cables seems ok , firmware upgraded today, latest Raspbian lite, apt-get update and upgrade done, raspi-config enabled, increased GPU memory to 128M.

Output of

Code: Select all

vcgencmd otp_dump |grep ^30
30:009000c1
if I try:

Code: Select all

sudo vcgencmd get_camera
supported=0 detected
=0

and, of course:

Code: Select all

raspistill -o test.jpg
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not enabled in this build. Try running "sudo raspi-config" and ensure that "camera" has been enabled
I am running out of options... Could you suggest me some additional steps?
Many thanks!

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

Re: Pi Zero not seeing camera module? Please read.

Mon Apr 17, 2017 12:30 pm

Supported=0 means either the firmware is too old, or otherwise not supporting the camera on the Pi0w.
It is not the issue of the otp not being programmed as 9000c1 is the correct value for Pi0w.

Please report the output from "vcgencmd version", or try a clean download of Raspbian.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

blackkitten
Posts: 3
Joined: Mon Apr 17, 2017 9:53 am

Re: Pi Zero not seeing camera module? Please read.

Mon Apr 17, 2017 1:47 pm

Hi 6by9
many thanks for the quick reply! Raspian is pretty clean (installed two days ago , original image was 2017-03-02-raspbian-jessie-lite.img ) with no changes (I added only a couple of package like git and nano)
Firmware was updated this morning.......

Here is the output you requested:

Code: Select all

 sudo vcgencmd version
Apr  4 2017 18:41:29 
Copyright (c) 2012 Broadcom
version 3ca4cf4a663c5351eaec08b29d50d6e8324981b4 (clean) (release)
EDIT: I forgot to mention that I am using the 2.1 camera, everything was purchased from www.kiwi-electronics.nl

happy to provide additional info if needed, thanks!
Luigi

blackkitten
Posts: 3
Joined: Mon Apr 17, 2017 9:53 am

Re: Pi Zero not seeing camera module? Please read.

Tue Apr 18, 2017 9:13 pm

Answering to my own question: after putting:

Code: Select all

start_x = 1
in /boot/config.txt, it works, both video and photos. If I remove the "start_x" line, I go back into the non-working state.
I hope this helps, thanks
Luigi

DirkS
Posts: 9234
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Pi Zero not seeing camera module? Please read.

Tue Apr 18, 2017 10:32 pm

blackkitten wrote:Answering to my own question: after putting:

Code: Select all

start_x = 1
in /boot/config.txt, it works, both video and photos. If I remove the "start_x" line, I go back into the non-working state.
I hope this helps, thanks
Luigi
That line and the change in gpu_mem are added when you enable the camera in raspi-config.
So you probably did not do that.

m0ezp
Posts: 3
Joined: Thu Jun 08, 2017 5:49 pm

Re: Pi Zero not seeing camera module? Please read.

Thu Jun 08, 2017 6:53 pm

Hi,

I'm using a Pi Zero W with a v2.1 camera on a short ribbon connector as supplied by PiHut this week. I ran apt-get update and upgrade and have tried 128 and 256Mb mem split but the camera isn't being detected. I've triple checked the connector and it appears to be seated correctly, right way round, etc. I believe I've been very careful about static but I'm beginning to think the camera isn't working.

Is there anything else I can check or do?

$ vcgencmd otp_dump |grep ^30
30:009000c1
$ cat /proc/cpuinfo | grep Revision
Revision : 9000c1
$ sudo vcgencmd get_camera
supported=1 detected=0
$ raspistill -o test.jpg
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detected. Please check carefully the camera module is installed correctly
$ sudo vcgencmd version
May 30 2017 15:27:20
Copyright (c) 2012 Broadcom
version b8cdd5ae76f39d9f353dfa8fb48bf7e33b74903c (clean) (release)
$ uname -a
Linux dtcloud 4.9.30+ #1001 Fri May 26 16:03:39 BST 2017 armv6l GNU/Linux
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

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

Re: Pi Zero not seeing camera module? Please read.

Fri Jun 09, 2017 8:33 am

m0ezp wrote:$ vcgencmd otp_dump |grep ^30
30:009000c1
$ cat /proc/cpuinfo | grep Revision
Revision : 9000c1
Those are the correct values, so not the issue being discussed here.

"detected" reporting means that the Pi can't talk to the camera over I2C - it is a hardware issue somewhere. memory split won't do you any good here.
You've checked the camera connector presumably on the Pi0W and camera. There is also a small connector on the camera board connecting it to the sensor (often has the manufacturer name of Sunny" printed on it). Have you checked that connector as it can sometimes partially come off? It sometimes comes partially detached and needs to be pushed back down (gives a little click).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

m0ezp
Posts: 3
Joined: Thu Jun 08, 2017 5:49 pm

Re: Pi Zero not seeing camera module? Please read.

Fri Jun 09, 2017 8:58 am

Hi 6by9,
Many thanks for confirming it must be a hardware/connection issue and I understand now that it's not related to the original issue.
Please forgive me for asking a further question as you mentioned a small connector on the camera board. I've just taken photos below - I couldn't spot it at first but I presume its J2 on the camera side. I've had a good look and it seems firmly connected - is that the one?
camera-v2.1.jpg
camera-v2.1.jpg (55.22 KiB) Viewed 11519 times
Thanks again in advance,
David

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

Re: Pi Zero not seeing camera module? Please read.

Fri Jun 09, 2017 9:18 am

m0ezp wrote:Please forgive me for asking a further question as you mentioned a small connector on the camera board. I've just taken photos below - I couldn't spot it at first but I presume its J2 on the camera side. I've had a good look and it seems firmly connected - is that the one?
Yes, that's the one. It must only be the V1.3 cameras that had SUNNY printed on them. I didn't have a V2.1 to hand.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

m0ezp
Posts: 3
Joined: Thu Jun 08, 2017 5:49 pm

Re: Pi Zero not seeing camera module? Please read.

Fri Jun 09, 2017 9:21 am

Okay, many thanks 6by9, I'll contact my supplier

mikenf
Posts: 8
Joined: Sun Jul 16, 2017 3:34 pm

Re: Pi Zero not seeing camera module? Please read.

Wed Jul 19, 2017 10:42 pm

Hello,
my Camera Module V2.1 does not work with Raspberry Pi Zero W V1.1.
I have used last Raspbian - fresh installation with "sudo apt-get update", "sudo apt-get upgrade", "sudo apt-get dist-upgrade" and "sudo rpi-update".
Also I enabled the camera with "sudo raspi-config".
I have tried two sizes of GPU memory: 128MB and 256MB.
Command "raspistill" for this camera prints error "failed to enable component: ENOSPC".

Side note: On the other hand with the same Raspberry Pi works my other camera ZeroCam (https://thepihut.com/collections/raspbe ... ry-pi-zero). Note: I found somewhere that command "rpi-update" is deprecated and "apt-get dist-upgrade" should be enough but I think without "rpi-update" raspistill did not work.

Sorry if I'm a bit off topic but my setup and issue is similar as what had user m0ezp above.
But with exception that my camera V2.1 is detected with command "sudo vcgencmd get_camera" - so the I2C connection with camera should work. I tried to disconnect and connect again small connector on camera board - but no change.

There are commands how works raspistill and what version of system I use:

Code: Select all

[email protected]:~ $ vcgencmd otp_dump |grep ^30
30:009000c1
[email protected]:~ $ cat /proc/cpuinfo | grep Revision
Revision	: 9000c1
[email protected]:~ $ sudo vcgencmd get_camera
supported=1 detected=1
[email protected]:~ $ raspistill -o test.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

[email protected]:~ $ sudo vcgencmd version
Jul 11 2017 12:33:03 
Copyright (c) 2012 Broadcom
version aabbc2f1c981c560a6549fba5e3a0425145f8e02 (tainted) (release)
[email protected]:~ $ uname -a
Linux raspberrypi 4.9.37+ #1017 Thu Jul 13 11:14:43 BST 2017 armv6l GNU/Linux
[email protected]:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Non comment, non empty lines of config.txt saved by "raspi-config":

Code: Select all

[email protected]:~ $ cat /boot/config.txt | grep -v "^[#]" | grep -v "^$"
dtparam=audio=on
start_x=1
gpu_mem=256
Please, what else should I try to make this camera V2.1 working? Thanks in advance.

mikenf
Posts: 8
Joined: Sun Jul 16, 2017 3:34 pm

Re: STICKY: Pi Zero not seeing camera module? Please read.

Tue Jul 25, 2017 10:17 pm

Hello, in between I have checked that with other 2A power supply the behavior is the same.
Also I have connected the camera V2.1 to Raspberry Pi 2 Model B V1.1 - also the same behavior.
With the Raspberry Pi 2 I have used long ribbon cable that was delivered with the camera V2.1.
With Raspberry Pi Zero W V1.1 I have used short ribbon cable that was delivered with official case for Raspberry Pi Zero.
So reason of the issue is probably in camera itself.
So probably I should return the camera to supplier. :(

I checked that no other software is working with device with

Code: Select all

$ sudo lsof|grep video
(no output)

Also I tried with raspivid if there will be more info about error:

Code: Select all

$ raspivid -v -o video.h264
There is printed the same error message:

Code: Select all

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
I wanted to know what means "ENOSPC".
I found in https://github.com/raspberrypi/userland ... al_types.h that "MMAL_ENOSPC" means "Out of resources (other than memory)". That is very unspecific for me. I would like to know more :)

I found that this error is returned e.g. in mmal_port_event_get() from https://github.com/raspberrypi/userland ... mal_port.c . This error is returned also in several other functions. Just before return are logged more specific messages with LOG_TRACE() and LOG_ERROR().

I tried to enable logging with:

Code: Select all

$ vcgencmd vcos log set mmalsrv info
$ vcgencmd vcos log set mmal-opaque info
$ vcgencmd vcos log set default info
But no more messages in output of raspivid. Also I checked new files in /var/log/.

Please how can I enable logging? Should I recompile the raspivid in some way? Or should I set some environment variable?
Thanks in advance for answers.

Return to “Camera board”