Batch of Bad Pi Cameras

I was trying to help someone’s students with a Pi Camera. The students, teacher, and I all got error messages that started with mmal: mmal_vc_component_enable: failed to enable component: ENOSPC

A replacement camera from a different source works.

Here’s the test: With the camera attached, in a terminal window type: raspistill -o Desktop/img.jpg. If it works, good. If you get these messages:

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

then try: vcgencmd get_camera. If you get supported=1 detected=1, then you quite likely have a bad camera.

Several hours of Googling around and trying stuff led me to several reports of a batch of cameras made in China that have bad firmware. If your camera fails the above test and it was made in the PRC, my advice is to return it. Try to get it replaced with one made in the U.K., although my newest one, which works, was made in the PRC.

In spite of what the error messages say, it is probably a bad idea to run rpi-update. I’m guessin’ the “firmware” in the error message is the camera firmware, and I don’t know of a way to update it. If you are tempted to run rpi-update anyway, please read this first: https://raspberrypi.stackexchange.com/a/4363/85029

(Dunno why there’s stuff bold in the error messages. It’s all plain text on the screen.)