The user is part of the i2c unix group. No process is using any of the i2c files in /dev/, according to sudo lsof. Yet, when I try, I get this:
python ./AutofocusTest.py -i 10
[0:11:26.400553297] [2195] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3730-67300b62
[0:11:26.481037476] [2196] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'imx519'
[0:11:26.481094161] [2196] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
[0:11:26.497660628] [2196] WARN RPI raspberrypi.cpp:1274 Mismatch between Unicam and CamHelper for embedded data usage!
[0:11:26.498322862] [2196] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:11:26.498492138] [2196] INFO RPI raspberrypi.cpp:1398 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:11:26.502039303] [2195] INFO Camera camera.cpp:1029 configuring streams: (0) 640x360-XBGR8888
[0:11:26.502472465] [2196] INFO RPI raspberrypi.cpp:763 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 1280x720-SRGGB10_1X10 - Selected unicam format: 1280x720-pRAA
Error: Could not set address to 0x0c: Device or resource busy
Error: Could not set address to 0x0c: Device or resource busy
Error: Could not set address to 0x0c: Device or resource busy
Error: Could not set address to 0x0c: Device or resource busy
It’s the same with a normal user or with root, I always get resource busy.
I tried with all the /dev/ic2-XXX, none of them work.
the C code contains a 32-bit only binary file which can’t be used anymore.
the python code just doesn’t work, no matter which i2c port you use.
On the positive side:
The repo https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver DOES have a working example of manual focus which works on RaspberryOS 64 bit. It doesn’t use i2c, it goes via v4l2. It doesn’t help with libcamera, but it’s better than nothing.
Perhaps one could do a good cleanup of the different repos and make things work in both 32 and 64 bit.