Autofocus not working with libcamera-still

  1. Where did you get the camera module(s)?

Arducam & Uctronics

  1. Model number of the product(s)?

Several autofocus camera models, i.e.,
IMX519 (B0386), IMX219 (B0393), OV5647 (B0176), IMX477 (B0272), IMX519 (B0371), 64MP (B0399)

  1. What hardware/platform were you working on?

raspberry pi4B
5.15.40-v7l+
May 16 2022 15:40:46
Copyright (c) 2012 Broadcom
version ae6542a8a3aef192cb3536c39106d19f342fab29 (clean) (release) (start)

PRETTY_NAME=“Raspbian GNU/Linux 11 (bullseye)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“11”
VERSION=“11 (bullseye)”
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="_http://www.raspbian.org/"
SUPPORT_URL="_http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="_http://www.raspbian.org/RaspbianBugs"

  1. Instructions you have followed. (link/manual/etc.)

_https://www.arducam.com/docs/cameras-for-raspberry-pi/raspberry-pi-libcamera-guide/
_https://www.arducam.com/downloads/arducam_64mp_pi_camera_manual.pdf
_https://www.arducam.com/docs/cameras-for-raspberry-pi/64mp-camera-for-raspberry-pi/how-to-use-arducam-64mp-camera-on-rapberry-pi/

  1. Problems you were having?

When testing with libcamera-still, the options --autofocus and --continue-autofocus not working, i.e.,
libcamera-still -t 5000 --viewfinder-width 2312 --viewfinder-height 1736 --width 4624
–height 3472 -o 64mp.jpg --autofocus

and

libcamera-still -t 5000 --viewfinder-width 2312 --viewfinder-height 1736 --width 4624
–height 3472 -o 64mp.jpg --continue-autofocus

The focus function works under manual focus using

python FocuserExample.py -d /dev/v4l-subdev1

however, digital zoom doesn’t work.

  1. The dmesg log from your hardware?

  2. Troubleshooting attempts you’ve made?

Testing with different camera models as shown in 2, the results were the same.

  1. What help do you need?

How to set up cameras to implement --autofocus and --continue-autofocus.

Hi, @babybabe

Did you upgrade the kernel first and install the driver first?

Yes … I do upgrade using

sudo apt-get update
sudo apt-get upgrade

the kernel version is 5.15.40-v7l+.

We do not currently support this kernel version. We generally compile the driver based on the image kernel version released by the Raspberry Pi.

OK … what kernel version does the camera support? The Raspberry PI Imager currently provides kernel version 5.15.

Hi, @babybabe

We support all bullseye system image kernels released by Raspberry Pi.

You just need to reinstall the Raspberry Pi system, no kernel upgrade required.