Can't get libcamera to work with new 'Camera Module v3'

I am currently trying to get a project started using the Raspberry Pi 4B and the camera module v3. However, I cannot get it to detect the camera. I am on balenaOS 2.108.27 and using the balena-io-experimental/libcamera-apps repo. I set all the configuration variables in the dashboard and I tried running with local mode on/off. I also tried to set RESIN_HOST_CONFIG_dtoverlay: "vc4-kms-v3d", "imx708" for the new sensor type. The setup worked fine without Balena on RaspbianOS Bullseye 64bit. Any help is very much appreciated!

1 Like

Well, I think I found the problem… The imx708 overlay is not yet included in the kernel used by BalenaOS 2.108.27. I could have guessed as much. The current kernel version is 5.15.34-v8 and if I am right the imx708 overlay should be included in kernel version 5.15.84.
image

1 Like

I created a pull-request on meta-raspberrypi. Hopefully this speeds things up.

1 Like

Hello @Jessseee thank you for adding the support of the Camera Module v3 for Raspberry Pi and prepare the PR!

I pinged internally the balenaOS team to see if we can accept the PR. We will keep you updated :slight_smile:

Let us know if we can help you more!

1 Like

Awesome, thank you! :+1: Once the PR is merged I’ll test it as soon as possible and I’ll let you know if everything works as expected.

1 Like

Thank you for your investigating this.

Do you know the workaround to use camera module v3 with the current version BalenaOS?

I put imx708.dtbo on /mnt/boot/overlays and set dtoverlay config, but it does not detect the camera module.

@mpous any updates on the Raspberry Pi Camera Module v3 support?

@imashin I think the dts files have to be there at build time to be added as proper dtoverlays. Based on PR #798 on balena-os/balena-raspberrypi.

1 Like

Hello @Jessseee a colleague just received this camera and he will be testing how to run the Camera Module v3 with balena.

Stay tunned and let us know if you had any successful experience.

1 Like

My pull-request on meta-raspberrypi got merged. Hopefully that will help getting the Camera Module v3 to work on BalenaOS.

1 Like

Unfortunately I did not notice meta-balena uses the Kirkstone branch of meta-raspberrypi. I created a new pull-request for the same changes to be applied to kirkstone.

Due to the device tree overlay missing from kernel 5.10, I had to create a compatibility layer in the Kirkstone branch of meta-raspberrypi. Here is the latest pull-request.