Not working cameras

Other software discussion
Post Reply
WillfordRockwell
Posts: 2
Joined: Sun Apr 28, 2019 1:18 pm

Not working cameras

Post by WillfordRockwell »

Hello to everyone.

Initially, everything worked well. But after a two-month break in development, today I launched StereoPi and did not receive from HDMI image. Only the first camera's LED is on, both cameras are workable. An attempt to see the image through the application on the phone was a failure. I thought that the problem would be solved by loading a fresh SLP image (0.2.3), but the problem remained. I can connect via ssh, local IP, but there is no image. With the commands "raspistill -cs 0" and "raspistill -cs 1" nothing happens, the programs hang, I have to interrupt them. I suspect that this is a software problem, please tell me, in what configuration files I should see the initialization of the cameras?

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

Re: Not working cameras

Post by Realizator »

Hi!
First notice: our S.L.P. image uses the cameras all the time. So if you try to use raspistill you get an error like you have, as both S.L.P. and your raspistill instance will try to access cameras at the same time, and conflict appears. To avoid this, stop our scripts by running "stop.sh" here:

Code: Select all

/opt/StereoPi/stop.sh
Do not try to use "killall" for raspivid, as our scripts will automatically restart it. Just run "stop.sh"

Second notice: built-in Raspbian stereoscopic mode support uses the only camera LED. That is while both your cameras used now, you see the only camera red LED is on. Please take this into account and do not use this as a criteria for camera status.

If you use fresh 0.2.3 S.L.P., both cameras should be enabled in config file by default (I mean stereopi.conf in a /BOOTpartition), but please check this too. You should have "video_mode=3D" in a second row.

I can suggest you have some mechanical issue, like not 100% connection on one of camera ribbons side. What I'm doing in a case like yours:
1. Try to run

Code: Select all

vcgencmd get_camera
If everything is Ok you will see this answer:

Code: Select all

supported=2, detected=2
"supported=2" means system has found dt-blob.bin and understand, that there are two cameras support.
"detected=2" means both cameras are detected and answered to system request.
I can suggest you will see "detected=1", it means one camera is not detected.

2. Now you need to understand, which camera is not working.
For this you should poweroff your StereoPi, disconnect one camera, and either run "vcgencmd get_camera" or use "raspistill -cs ..." test.

3. When you found this camera, try two steps:
a) DIsconnect ribbon from undetected camera, and also from StereoPi. Connect them again, and try to test it.
b) Disconnect ribbon from undetected cam and the StereoPi, and connect it in opposite way. That is insert ribbon tail from the camera to the StereoPi, and the tail from the StereoPi to your camera. Run the tests.

Please share your results here!
Eugene a.k.a. Realizator

WillfordRockwell
Posts: 2
Joined: Sun Apr 28, 2019 1:18 pm

Re: Not working cameras

Post by WillfordRockwell »

Realizator wrote:
Sun Jul 28, 2019 12:16 pm
1. Try to run

Code: Select all

vcgencmd get_camera
If everything is Ok you will see this answer:

Code: Select all

supported=2, detected=2
I see:

Code: Select all

suported=2, detected=2
When I start StereoPi with pluggeg HDMI, I can see start logo vir2real and default StereoPi image:

Image

And no image from cameras after 5 min.

config.conf is:

Code: Select all

photo_resolution=default
video_width=1280
video_mode=3D
video_height=720
video_fps=30
video_bitrate=3000000
video_profile=baseline
rtmp_url=
rtmp_enabled=0
mpegts_clients=192.168.1.10:3001
mpegts_enabled=0
rtsp_enabled=0
usb_enabled=1
audio_enabled=0
video_wb=auto
exposure=auto
contrast=-15
sharpness=0
digitalgain=0.0
wifi_iface=wlan0
wifi_ssid=RT-GPON-2692
wifi_psk=DELETED
record_enabled=1
record_time=300
dec_enabled=0
up_down=0
swapcams=0
udp_clients=192.168.1.10:3000
udp_enabled=0
ws_enabled=1
after boot typing "ps -A":

Code: Select all

  PID TTY          TIME CMD
    1 ?        00:00:02 systemd
    2 ?        00:00:00 kthreadd
    4 ?        00:00:00 kworker/0:0H
    5 ?        00:00:00 kworker/u8:0
    6 ?        00:00:00 mm_percpu_wq
    7 ?        00:00:00 ksoftirqd/0
    8 ?        00:00:00 rcu_sched
    9 ?        00:00:00 rcu_bh
   10 ?        00:00:00 migration/0
   11 ?        00:00:00 cpuhp/0
   12 ?        00:00:00 cpuhp/1
   13 ?        00:00:00 migration/1
   14 ?        00:00:00 ksoftirqd/1
   16 ?        00:00:00 kworker/1:0H
   17 ?        00:00:00 cpuhp/2
   18 ?        00:00:00 migration/2
   19 ?        00:00:00 ksoftirqd/2
   20 ?        00:00:00 kworker/2:0
   21 ?        00:00:00 kworker/2:0H
   22 ?        00:00:00 cpuhp/3
   23 ?        00:00:00 migration/3
   24 ?        00:00:00 ksoftirqd/3
   26 ?        00:00:00 kworker/3:0H
   27 ?        00:00:00 kdevtmpfs
   28 ?        00:00:00 netns
   29 ?        00:00:00 kworker/0:1
   31 ?        00:00:00 kworker/1:1
   32 ?        00:00:00 kworker/3:1
   33 ?        00:00:00 khungtaskd
   34 ?        00:00:00 oom_reaper
   35 ?        00:00:00 writeback
   36 ?        00:00:00 kcompactd0
   37 ?        00:00:00 crypto
   38 ?        00:00:00 kblockd
   39 ?        00:00:00 watchdogd
   40 ?        00:00:00 rpciod
   41 ?        00:00:00 xprtiod
   44 ?        00:00:00 kswapd0
   45 ?        00:00:00 nfsiod
   55 ?        00:00:00 kthrotld
   56 ?        00:00:00 iscsi_eh
   57 ?        00:00:00 dwc_otg
   58 ?        00:00:00 DWC Notificatio
   59 ?        00:00:00 vchiq-slot/0
   60 ?        00:00:00 vchiq-recy/0
   61 ?        00:00:00 vchiq-sync/0
   62 ?        00:00:00 vchiq-keep/0
   63 ?        00:00:00 SMIO
   65 ?        00:00:00 mmcqd/0
   66 ?        00:00:00 jbd2/mmcblk0p2-
   67 ?        00:00:00 ext4-rsv-conver
   69 ?        00:00:00 ipv6_addrconf
   90 ?        00:00:00 systemd-journal
   95 ?        00:00:00 kworker/u8:2
  109 ?        00:00:00 kworker/2:2
  131 ?        00:00:00 systemd-udevd
  187 ?        00:00:00 cfg80211
  259 ?        00:00:00 systemd-timesyn
  305 ?        00:00:00 thd
  307 ?        00:00:00 avahi-daemon
  309 ?        00:00:00 systemd-logind
  314 ?        00:00:00 dbus-daemon
  335 ?        00:00:00 dhcpcd
  337 ?        00:00:00 avahi-daemon
  345 ?        00:00:00 cron
  364 ?        00:00:00 php-fpm7.0
  377 ?        00:00:00 run.sh
  397 ?        00:00:00 RTW_CMD_THREAD
  401 ?        00:00:00 dnsmasq
  423 ?        00:00:00 sshd
  467 ?        00:00:00 php-fpm7.0
  468 ?        00:00:00 nginx
  469 ?        00:00:00 php-fpm7.0
  470 ?        00:00:00 nginx
  471 ?        00:00:00 nginx
  472 ?        00:00:00 nginx
  473 ?        00:00:00 nginx
  506 tty2     00:00:00 fbi
  507 ?        00:00:00 wlan-switch.php
  508 ?        00:00:00 video-source.sh
  509 ?        00:00:00 loop-mpegts.sh
  510 ?        00:00:00 loop-mpegts-sky
  511 ?        00:00:01 loop-rtmp.sh
  512 ?        00:00:01 usb-video.sh
  513 ?        00:00:00 loop-record.sh
  514 ?        00:00:00 record-watcher.
  515 ?        00:00:00 loop-ws.sh
  516 ?        00:00:05 skybox-server.j
  519 ?        00:00:06 index.js
  520 ?        00:00:00 raspivid
  521 ?        00:00:00 splitter
  539 ?        00:00:01 stereopi
  616 ?        00:00:00 wpa_supplicant
  643 ?        00:00:00 dhclient
  952 ?        00:00:00 kworker/0:1H
  953 ?        00:00:00 kworker/1:1H
  954 ?        00:00:00 kworker/2:1H
  955 ?        00:00:00 kworker/3:1H
 2546 ?        00:00:00 kworker/0:0
 2620 ?        00:00:00 kworker/1:0
 4205 ?        00:00:00 kworker/3:0
 4369 ?        00:00:00 kworker/0:2
 4486 ?        00:00:00 kworker/1:2
 4923 ?        00:00:00 kworker/2:1
 4966 ?        00:00:00 sshd
 5010 ?        00:00:00 systemd
 5013 ?        00:00:00 (sd-pam)
 5023 pts/0    00:00:00 bash
 6172 ?        00:00:00 sleep
 6181 ?        00:00:00 recorder
 6217 ?        00:00:00 sleep
 6218 ?        00:00:00 sleep
 6219 ?        00:00:00 sleep
 6222 ?        00:00:00 sleep
 6223 pts/0    00:00:00 ps
May be there are no process to show cameras' work to hdmi? May be it is because file system is mounted read-only?

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

Re: Not working cameras

Post by Realizator »

Your config files are correct.

While first boot S.L.P. image formats all free space on your micro SD to FAT 32. If you are using a very big micro SD card, it might take some time. But, as a rule, it is not a 5 minutes like in your case.

"detected=2" means cameras answers to the system requests by I2C. But actually I2C uses only 2 lines from 15 lines available in the camera ribbon. It means that some data line possibly has bad connection on camera side or StereoPi side. Usually "disconnect-connect" solves this issue.

WillfordRockwell, try to do cameras reconnection, and also plan "b" in my comment (reverse connection).

Before doing this please check, that tiny brown connectors on both camera boards are sitting firmly. I mean connectors at the end of a flexible cable, which is running from black optics boxes to green PCB of your camera (correct for V1 cameras).

If this will not help, it is better to use desktop-edition of Raspbian for future debug. You can use our OpenCV image as is, or any stock-new Raspbian with dt-blob.bin added to /BOOT partition.
After this you can test cameras one-by one, and find one with a bad behavior.
Connect one camera and test it alone. Then disconnect it, connect second camera and test it again.
May be this is a ribbon issue. If you own Starter or Deluxe kit, you have additional short camera ribbons. You can try to replace current ribbon with a new one to localize your issue.
Eugene a.k.a. Realizator

Post Reply