All white images on B0272 IMX477 autofocus on Bookworm

I’m using an Arducam 12MP 477P Autofocus High Quality Camera for Raspberry Pi (SKU: B0272) purchased from UCTRONICS in the past month. It is installed on a Raspberry Pi 3B+ running Bookworm.

The problem: saved images are all white.

Any suggestions?

What works

  • Other CSI-2 cameras, including a native HQ camera, a v2 camera, and a v3 camera.
  • I can see previews from this module using rpicam-vid and rpicam-still using the --qt-preview option
  • I can set the lens position using i2cset -y 10 ## ## where ## are 8-bit integers
  • I can see the camera using rpicam-hello —list-cameras and I get this output
Available cameras
-----------------
0 : imx477 [4056x3040 12-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx477@1a)
    Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop]
           'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop]
                             2028x1520 [40.01 fps - (0, 0)/4056x3040 crop]
                             4056x3040 [10.00 fps - (0, 0)/4056x3040 crop]

What does not work

  • Saved images are all white when saved as either BMP or PNG
  • Custom dtoverlay from the quick start guide compiles with warning, system hangs while booting when trying to load it
  • Arducam’s libcamera does not find the correct driver (GitHub says it’s not needed anymore)
  • No custom tuning file exists (imx477_af.json)

System configuration

  • Hardware: Raspberry Pi 3B+
  • Hardware revision: a020d3
  • OS version codename: bookworm
  • Kernel version: Linux ledpi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux
  • Running headless, connected by VNC through wireless or ethernet connection
  • Firmware configuration (in /boot/firmware/config.txt)
    • dtparam=i2c_arm=on
    • dtparam=i2c_vc=on (no difference without this line)
    • camera_auto_detect=0 (required to detect camera with manual dtoverlay)
    • dtoverlay=imx477,vcm (required to detect camera)

Here’s an illustration of the issue.

This is how the preview looks, along with info text showing the gains and exposure values (rpicam-hello -t 0 --qt-preview --info-text 'AG %ag DG %dg RG %rg BG %bg exp %exp'):

This is an image capture using these gain values (rpicam-still -n -o test.jpg --gain 8.0 --awbgains 2.64,1.61 --shutter 33000) (it’s all white):

Here’s what I get setting the gain to 1.0 (rpicam-still -n -o test.jpg --gain 1.0 --awbgains 2.64,1.61 --shutter 33000) (it’s noisy, but at least there’s an image!):

Higher gain values first produce some magenta hues in the overexposed areas, then it goes all white again.

@Edward is there updated firmware for this camera/sensor? Or could you post the imx477_af.json file here, if that would fix the issue? 谢谢!

Hi,
It seems that you have not followed the link below:
https://docs.arducam.com/Raspberry-Pi-Camera/Motorized-Focus-Camera/Quick-Start-Guide/IMX477-Motorized-Focus-Camera/#software
If you have installed the libcamera from the Arducam branch, you will find the imx477_af.json is placed under the path /usr/share/libcamera/ipa/rpi/vc4

Hi @Dion,

Thanks for the reply. I did follow those steps.

The first steps on that page creates a dtoverlay file that either doesn’t load or stops the boot cycle.

Here’s the contents of /usr/share/libcamera/ipa/rpi/vc4 after following the second set of instrucitons:

pi@ledpi:/usr/share/libcamera/ipa/rpi/vc4$ ls -la
total 500
drwxr-xr-x 2 root root  4096 Apr  5 11:27 .
drwxr-xr-x 4 root root  4096 Mar 15 15:01 ..
-rw-r--r-- 1 root root 33093 Feb 15 12:39 imx219.json
-rw-r--r-- 1 root root 31118 Feb 15 12:39 imx219_noir.json
-rw-r--r-- 1 root root  7223 Feb 15 12:39 imx290.json
-rw-r--r-- 1 root root 19866 Feb 15 12:39 imx296.json
-rw-r--r-- 1 root root  9304 Feb 15 12:39 imx296_mono.json
-rw-r--r-- 1 root root 19322 Feb 15 12:39 imx378.json
-rw-r--r-- 1 root root 33294 Feb 15 12:39 imx477.json
-rw-r--r-- 1 root root 32120 Feb 15 12:39 imx477_noir.json
-rw-r--r-- 1 root root 18317 Feb 15 12:39 imx477_scientific.json
-rw-r--r-- 1 root root 19322 Feb 15 12:39 imx519.json
-rw-r--r-- 1 root root 29503 Feb 15 12:39 imx708.json
-rw-r--r-- 1 root root 33172 Feb 15 12:39 imx708_noir.json
-rw-r--r-- 1 root root 29859 Feb 15 12:39 imx708_wide.json
-rw-r--r-- 1 root root 29526 Feb 15 12:39 imx708_wide_noir.json
-rw-r--r-- 1 root root 33129 Feb 15 12:39 ov5647.json
-rw-r--r-- 1 root root 21569 Feb 15 12:39 ov5647_noir.json
-rw-r--r-- 1 root root 16540 Feb 15 12:39 ov64a40.json
-rw-r--r-- 1 root root  3855 Feb 15 12:39 ov9281_mono.json
-rw-r--r-- 1 root root 19434 Feb 15 12:39 se327m12.json
-rw-r--r-- 1 root root 15198 Apr  5 11:27 test.json
-rw-r--r-- 1 root root  3737 Feb 15 12:39 uncalibrated.json
Output from the installation
pi@ledpi:~$ wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
--2024-04-08 09:55:39--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/a7c62d6a-e560-441f-a104-4298d6e03b73?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085539Z&X-Amz-Expires=300&X-Amz-Signature=5ec659a6cb817aa2fa6887389cc3f220d5a32b7beb3e27d0ea4d7d9ceb01ed0d&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dinstall_pivariety_pkgs.sh&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:55:39--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/a7c62d6a-e560-441f-a104-4298d6e03b73?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085539Z&X-Amz-Expires=300&X-Amz-Signature=5ec659a6cb817aa2fa6887389cc3f220d5a32b7beb3e27d0ea4d7d9ceb01ed0d&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dinstall_pivariety_pkgs.sh&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18902 (18K) [application/octet-stream]
Saving to: ‘install_pivariety_pkgs.sh’

install_pivariety_pkgs.sh                                  100%[=======================================================================================================================================>]  18.46K  --.-KB/s    in 0.003s  

2024-04-08 09:55:40 (5.75 MB/s) - ‘install_pivariety_pkgs.sh’ saved [18902/18902]

pi@ledpi:~$ chmod +x install_pivariety_pkgs.sh
pi@ledpi:~$ ./install_pivariety_pkgs.sh -p libcamera
dpkg-query: no packages found matching raspberrypi-kernel
dpkg: error: --compare-versions takes three arguments: <version> <relation> <version>

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
=================================================
Hardware Revision: a020d3
Kernel Version: 6.6.20+rpt-rpi-v8
OS Codename: bookworm
ARCH: aarch64
=================================================

--2024-04-08 09:55:54--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/packages.txt
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/df453528-69cd-46a8-bba8-534745547efc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085555Z&X-Amz-Expires=300&X-Amz-Signature=2936d66c05adfd6ce57c4bd85f3fe7b213c61d94c9b9e2d3fa6669b2064d3db1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dpackages.txt&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:55:55--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/df453528-69cd-46a8-bba8-534745547efc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085555Z&X-Amz-Expires=300&X-Amz-Signature=2936d66c05adfd6ce57c4bd85f3fe7b213c61d94c9b9e2d3fa6669b2064d3db1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dpackages.txt&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2780 (2.7K) [application/octet-stream]
Saving to: ‘packages.txt’

packages.txt                                               100%[=======================================================================================================================================>]   2.71K  --.-KB/s    in 0s      

2024-04-08 09:55:55 (9.31 MB/s) - ‘packages.txt’ saved [2780/2780]

kernel:6.6.20+rpt-rpi-v8
kernel version is: 6.6.20
--2024-04-08 09:55:55--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/libcamera_bookworm_links.txt
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/ddac8037-4419-4f23-bfa7-34322b918084?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085555Z&X-Amz-Expires=300&X-Amz-Signature=d81843cfe910c09677707f467003fddd6ff0f430ab04519ff8020326f9aa6cc2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera_bookworm_links.txt&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:55:56--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/ddac8037-4419-4f23-bfa7-34322b918084?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085555Z&X-Amz-Expires=300&X-Amz-Signature=d81843cfe910c09677707f467003fddd6ff0f430ab04519ff8020326f9aa6cc2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera_bookworm_links.txt&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3061 (3.0K) [application/octet-stream]
Saving to: ‘libcamera_bookworm_links.txt’

libcamera_bookworm_links.txt                               100%[=======================================================================================================================================>]   2.99K  --.-KB/s    in 0s      

2024-04-08 09:55:56 (8.24 MB/s) - ‘libcamera_bookworm_links.txt’ saved [3061/3061]

--2024-04-08 09:55:56--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/libcamera-v0.0.5/libcamera0.2_0.2.0+rpt20240227-1_arm64.deb
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/53934834-1ed7-41ae-a120-e9f66a88e11f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085556Z&X-Amz-Expires=300&X-Amz-Signature=102c462eb845a38c4f7c5420e400c3683442149882572c8897bfb61bf93f16fa&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera0.2_0.2.0%2Brpt20240227-1_arm64.deb&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:55:56--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/53934834-1ed7-41ae-a120-e9f66a88e11f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085556Z&X-Amz-Expires=300&X-Amz-Signature=102c462eb845a38c4f7c5420e400c3683442149882572c8897bfb61bf93f16fa&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera0.2_0.2.0%2Brpt20240227-1_arm64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 510536 (499K) [application/octet-stream]
Saving to: ‘libcamera0.2_0.2.0+rpt20240227-1_arm64.deb’

libcamera0.2_0.2.0+rpt20240227-1_arm64.deb                 100%[=======================================================================================================================================>] 498.57K  --.-KB/s    in 0.1s    

2024-04-08 09:55:57 (3.98 MB/s) - ‘libcamera0.2_0.2.0+rpt20240227-1_arm64.deb’ saved [510536/510536]

Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 http://archive.raspberrypi.com/debian bookworm InRelease [23.6 kB]
Get:5 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages [374 kB]
Get:6 http://archive.raspberrypi.com/debian bookworm/main armhf Packages [383 kB]
Fetched 836 kB in 2s (385 kB/s)                          
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'libpisp0.0.1' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  nlohmann-json3-dev
The following NEW packages will be installed:
  libpisp-dev nlohmann-json3-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 273 kB of archives.
After this operation, 1,634 kB of additional disk space will be used.
Get:1 http://archive.raspberrypi.com/debian bookworm/main arm64 libpisp-dev arm64 1.0.4-1 [14.4 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 nlohmann-json3-dev all 3.11.2-2 [259 kB]
Fetched 273 kB in 0s (1,569 kB/s)       
Selecting previously unselected package nlohmann-json3-dev.
(Reading database ... 223353 files and directories currently installed.)
Preparing to unpack .../nlohmann-json3-dev_3.11.2-2_all.deb ...
Unpacking nlohmann-json3-dev (3.11.2-2) ...
Selecting previously unselected package libpisp-dev:arm64.
Preparing to unpack .../libpisp-dev_1.0.4-1_arm64.deb ...
Unpacking libpisp-dev:arm64 (1.0.4-1) ...
Setting up nlohmann-json3-dev (3.11.2-2) ...
Setting up libpisp-dev:arm64 (1.0.4-1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libcamera0.2' instead of './libcamera0.2_0.2.0+rpt20240227-1_arm64.deb'
The following packages will be upgraded:
  libcamera0.2
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/511 kB of archives.
After this operation, 65.5 kB of additional disk space will be used.
Get:1 /home/pi/libcamera0.2_0.2.0+rpt20240227-1_arm64.deb libcamera0.2 arm64 0.2.0+rpt20240227-1 [511 kB]
apt-listchanges: Reading changelogs...
(Reading database ... 223859 files and directories currently installed.)
Preparing to unpack .../libcamera0.2_0.2.0+rpt20240227-1_arm64.deb ...
Unpacking libcamera0.2:arm64 (0.2.0+rpt20240227-1) over (0.2.0+rpt20240215-1) ...
Setting up libcamera0.2:arm64 (0.2.0+rpt20240227-1) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u4) ...
N: Download is performed unsandboxed as root as file '/home/pi/libcamera0.2_0.2.0+rpt20240227-1_arm64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
--2024-04-08 09:56:41--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/libcamera-v0.0.5/libcamera-dev_0.2.0+rpt20240227-1_arm64.deb
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/469a37a4-208c-405d-a209-23c95e81ebe8?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085642Z&X-Amz-Expires=300&X-Amz-Signature=5521e1a881ea95f3ecaa553feaeab9837a940a66bb82df0a6fbf31d1773da919&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera-dev_0.2.0%2Brpt20240227-1_arm64.deb&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:56:42--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/469a37a4-208c-405d-a209-23c95e81ebe8?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085642Z&X-Amz-Expires=300&X-Amz-Signature=5521e1a881ea95f3ecaa553feaeab9837a940a66bb82df0a6fbf31d1773da919&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera-dev_0.2.0%2Brpt20240227-1_arm64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32404 (32K) [application/octet-stream]
Saving to: ‘libcamera-dev_0.2.0+rpt20240227-1_arm64.deb’

libcamera-dev_0.2.0+rpt20240227-1_arm64.deb                100%[=======================================================================================================================================>]  31.64K  --.-KB/s    in 0.008s  

2024-04-08 09:56:42 (3.69 MB/s) - ‘libcamera-dev_0.2.0+rpt20240227-1_arm64.deb’ saved [32404/32404]

--2024-04-08 09:56:42--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/libcamera-v0.0.5/libcamera-ipa_0.2.0+rpt20240227-1_arm64.deb
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/23564faa-8e91-4e80-bc42-fe869b7f499a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085642Z&X-Amz-Expires=300&X-Amz-Signature=73cbfc24676693fc056c71b50405cb61111c28d249601960db22aa2529de35d3&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera-ipa_0.2.0%2Brpt20240227-1_arm64.deb&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:56:42--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/23564faa-8e91-4e80-bc42-fe869b7f499a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085642Z&X-Amz-Expires=300&X-Amz-Signature=73cbfc24676693fc056c71b50405cb61111c28d249601960db22aa2529de35d3&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera-ipa_0.2.0%2Brpt20240227-1_arm64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 536188 (524K) [application/octet-stream]
Saving to: ‘libcamera-ipa_0.2.0+rpt20240227-1_arm64.deb’

libcamera-ipa_0.2.0+rpt20240227-1_arm64.deb                100%[=======================================================================================================================================>] 523.62K  --.-KB/s    in 0.1s    

2024-04-08 09:56:43 (4.21 MB/s) - ‘libcamera-ipa_0.2.0+rpt20240227-1_arm64.deb’ saved [536188/536188]

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libcamera-dev' instead of './libcamera-dev_0.2.0+rpt20240227-1_arm64.deb'
The following NEW packages will be installed:
  libcamera-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/32.4 kB of archives.
After this operation, 189 kB of additional disk space will be used.
Get:1 /home/pi/libcamera-dev_0.2.0+rpt20240227-1_arm64.deb libcamera-dev arm64 0.2.0+rpt20240227-1 [32.4 kB]
Selecting previously unselected package libcamera-dev:arm64.
(Reading database ... 223859 files and directories currently installed.)
Preparing to unpack .../libcamera-dev_0.2.0+rpt20240227-1_arm64.deb ...
Unpacking libcamera-dev:arm64 (0.2.0+rpt20240227-1) ...
Setting up libcamera-dev:arm64 (0.2.0+rpt20240227-1) ...
N: Download is performed unsandboxed as root as file '/home/pi/libcamera-dev_0.2.0+rpt20240227-1_arm64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-libcamera is already the newest version (0.2.0+rpt20240215-1).
python3-libcamera set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-picamera2 is already the newest version (0.3.17-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@ledpi:~$ ./install_pivariety_pkgs.sh -p libcamera_apps
dpkg-query: no packages found matching raspberrypi-kernel
dpkg: error: --compare-versions takes three arguments: <version> <relation> <version>

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
=================================================
Hardware Revision: a020d3
Kernel Version: 6.6.20+rpt-rpi-v8
OS Codename: bookworm
ARCH: aarch64
=================================================

kernel:6.6.20+rpt-rpi-v8
kernel version is: 6.6.20
--2024-04-08 09:59:17--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/libcamera_apps_bookworm_links.txt
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/2da703d9-f8d9-4c7b-8909-eb9b1142f62c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085917Z&X-Amz-Expires=300&X-Amz-Signature=ae1430e322bd399bfce44da8ae4898296461b0db3f013e4536a29c6af2bd7506&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera_apps_bookworm_links.txt&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:59:17--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/2da703d9-f8d9-4c7b-8909-eb9b1142f62c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085917Z&X-Amz-Expires=300&X-Amz-Signature=ae1430e322bd399bfce44da8ae4898296461b0db3f013e4536a29c6af2bd7506&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dlibcamera_apps_bookworm_links.txt&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1448 (1.4K) [application/octet-stream]
Saving to: ‘libcamera_apps_bookworm_links.txt’

libcamera_apps_bookworm_links.txt                          100%[=======================================================================================================================================>]   1.41K  --.-KB/s    in 0s      

2024-04-08 09:59:18 (4.82 MB/s) - ‘libcamera_apps_bookworm_links.txt’ saved [1448/1448]

--2024-04-08 09:59:18--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/libcamera-apps-v0.0.5/rpicam-apps_1.4.3-2_arm64.deb
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/ab5b5d45-105a-4933-b10d-d574fe6726c1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085918Z&X-Amz-Expires=300&X-Amz-Signature=ca828722afcbfb7f986a4b6eeb224b6f64af37c431c85473714f69d1c57db1fb&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Drpicam-apps_1.4.3-2_arm64.deb&response-content-type=application%2Foctet-stream [following]
--2024-04-08 09:59:18--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/ab5b5d45-105a-4933-b10d-d574fe6726c1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240408T085918Z&X-Amz-Expires=300&X-Amz-Signature=ca828722afcbfb7f986a4b6eeb224b6f64af37c431c85473714f69d1c57db1fb&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Drpicam-apps_1.4.3-2_arm64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 341248 (333K) [application/octet-stream]
Saving to: ‘rpicam-apps_1.4.3-2_arm64.deb’

rpicam-apps_1.4.3-2_arm64.deb                              100%[=======================================================================================================================================>] 333.25K  --.-KB/s    in 0.08s   

2024-04-08 09:59:19 (3.84 MB/s) - ‘rpicam-apps_1.4.3-2_arm64.deb’ saved [341248/341248]

Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'rpicam-apps' instead of './rpicam-apps_1.4.3-2_arm64.deb'
The following packages will be upgraded:
  rpicam-apps
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/341 kB of archives.
After this operation, 132 kB of additional disk space will be used.
Get:1 /home/pi/rpicam-apps_1.4.3-2_arm64.deb rpicam-apps arm64 1.4.3-2 [341 kB]
apt-listchanges: Reading changelogs...
(Reading database ... 223906 files and directories currently installed.)
Preparing to unpack .../rpicam-apps_1.4.3-2_arm64.deb ...
Unpacking rpicam-apps (1.4.3-2) over (1.4.3-1) ...
Setting up rpicam-apps (1.4.3-2) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u4) ...
N: Download is performed unsandboxed as root as file '/home/pi/rpicam-apps_1.4.3-2_arm64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

If I use sudo dpkg -i ./libcamera-ipa_0.2.0+rpt20240227-1_arm64.deb (the file downloaded by the script), then I get the correct json files installed:

pi@ledpi:/usr/share/libcamera/ipa/rpi/vc4$ ls -la
total 604
drwxr-xr-x 2 root root  4096 Apr  8 10:10 .
drwxr-xr-x 4 root root  4096 Mar 15 15:01 ..
-rw-r--r-- 1 root root 15165 Feb 27 05:33 arducam_64mp.json
-rw-r--r-- 1 root root 25182 Feb 27 05:33 imx219_af.json
-rw-r--r-- 1 root root 33093 Feb 27 05:33 imx219.json
-rw-r--r-- 1 root root 31118 Feb 27 05:33 imx219_noir.json
-rw-r--r-- 1 root root  7223 Feb 27 05:33 imx290.json
-rw-r--r-- 1 root root 19866 Feb 27 05:33 imx296.json
-rw-r--r-- 1 root root  9304 Feb 27 05:33 imx296_mono.json
-rw-r--r-- 1 root root 19322 Feb 27 05:33 imx378.json
-rw-r--r-- 1 root root 26402 Feb 27 05:33 imx477_af.json
-rw-r--r-- 1 root root 33294 Feb 27 05:33 imx477.json
-rw-r--r-- 1 root root 32120 Feb 27 05:33 imx477_noir.json
-rw-r--r-- 1 root root 18317 Feb 27 05:33 imx477_scientific.json
-rw-r--r-- 1 root root 20549 Feb 27 05:33 imx519.json
-rw-r--r-- 1 root root 29503 Feb 27 05:33 imx708.json
-rw-r--r-- 1 root root 33172 Feb 27 05:33 imx708_noir.json
-rw-r--r-- 1 root root 29859 Feb 27 05:33 imx708_wide.json
-rw-r--r-- 1 root root 29526 Feb 27 05:33 imx708_wide_noir.json
-rw-r--r-- 1 root root 25205 Feb 27 05:33 ov5647_af.json
-rw-r--r-- 1 root root 33129 Feb 27 05:33 ov5647.json
-rw-r--r-- 1 root root 21569 Feb 27 05:33 ov5647_noir.json
-rw-r--r-- 1 root root 16540 Feb 27 05:33 ov64a40.json
-rw-r--r-- 1 root root  3855 Feb 27 05:33 ov9281_mono.json
-rw-r--r-- 1 root root 19434 Feb 27 05:33 se327m12.json
-rw-r--r-- 1 root root 15198 Apr  5 11:27 test.json
-rw-r--r-- 1 root root  3737 Feb 27 05:33 uncalibrated.json

So, the solution is to download your debian package that contains the correct tuning files, as describe in my previous post.

@Dion please could you update the instructions on that page?

Hi @grunkyb
If we review the file install_pivariety_pkgs.sh, we will find that the package libcamera-ipa_0.2.0+rpt20240227-1_arm64.deb is installed when we run the command ./install_pivariety_pkgs.sh -p libcamera_dev. I suspect that you have not managed to install the libcamera_dev before so the imx477_af.json is not added under the path /usr/share/libcamera/ipa/rpi/vc4.