No camera feed visible and only one Camera LED illuminated

StereoPi hardware discussion
Post Reply
78163
Posts: 11
Joined: Sat Feb 29, 2020 11:33 pm

No camera feed visible and only one Camera LED illuminated

Post by 78163 »

I've read through all of the forum entries on camera issues, but none have the exact same parameters. Regardless, I've tried those steps outlined in other forum entries to no avail.

Hardware: StereoPi Starter Kit with provided microSD. All hardware used is what was supplied with zero substitutions.

General Symptoms: Device boots and displays white StereoPi logo. System is accessible and interactive at: http://stereopi.local/update.html, but with no camera feeds available. Console at http://stereopi.local/update.html is functional.

BLUF: Only one camera socket on the StereoPi seems to be functioning. I have swapped cameras back and forth between the two sockets upwards of seven times. Only one camera LED illuminates at one time. When cameras are swapped, the opposite camera LED illuminates. This ties it to the specific socket and rules out a camera issue.

On the console, typing "raspistill -cs 0" or "raspistill -cs 1" yields:

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


However, the subsequent troubleshooting step of "vcgencmd get_camera" yields:

supported=2 detected=2

As aforementioned, I've swapped cameras numerous times, taking care to blow out the socket and seat the cable properly. I know the first solution will be concerning the cable seating, however I emphasize that one socket works every time, so technique is not the limiting factor. Thank you for your time and assistance.

stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: No camera feed visible and only one Camera LED illuminated

Post by stereomaton »

Just a few notes to help you before Realizator can give a better answer.

I think that only the left camera led is on, even in stereo capture. I do not have my stereopi here to confirm.

The commands you give result in a mmal error because there is probably a software that use the cameras. Typically on SLP (the system delivered in the SD card of the kit) the program raspivid takes control.
You can kill it and quickly test your command before the control loop relaunchs it, or better use /opt/StereoPi/stop.sh script to stop this loop.

After that you can check your cameras individually and in stereo mode for example. Do not forget to store the resulting image in a writable partition, e.g. /tmp/ although this one has limited size.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

78163
Posts: 11
Joined: Sat Feb 29, 2020 11:33 pm

Re: No camera feed visible and only one Camera LED illuminated

Post by 78163 »

Thank you for the reply!

That's good to know about the lights on each individual camera.

RE: raspivid operating in the background, this would be a problem everyone would experience then, no? Also with 'ps' command, raspivid is not operating in the background. So I'm not sure how raspivid is interfering without being a running process unless the stereopi code is calling it, which then leads me back to a universal problem for everyone.

RE: Images. Taking a snapshot increments the filename, but no file is written to the media directory. Clicking on the hotlink for the filename opens a 404 error message in the browser, indicating the system did not actually record the file.

stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: No camera feed visible and only one Camera LED illuminated

Post by stereomaton »

Again I do not have a board to check right now.

The command "ps" do not list all processes by default. In particular the processes launched by other users and processes without associated terminal are filtered out if I remember well. I personally often use "ps aux" which lists more processes than the default.

The main purpose of SLP is to give a simplified way to stream video over the network, and for this it obviously needs to use the cameras. For "advanced" users who want to access the cameras directly, they can stop the control loop as I indicated or probably better (depending on the purpose) use the OpenCv image available in the wiki in which the opencv library is already installed for advanced processing.

About the 404 error, I think I faced it in the past. Not sure, but there are several ways to access to the image folder and I think one of them did not work for me (and I forgot to report it, by the way). The best way to check if the images are recorded is to put the SD directly in your PC, or check the folder in console.
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: No camera feed visible and only one Camera LED illuminated

Post by Realizator »

Hi 78163,
Ok, let's try to localize the problem.
Stereomaton, thank you for your help! :-)

So, for SLP you should at first prepare it for the tests. You need to stop our scripts, as they use the camera. Furthermore, killing a raspivid or gstreamer processes manually will not help, as our scripts will restart them automatically. Run this command once after reboot:
/opt/StereoPi/scripts/stop.sh
Now all your cameras are free, and you can try to access them.
You mentioned you have "supported=2 detected=2" from your "vcgencmd get_camera". It means that at least several lines on your cameras are connected correctly. I mean I2C lines, used for the cameras detection.
After that try "raspistill -cs 0" and "raspistill -cs 1".
If some of these tests are failed, try to swap your cameras, and do these tests again.
After this couple of tests you can find, if it is a problem with one of the cameras, or with the StereoPi connector.

If you find that is is a camera problem (and you know which one is in a trouble), try these options:
1. Check if a small "Sunny" connector on the camera green PCB is sitting fine (slightly press it to be shure).
2. Try to swap a sides of your camera cable ribbon, or try another camera ribbon cable (like 5cm from your Starter kit).

As for the red LEDs - yes, Stereomaton is right. In a stereoscopic mode only one led will light up, but not both on a both cameras.

You can use another approach for the tests with the SLP.
First, look inside the stereopoi.conf file in a /BOOT partition. You can find a row
video_mode=3D
Set it to 2D instead of 3D.
Now try to connect just one camera and boot. After that turn off power, and connect another camera. This will help you to see, if both cameras are working good. If yes - it is a StereoPi trouble, otherwise it is a camera issue.

Could you please share your tests results? We will send you a replacement if it is a hardware trouble, just try to localize the problem unit.
UPD> You get 404 after taking a photo as name and path generation part starts before image capture procedure. If your StereoPi will work in 2D mode, these links should work.
Eugene a.k.a. Realizator

78163
Posts: 11
Joined: Sat Feb 29, 2020 11:33 pm

Re: No camera feed visible and only one Camera LED illuminated

Post by 78163 »

Realizator and Stereomaton,

Thanks for the feedback and assistance. I'm away from the hardware for a couple of days, but will definitely run the commands recommended. I really appreciate the help trying to get this thing running! I'll document everything and include it (play by play style) in the next reply. Again, thanks!

v/r,

x78163

78163
Posts: 11
Joined: Sat Feb 29, 2020 11:33 pm

Re: No camera feed visible and only one Camera LED illuminated

Post by 78163 »

Realizator wrote:
Tue Mar 03, 2020 12:00 pm
So, for SLP you should at first prepare it for the tests. You need to stop our scripts, as they use the camera. Furthermore, killing a raspivid or gstreamer processes manually will not help, as our scripts will restart them automatically. Run this command once after reboot:
/opt/StereoPi/scripts/stop.sh
Now all your cameras are free, and you can try to access them.
You mentioned you have "supported=2 detected=2" from your "vcgencmd get_camera". It means that at least several lines on your cameras are connected correctly. I mean I2C lines, used for the cameras detection.
After that try "raspistill -cs 0" and "raspistill -cs 1".
If some of these tests are failed, try to swap your cameras, and do these tests again.
After this couple of tests you can find, if it is a problem with one of the cameras, or with the StereoPi connector.
I rebooted, stopped the services with the /opt/StereoPi/scripts/stop.sh and ran "vcgencmd get_camera" and "raspistill -cs 0" and "raspistill -cs 1". All I got was the following:

Image

I rebooted and the result was:

Image

I tried the above with cameras swapped, only one camera in one position (both cameras), only one camera in the opposite position (both cameras) and no cameras. I still get:

Image

Realizator wrote:
Tue Mar 03, 2020 12:00 pm
If you find that is is a camera problem (and you know which one is in a trouble), try these options:
1. Check if a small "Sunny" connector on the camera green PCB is sitting fine (slightly press it to be shure).
2. Try to swap a sides of your camera cable ribbon, or try another camera ribbon cable (like 5cm from your Starter kit).
I tried that, no resolution. I used pi cameras I have outside of the kit, no resolution. I've tried 3x different camera cables, no resolution.
Realizator wrote:
Tue Mar 03, 2020 12:00 pm
You can use another approach for the tests with the SLP.
First, look inside the stereopoi.conf file in a /BOOT partition. You can find a row
video_mode=3D
Set it to 2D instead of 3D.
Now try to connect just one camera and boot. After that turn off power, and connect another camera. This will help you to see, if both cameras are working good. If yes - it is a StereoPi trouble, otherwise it is a camera issue.
I changed the stereopi.conf file from 3D to 2D and booted with only one camera, testing both slots. I could not get it to save a picture (see below) or display a picture at all. I swapped cameras and still no ability to save a picture (see below) or display a picture.
Realizator wrote:
Tue Mar 03, 2020 12:00 pm
UPD> You get 404 after taking a photo as name and path generation part starts before image capture procedure. If your StereoPi will work in 2D mode, these links should work.
Links still generate a 404. I've expanded file read-write access to every user. Entire filesystem is effectively unlocked. Clicking on files does not open them for viewing, but just kicks a 404.

I've removed the SD card from the pi after powerdown and browsed through all the possible storage locations. Files written state they are a JPG, but the filesize is effectively nil (1kb). Files do not open, indicating with the filesize that the 'captured' image is null.

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: No camera feed visible and only one Camera LED illuminated

Post by Realizator »

Hi 78163,
Well, this behavior is very unusual for me. I'm curious, how this unit passed all factory tests (as image capture is one of the test procedures).
I noticed you use web console over admin panel. It has some limitations, and it is better to use SSH access.
So what we have now: you tested all possible combinations, including other cameras. Cameras are detected, but not working.
Could you please do one more experiment - write our latest OpenCV image and test both cameras with the raspistill -cs 0 and 1. With this image you need to use keyboard, mouse and monitor.
If this test with another Raspbian image will show the same results, I will send you a replacement board.
Eugene a.k.a. Realizator

78163
Posts: 11
Joined: Sat Feb 29, 2020 11:33 pm

Re: No camera feed visible and only one Camera LED illuminated

Post by 78163 »

Wilco! It might be a few days. I'll run all of the previous commands through SSH and then try the OpenCV image. Thanks for your help!

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: No camera feed visible and only one Camera LED illuminated

Post by Realizator »

Okay!
By the way, are you a pilot? AFAIK "Wilco" is a part of aviation slang... :geek:
Eugene a.k.a. Realizator

78163
Posts: 11
Joined: Sat Feb 29, 2020 11:33 pm

Re: No camera feed visible and only one Camera LED illuminated

Post by 78163 »

Realizator wrote:
Wed Mar 11, 2020 10:59 am
I noticed you use web console over admin panel. It has some limitations, and it is better to use SSH access.
I tried the commands again with SSH. I didn't kick any errors this time, however no image saved. I checked the sd card on another computer and nothing wrote.
Realizator wrote:
Wed Mar 11, 2020 10:59 am
So what we have now: you tested all possible combinations, including other cameras. Cameras are detected, but not working.
Yes. But...see below
Realizator wrote:
Wed Mar 11, 2020 10:59 am
Could you please do one more experiment - write our latest OpenCV image and test both cameras with the raspistill -cs 0 and 1. With this image you need to use keyboard, mouse and monitor.
This is where it gets really mind bending. I flashed the linked image to a new SD card. Everything booted fine. On first boot, raspistill -cs 0 and 1 would open a preview window and then close appx 5 seconds later, each camera worked just fine.

I decided to try the 1_test.py python file. The script began execution, but did not open any preview windows. I typed Q per the instructions and after 1 minute, it kicked a time out error on line 73 and 1704 'timed out waiting for capture to end'. I rebooted and tried again with lowercase q. Same. I checked the photo.png file and it is still the factory stand-in.

I ran raspistill -cs 0 and 1 again, and now 0 won't open the preview window. I powered down, swapped cameras and tried the command again. 1 opens preview window, 0 won't. Neither is writing to file. I ran vcgencmd get_camera and still had 2 cameras detected.

I'm really at a loss trying to isolate the issue. What I know for sure between both pi boot images is that zero images have been captured. The only time I have seen video from the cameras was with the OpenCV image for both cameras independently at first and then only 1 camera subsequently.

RE pilot question: Yup! I am an AH-64D pilot but moved into the UAS arena.

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: No camera feed visible and only one Camera LED illuminated

Post by Realizator »

78163, I think it is possible to localize the problem, but it takes too much time. Let me send you a replacement Starter kit. Using it you can localize a problem in your kit (if you wish).
I will send you an email to the address you used for registering on our forum.
p.s. Theoretically it might be a Compute Module bug, StereoPi bug, micro SD bug or a camera(s) bug. In any case, having another kit should help you.
Eugene a.k.a. Realizator

78163
Posts: 11
Joined: Sat Feb 29, 2020 11:33 pm

Re: No camera feed visible and only one Camera LED illuminated

Post by 78163 »

>Ticket Closed<

Thanks @Realizator! Everything is running smoothly. When/If I swap parts and find the malfunction, I'll post the info here for future queries.

v/r,

Joe

Post Reply