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.

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.

Hey @Jessseee glad to hear you are on it. Very much looking forward to it.
Thanks :heart:

@Jessseee was there any further movement anywhere? I saw a few back and forth on the PR, but that was it.

@mpous is there a scheduled upgrade from kirkstone anytime soon? @Jessseee Which meta-raspberrypi branch is your change in?

The original option to enable the device-tree overlay was in this pull-request and was merged into master. However, because of the older 5.10 kernel in Kirkstone the dt-overlay files are completely missing and need to be added for which I wrote a backport that you can find in the still open pull-request. So for this to be included in balena-raspberrypi it either needs to update to a meta-raspberrypi version that no longer requires support for kernel 5.10 or the backport has to be merged into the Kirkstone branch. @mpous did you colleague end up having time to test the Raspberry Pi camera V3?

1 Like

hi @Jessseee on the pr-1197 there is an unresolved conversation and a failed check. I hope that changes will be merged once you resolved these. Can you please look in to it.

@PaintedSnipe the unresolved conversation is not directed at me and the failed check is not related to my code changes. There is not much I can do at this moment to get this to be merged. We will simply have to wait on @agherzan.

1 Like