Rpi camera not detected on rpi4

Hello,

I have a application thag needs access camera. But the container does not detect the csi camera.

USB camera works.

Also,

Balena cam works on the setup with csi camera.

My application works on rpios with csi camera

I have the startx and gpu environment variable set in the docker compose but no luck.

Any ideas?

Update:
I am using the browserblock prebuilt image on RPI 4. I am setting the launch URL to https://webcamtests.com/.
It is able to detect the CSI camera.

version: '2'

volumes:
  settings:                          # Only required if using PERSISTENT flag (see below)

services:

  browser:
    image: balenablocks/browser
    privileged: true # required for UDEV to find plugged in peripherals such as a USB mouse
    network_mode: host
    volumes:
      - 'settings:/data' # Only required if using PERSISTENT flag (see below)

But, if I build the image and push it to the RPI 4, using the same launch URL, the camera is not detected.

version: '2'

volumes:
  settings:                          # Only required if using PERSISTENT flag (see below)

services:

  browser:
    build: .
    privileged: true # required for UDEV to find plugged in peripherals such as a USB mouse
    network_mode: host
    volumes:
      - 'settings:/data' # Only required if using PERSISTENT flag (see below)

BTW, everything works on RPI-OS on the same setup. @phil-d-wilson Any ideas ?

Hello @abhatikar good to read you again!

Could you please share more details? Are you on Pi 3 or 4? What OS are you using? Could you please share a screenshot of your environment variables?

Once i have those i will try to reproduce myself!

Let’s stay connected

Hello @mpous
Environment variables:

  •  CONFIG_MODE: 1
    
  •  ENABLE_GPU: 1
    
  •  LAUNCH_URL: 'https://webcamtests.com'
    
  •  SHOW_CURSOR: 1
    
  •  BALENA_HOST_CONFIG_disable_overscan: 1
    
  •  BALENA_HOST_CONFIG_gpu_mem: 192
    
  •  BALENA_HOST_CONFIG_start_x: 1
    
  •  UDEV: 1
    
  •  PERSISTENT: 1

Project: balena browser block, RPI 4, OS version: [balenaOS 2.80.5+rev1]
I have a CSI camera and USB microphone hooked up to the PI. Basically I want the camera and the microphone to be detected by the browser. You could use the following URLs to test the mic and camera, respectively.

https://mictests.com/

https://webcamtests.com/

Crazy thought @abhatikar – what happens if you try balenaOS v2.75?

(I am going to test this tonite as well, but I am going to pull in the Audio block also)

I haven’t tested 2.75, I will wait for your results of your test

I tried on v2.75 with the same result - mic was detected, USB camera detected but CSI camera was not. I did not try the pre-built browser since you already confirmed that does detect a CSI camera. I’ll ask the maintainer of the block if they know of any difference between the pre-built one and the files in the repo. If not, we’ll have to look elsewhere but that will be a tough one!

Thanks, @alanb128.
yeah, I know the USB cam works.I had forgotten to mention in my test logs :slight_smile: Thanks for testing and helping me out. Has anyone tried on RPI 3B+ if there is any different observation ?

I did not have any luck…I was testing with a USB Webcam, and it was detected and functional, but the Microphone would not work. :thinking:

@dtischler Its RPI camera not USB one.

@abhatikar one suggestion from a colleague is to:

  1. rename Dockerfile.template to something else
  2. rename Dockerfile.raspberrypi to Dockerfile.template

Then try building again to rule out the possibility that the wrong template is being used. This is the only difference we can think of between building and using the hosted image…