Install_pivariety_pkgs.sh update and FAQ

Well,

It is very unclear for me.
I Install the latest 5.15 release:

Linux raspberrypi 5.15.92-v8+ #1627 SMP PREEMPT Mon Feb 6 12:35:20 GMT 2023 aarch64 GNU/Linux

And get the following message:

Cannot find the corresponding package, please send the following information to [email protected]
Hardware Revision: c03111
Kernel Version: 5.15.92-v8+
Package: 64mp_pi_hawk_eye_kernel_driver -- bullseye-arm64-v5
You are using an unsupported kernel version, please install the official SD Card image(do not execute rpi-update):
https://www.raspberrypi.com/software/operating-systems/

Which kernel version should we use. It could be interesting to add this in the script to install the proper validated kernel:

sudo rpi-update f5c4fc199c8d8423cb427e509563737d1ac21f3c

Can you let me know what is the latest valid kernel version for this driver?

Ok I managed to find a kerne suitable for the installation. But unfortunatly still the same.

https://drive.google.com/file/d/1MmK_h7gcCAjMD04uu9k5IROKru9QJY0J/view?usp=sharing

@yaazzz

My fault, I didn’t tell you the corresponding upgrade command.
I guess you started with

sudo rpi-update

In fact, you can directly use the following command to update

sudo apt-get update
sudo apt-get upgrade

Glad you solved the kernel version issue yourself, your status is a bit weird, kinda like something wrong with the device tree, I’ll test it now.

@yaazzz

I went through the process with a new 64bit system and everything is fine.

Can you give me the output of the command below?

cat /usr/share/libcamera/ipa/raspberrypi/

@yaazzz

If you are willing, we can also look at this problem remote support.

Hi,

As this is a folder cat command send an error.
here is the content of the folder:

/usr/share/libcamera/ipa/raspberrypi $ ls

arducam_64mp.json  imx477_af.json          imx708_wide_noir.json
imx219_af.json     imx477.json             ov5647_af.json
imx219.json        imx477_noir.json        ov5647.json
imx219_noir.json   imx477_scientific.json  ov5647_noir.json
imx290.json        imx519.json             ov9281_mono.json
imx296.json        imx708.json             se327m12.json
imx296_mono.json   imx708_noir.json        uncalibrated.json
imx378.json        imx708_wide.json
and here is the the contend of cat /usr/share/libcamera/ipa/raspberrypi/arducam_64mp.json
{
    "version": 2.0,
    "target": "bcm2835",
    "algorithms": [
        {
            "rpi.black_level":
            {
                "black_level": 4096
            }
        },
        {
            "rpi.dpc":
            {
            }
        },
        {
            "rpi.lux":
            {
                "reference_shutter_speed": 29966,
                "reference_gain": 2.03,
                "reference_aperture": 1.0,
                "reference_lux": 910,
                "reference_Y": 13551
            }
        },
        {
            "rpi.noise":
            {
                "reference_constant": 0,
                "reference_slope": 2.271
            }
        },
        {
            "rpi.geq":
            {
                "offset": 151,
                "slope": 0.00766
            }
        },
        {
            "rpi.sdn":
            {
                "deviation":3.7,
                "strength":0.75
            }
        },
        {
            "rpi.awb":
            {
                "priors":
                [
                    {
                        "lux": 0, "prior":
                        [
                            2000, 1.0, 3000, 0.0, 13000, 0.0
                        ]
                    },
                    {
                        "lux": 800, "prior":
                        [
                            2000, 0.0, 6000, 2.0, 13000, 2.0
                        ]
                    },
                    {
                        "lux": 1500, "prior":
                        [
                            2000, 0.0, 4000, 1.0, 6000, 6.0, 6500, 7.0, 7000, 1.0, 13000, 1.0
                        ]
                    }
                ],
                "modes":
                {
                    "auto":
                    {
                        "lo": 2500,
                        "hi": 8000
                    },
                    "incandescent":
                    {
                        "lo": 2500,
                        "hi": 3000
                    },
                    "tungsten":
                    {
                        "lo": 3000,
                        "hi": 3500
                    },
                    "fluorescent":
                    {
                        "lo": 4000,
                        "hi": 4700
                    },
                    "indoor":
                    {
                        "lo": 3000,
                        "hi": 5000
                    },
                    "daylight":
                    {
                        "lo": 5500,
                        "hi": 6500
                    },
                    "cloudy":
                    {
                        "lo": 7000,
                        "hi": 8600
                    }
                },
                "bayes": 1,
                "ct_curve":
                [
                    2700.0, 0.8952, 0.3556, 3000.0, 0.8303, 0.3715, 4000.0, 0.6272, 0.4695, 4150.0, 0.5957, 0.4938, 6500.0, 0.4706, 0.6255
                ],
                "sensitivity_r": 1.0,
                "sensitivity_b": 1.0,
                "transverse_pos": 0.01339,
                "transverse_neg": 0.01002
            }
        },
        {
            "rpi.agc":
            {
                "metering_modes":
                {
                    "centre-weighted":
                    {
                        "weights":
                        [
                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0
                        ]
                    },
                    "spot":
                    {
                        "weights":
                        [
                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
                        ]
                    },
                    "matrix":
                    {
                        "weights":
                        [
                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
                        ]
                    }
                },
                "exposure_modes":
                {
                    "normal":
                    {
                        "shutter":
                        [
                            100, 10000, 30000, 60000, 120000
                        ],
                        "gain":
                        [
                            1.0, 2.0, 4.0, 6.0, 6.0
                        ]
                    },
                    "short":
                    {
                        "shutter":
                        [
                            100, 5000, 10000, 20000, 120000
                        ],
                        "gain":
                        [
                            1.0, 2.0, 4.0, 6.0, 6.0
                        ]
                    }
                },
                "constraint_modes":
                {
                    "normal":
                    [
                        {
                            "bound": "LOWER", "q_lo": 0.98, "q_hi": 1.0, "y_target":
                            [
                                0, 0.5, 1000, 0.5
                            ]
                        }
                    ],
                    "highlight":
                    [
                        {
                            "bound": "LOWER", "q_lo": 0.98, "q_hi": 1.0, "y_target":
                            [
                                0, 0.5, 1000, 0.5
                            ]
                        },
                        {
                            "bound": "UPPER", "q_lo": 0.98, "q_hi": 1.0, "y_target":
                            [
                                0, 0.8, 1000, 0.8
                            ]
                        }
                    ]
                },
                "y_target":
                [
                    0, 0.16, 1000, 0.165, 10000, 0.17
                ]
            }
        },
        {
            "rpi.alsc":
            {
                "omega": 1.3,
                "n_iter": 100,
                "luminance_strength": 0.5,
                "calibrations_Cr":
                [
                    {
                        "ct": 6500, "table":
                        [
                            2.189, 2.197, 2.203, 2.204, 2.203, 2.195, 2.189, 2.189, 2.189, 2.194, 2.204, 2.212, 2.215, 2.218, 2.213, 2.211,
                            2.196, 2.202, 2.206, 2.205, 2.201, 2.192, 2.189, 2.183, 2.184, 2.191, 2.198, 2.211, 2.218, 2.219, 2.218, 2.213,
                            2.198, 2.206, 2.206, 2.205, 2.199, 2.191, 2.182, 2.177, 2.177, 2.184, 2.196, 2.207, 2.219, 2.225, 2.225, 2.219,
                            2.199, 2.206, 2.206, 2.202, 2.197, 2.187, 2.176, 2.164, 2.164, 2.177, 2.188, 2.205, 2.218, 2.229, 2.229, 2.223,
                            2.203, 2.203, 2.204, 2.199, 2.194, 2.178, 2.164, 2.147, 2.142, 2.163, 2.178, 2.199, 2.216, 2.228, 2.228, 2.224,
                            2.206, 2.206, 2.203, 2.199, 2.192, 2.175, 2.149, 2.139, 2.133, 2.139, 2.165, 2.193, 2.212, 2.225, 2.225, 2.224,
                            2.208, 2.208, 2.208, 2.203, 2.193, 2.175, 2.149, 2.139, 2.133, 2.139, 2.165, 2.193, 2.211, 2.225, 2.225, 2.224,
                            2.215, 2.217, 2.217, 2.213, 2.204, 2.189, 2.172, 2.149, 2.147, 2.162, 2.172, 2.194, 2.211, 2.223, 2.223, 2.223,
                            2.222, 2.224, 2.229, 2.226, 2.214, 2.204, 2.188, 2.172, 2.171, 2.172, 2.184, 2.198, 2.211, 2.221, 2.221, 2.217,
                            2.224, 2.231, 2.233, 2.231, 2.226, 2.214, 2.201, 2.188, 2.184, 2.184, 2.191, 2.198, 2.211, 2.212, 2.214, 2.207,
                            2.224, 2.233, 2.235, 2.234, 2.229, 2.219, 2.209, 2.198, 2.191, 2.191, 2.196, 2.201, 2.203, 2.208, 2.204, 2.195,
                            2.219, 2.226, 2.234, 2.234, 2.231, 2.222, 2.212, 2.203, 2.196, 2.196, 2.198, 2.202, 2.202, 2.203, 2.195, 2.192
                        ]
                    }
                ],
                "calibrations_Cb":
                [
                    {
                        "ct": 6500, "table":
                        [
                            1.329, 1.329, 1.329, 1.337, 1.347, 1.355, 1.363, 1.367, 1.366, 1.359, 1.351, 1.342, 1.331, 1.321, 1.319, 1.317,
                            1.329, 1.329, 1.334, 1.339, 1.349, 1.358, 1.367, 1.373, 1.373, 1.366, 1.356, 1.344, 1.333, 1.322, 1.319, 1.315,
                            1.329, 1.334, 1.339, 1.349, 1.356, 1.365, 1.373, 1.379, 1.376, 1.373, 1.361, 1.348, 1.339, 1.329, 1.319, 1.315,
                            1.337, 1.343, 1.349, 1.356, 1.365, 1.374, 1.379, 1.383, 1.383, 1.376, 1.367, 1.356, 1.346, 1.337, 1.327, 1.319,
                            1.345, 1.351, 1.358, 1.366, 1.374, 1.379, 1.384, 1.387, 1.387, 1.382, 1.374, 1.364, 1.354, 1.344, 1.334, 1.326,
                            1.352, 1.358, 1.366, 1.374, 1.379, 1.386, 1.391, 1.393, 1.391, 1.387, 1.379, 1.369, 1.358, 1.347, 1.336, 1.326,
                            1.356, 1.362, 1.369, 1.377, 1.385, 1.389, 1.393, 1.395, 1.394, 1.388, 1.379, 1.369, 1.358, 1.347, 1.336, 1.326,
                            1.356, 1.362, 1.369, 1.377, 1.383, 1.388, 1.393, 1.394, 1.393, 1.387, 1.377, 1.367, 1.356, 1.346, 1.334, 1.326,
                            1.353, 1.359, 1.364, 1.369, 1.377, 1.383, 1.388, 1.389, 1.387, 1.381, 1.371, 1.361, 1.351, 1.341, 1.331, 1.324,
                            1.349, 1.353, 1.359, 1.363, 1.368, 1.374, 1.379, 1.381, 1.381, 1.371, 1.362, 1.353, 1.344, 1.335, 1.326, 1.319,
                            1.345, 1.346, 1.349, 1.353, 1.358, 1.364, 1.369, 1.369, 1.368, 1.362, 1.354, 1.344, 1.336, 1.327, 1.319, 1.318,
                            1.345, 1.345, 1.345, 1.349, 1.353, 1.358, 1.361, 1.361, 1.361, 1.355, 1.347, 1.338, 1.331, 1.322, 1.319, 1.318
                        ]
                    }
                ],
                "luminance_lut":
                [
                    3.893, 3.682, 3.101, 2.704, 2.357, 2.074, 1.985, 1.977, 1.977, 1.977, 2.041, 2.316, 2.666, 3.057, 3.627, 3.831,
                    3.682, 3.175, 2.714, 2.418, 2.072, 1.856, 1.712, 1.636, 1.636, 1.689, 1.821, 2.028, 2.376, 2.678, 3.128, 3.627,
                    3.177, 2.839, 2.421, 2.072, 1.847, 1.579, 1.434, 1.359, 1.359, 1.416, 1.545, 1.801, 2.028, 2.376, 2.797, 3.128,
                    2.991, 2.621, 2.206, 1.851, 1.579, 1.428, 1.226, 1.151, 1.151, 1.208, 1.395, 1.545, 1.801, 2.151, 2.579, 2.949,
                    2.915, 2.479, 2.061, 1.709, 1.433, 1.226, 1.146, 1.015, 1.013, 1.127, 1.208, 1.395, 1.661, 2.001, 2.433, 2.876,
                    2.915, 2.419, 1.989, 1.641, 1.361, 1.151, 1.015, 1.007, 1.001, 1.009, 1.127, 1.325, 1.594, 1.934, 2.371, 2.876,
                    2.915, 2.419, 1.989, 1.641, 1.361, 1.151, 1.013, 1.004, 1.001, 1.005, 1.127, 1.325, 1.594, 1.934, 2.371, 2.876,
                    2.922, 2.493, 2.063, 1.709, 1.434, 1.223, 1.146, 1.012, 1.008, 1.127, 1.205, 1.399, 1.666, 2.013, 2.449, 2.884,
                    3.009, 2.634, 2.209, 1.849, 1.582, 1.434, 1.223, 1.146, 1.146, 1.205, 1.399, 1.556, 1.811, 2.168, 2.601, 2.971,
                    3.221, 2.867, 2.437, 2.088, 1.849, 1.582, 1.441, 1.365, 1.365, 1.425, 1.556, 1.811, 2.059, 2.403, 2.836, 3.186,
                    3.755, 3.221, 2.759, 2.437, 2.088, 1.871, 1.726, 1.652, 1.652, 1.711, 1.846, 2.059, 2.403, 2.748, 3.186, 3.723,
                    3.951, 3.755, 3.157, 2.739, 2.383, 2.099, 2.019, 2.016, 2.016, 2.016, 2.086, 2.353, 2.713, 3.136, 3.723, 3.911
                ],
                "sigma": 0.005,
                "sigma_Cb": 0.005
            }
        },
        {
            "rpi.contrast":
            {
                "ce_enable": 1,
                "gamma_curve":
                [
                    0, 0, 1024, 5040, 2048, 9338, 3072, 12356, 4096, 15312, 5120, 18051, 6144, 20790, 7168, 23193,
                    8192, 25744, 9216, 27942, 10240, 30035, 11264, 32005, 12288, 33975, 13312, 35815, 14336, 37600, 15360, 39168,
                    16384, 40642, 18432, 43379, 20480, 45749, 22528, 47753, 24576, 49621, 26624, 51253, 28672, 52698, 30720, 53796,
                    32768, 54876, 36864, 57012, 40960, 58656, 45056, 59954, 49152, 61183, 53248, 62355, 57344, 63419, 61440, 64476,
                    65535, 65535
                ]
            }
        },
        {
            "rpi.ccm":
            {
                "ccms":
                [
                    {
                        "ct": 2700, "ccm":
                        [
                            1.24141, 0.35437, -0.59578, -0.51309, 1.87147, -0.35838, -0.31548, -1.11436, 2.42984
                        ]
                    },
                    {
                        "ct": 3000, "ccm":
                        [
                            1.46878, -0.28074, -0.18804, -0.41877, 1.41722, 0.00154, -0.12837, -0.98072, 2.10909
                        ]
                    },
                    {
                        "ct": 4000, "ccm":
                        [
                            1.43532, -0.25531, -0.18002, -0.35574, 1.46911, -0.11336, -0.12509, -0.60778, 1.73287
                        ]
                    },
                    {
                        "ct": 4150, "ccm":
                        [
                            1.70003, -0.58839, -0.11165, -0.43727, 1.47037, -0.03311, -0.13077, -0.51345, 1.64422
                        ]
                    },
                    {
                        "ct": 6500, "ccm":
                        [
                            1.53197, -0.25773, -0.27423, -0.32591, 1.57394, -0.24803, -0.17084, -0.30841, 1.47925
                        ]
                    }
                ]
            }
        },
        {
            "rpi.sharpen":
            {
                "threshold":1.5,
                "strength":0.5,
                "limit":0.2
            }
        },
        {
            "rpi.focus": { }
        },
        {
            "rpi.af":
            {
                "ranges":
                {
                    "normal":
                    {
                        "min": 0.0,
                        "max": 12.0,
                        "default": 1.0
                    },
                    "macro":
                    {
                        "min": 3.0,
                        "max": 15.0,
                        "default": 4.0
                    }
                },
                "speeds":
                {
                    "normal":
                    {
                        "step_coarse": 1.0,
                        "step_fine": 0.25,
                        "contrast_ratio": 0.75,
                        "pdaf_gain": -0.02,
                        "pdaf_squelch": 0.125,
                        "max_slew": 2.0,
                        "pdaf_frames": 20,
                        "dropout_frames": 6,
                        "step_frames": 4
                    }
                },
                "conf_epsilon": 8,
                "conf_thresh": 16,
                "conf_clip": 512,
                "skip_frames": 5,
                "map": [ 0.0, 0, 15.0, 1023 ]
            }
        }
    ]
}

Hi, thanks for this proposal. Yes this is probably a good idea to make remote session. Jst let me know how do you want to proceed.

@yaazzz

You can contact [email protected], I’ve talked to him about this, you can send him the forum link directly.

It seems like today might not have time though, tomorrow and the day after tomorrow are our holidays, so Monday is the fastest time we can be remote.

Happy weekend to you in advance too.

Hi Thank you. I will go first to install from scratch. I think something break the install. I will let you know after full install from scratch.

@yaazzz

Since I see a lot of extra configuration about hdmi in your config.txt, you can try to use a clean configuration file, only configure the camera. Just a guess, you can try it.

ran :sudo ./install_pivariety_pkgs.sh -d
I ran fine.
returned : Release/uninstall_driver.sh
Installing AK7375 and IMX519_LOW_SPEED…

Your camera is IMX519,and the relevant drivers have been installed.
ran: libcamera-still -t 5000
returned : Preview window unavailable

[0:03:56.768988099] [1126] INFO Camera camera_manager.cpp:299 libcamera v0.0.3+40-9b860a66

[0:03:56.846057190] [1127] INFO RPI raspberrypi.cpp:1425 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media4 and ISP device /dev/media2

[0:03:56.847245407] [1126] INFO Camera camera.cpp:1028 configuring streams: (0) 2328x1748-YUV420

[0:03:56.847703886] [1127] ERROR V4L2 v4l2_videodevice.cpp:1047 /dev/video0[13:cap]: Unable to set format: Device or resource busy

ERROR: *** failed to configure streams ***

Help please

@lynnfmsr

Before, I need some information

Please reboot your device and execute the following command:

wget -O arducam-camera-bug-report https://github.com/ketai-dhr/arducam-camera-bug-report/releases/download/tools/arducam-camera-bug-report
chmod +x ./arducam-camera-bug-report
./arducam-camera-bug-report

This will output an arducam-bug-report.txt in the current directory.

Please send this file to me in google cloud disk.

Thank you for your cooperation and have a nice life.

I emailed it to you, I do not have Google cloud disc?
Thanks

@lynnfmsr

okay, I saw it and replied to you in the email.

I’m having the same exact error as lynnfmsr. Not helpful when solutions are sent via email and not posted.

I’ve tried 3 separate times to get this thing up and running for OctoPrint on fresh installs and through the image, but all have failed.

IMX519, RPi 3

ERROR V4L2 v4l2_videodevice.cpp:1047 /dev/video0[13:cap]: Unable to set format: Device or Resource busy
ERROR: *** failed to configure streams ***

1 Like

@octopi_user

Did you follow the tutorial below?
https://docs.arducam.com/Raspberry-Pi-Camera/Native-camera/OctoPrint/

You can also directly try the image I made.(Use directly without any operation)

Hi arducam,
I found the new kernels have merged in support for imx519 and autofocus: dtoverlays: Add VCM option to imx519 · raspberrypi/linux@3d207e2 · GitHub

That is great! I added the focus algorithm section to imx519.json executed rpi-update to latest kernels 6.10 and autofocus is working great without needing any custom drivers.

You have any plans to merge updated tuning file and support for Pdaf in native libcamera also?
That would be a huge improvement!

@mgrl

We already support pdaf.
We have upgraded libcamera synchronously

I was asking for whether there are plans to merge your separate customization into the native libcamera branch. I would like to avoid installing separate packages via a script.

@mgrl

This is planned, but the actual time has not been confirmed yet, I will make a sticky announcement and continue to update the progress

1 Like