balena-cam: Video device is not ready

Hi!

I have problems getting the camera ( Jun-Saxifragelec 5MP 1080P) to work with the balena-cam module:

05.10.20 19:54:40 (+0200) balena-cam Video device is not ready
05.10.20 19:54:40 (+0200) balena-cam Trying to load bcm2835-v4l2 driver…

05.10.20 20:45:30 (+0200) Service exited ‘balena-cam sha256:df8c2341a05a6d7027b410543cb546d5a52224bd6201df89652cbbea038953aa’
05.10.20 20:45:37 (+0200) Restarting service ‘balena-cam sha256:df8c2341a05a6d7027b410543cb546d5a52224bd6201df89652cbbea038953aa’

-> in a loop

dmesg | grep bcm2835
[ 0.000221] bcm2835: system timer (irq = 27)
[ 0.095166] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[ 0.173984] bcm2835-dma 20007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1
[ 0.549081] bcm2835-rng 20104000.rng: hwrng registered
[ 0.565271] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
[ 1.158149] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 1.161929] bcm2835-cpufreq: min=700000 max=1000000
[ 1.173290] mmc-bcm2835 20300000.mmcnr: could not get clk, deferring probe
[ 1.177432] sdhost-bcm2835 20202000.mmc: could not get clk, deferring probe
[ 2.277179] mmc-bcm2835 20300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 2.285915] mmc-bcm2835 20300000.mmcnr: DMA channel allocated
[ 2.397285] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 20.140625] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 20.440380] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 20.481175] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 20.694919] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 20.761428] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 20.810395] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 21.051284] bcm2835_audio soc:audio: card created with 8 channels
[ 21.820177] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 21.930132] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 22.120875] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 22.338931] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 22.523402] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 22.694482] bcm2835-codec bcm2835-codec: Loaded V4L2 isp

It’s confirmed and tested that the camera itself works with the Raspberry Pi Zero W on Raspbian.

My CUSTOM CONFIGURATION VARIABLES

BALENA_HOST_CONFIG_gpu_mem_1024 448
BALENA_HOST_CONFIG_gpu_mem_256 192
BALENA_HOST_CONFIG_gpu_mem_512 256
BALENA_HOST_CONFIG_start_x 1

lsmod

Module Size Used by
ip6t_REJECT 16384 2
nf_reject_ipv6 16384 1 ip6t_REJECT
ip6table_filter 16384 1
xt_state 16384 0
ipt_REJECT 16384 2
nf_reject_ipv4 16384 1 ipt_REJECT
ip6_tables 24576 1 ip6table_filter
ipt_MASQUERADE 16384 3
nf_conntrack_netlink 40960 0
nfnetlink 16384 2 nf_conntrack_netlink
br_netfilter 24576 0
xt_owner 16384 0
i2c_dev 20480 0
bnep 20480 2
hci_uart 40960 1
btbcm 16384 1 hci_uart
serdev 20480 1 hci_uart
bluetooth 405504 24 hci_uart,bnep,btbcm
ecdh_generic 28672 1 bluetooth
spidev 16384 0
brcmfmac 290816 0
brcmutil 20480 1 brcmfmac
sha256_generic 20480 0
bcm2835_codec 36864 0
bcm2835_v4l2 45056 0
cfg80211 638976 1 brcmfmac
raspberrypi_hwmon 16384 0
hwmon 16384 1 raspberrypi_hwmon
v4l2_mem2mem 24576 1 bcm2835_codec
bcm2835_mmal_vchiq 32768 2 bcm2835_codec,bcm2835_v4l2
snd_bcm2835 28672 0
rfkill 28672 5 bluetooth,cfg80211
v4l2_common 16384 1 bcm2835_v4l2
videobuf2_dma_contig 20480 1 bcm2835_codec
videobuf2_vmalloc 16384 1 bcm2835_v4l2
videobuf2_memops 16384 2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2 24576 3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
snd_pcm 98304 1 snd_bcm2835
videobuf2_common 45056 4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
snd_timer 32768 1 snd_pcm
snd 73728 3 snd_timer,snd_bcm2835,snd_pcm
i2c_bcm2835 16384 0
videodev 192512 6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
spi_bcm2835 20480 0
vc_sm_cma 36864 1 bcm2835_mmal_vchiq
media 36864 3 bcm2835_codec,videodev,v4l2_mem2mem
fixed 16384 0
uio_pdrv_genirq 16384 0
uio 20480 1 uio_pdrv_genirq
sch_fq_codel 20480 3

Any ideas what could be wrong?

Thank you!

Hi. How did you test the camera on Raspbian?

with motion (http://lavrsen.dk/foswiki/bin/view/Motion/WebHome)

I think the problem is that I have no /dev/video0 device!

ls /dev/video*
/dev/video10 /dev/video11 /dev/video12

Can you boot Raspbian again and save dmesg and lsmod and share them please?

Thank you for the help. I can confirm now that in the meanwhile the camera is dead :frowning:

Have to replace it. (first I thought the cable is broken)