2025-03-03 5:44 PM
Hi,
I have installed the v4l2 driver for the STEVAL-56G3MAI1 camera module on ubuntu 22.04.05 LTS on a RPI CM4. But I am unable to access the module through /dev/video0.
I have followed the instructions in the linux start guide fro ST BrightSense but I cannot get it to work.
I am not sure if I need to do something in addition to these instructions:
cd en.vd56g3_1.0.3/src
make
sudo cp *.ko /lib/modules/$(uname -r)
sudo depmod -a
sudo reboot
sudo apt update
sudo apt install device-tree-compiler
cd en.vd56g3_1.0.3/dts/rpi1_to_4/
sudo dtc pcb4188_vd56g3.dts -o /boot/firmware/overlays/pcb4188_vd56g3.dtbo
sudo sh -c "echo 'dtoverlay=pcb4188_vd56g3' >> /boot/firmware/config.txt"
sudo reboot
v4l2-ctl --list-devices gives:
unicam (platform:fe801000.csi):
/dev/media3
Cannot open device /dev/video0, exiting.
Is there something I am missing in the setup? Should the driver be placed in a different folder?
Thanks for any assistance!
2025-05-14 2:27 AM
Hello @3FTI ,
I suspect that you updated your kernel version since last time you build the v4l2 drivers.
Can you check if you have the file vd56g3.ko under the folder /lib/modules/$(uname -r) pls?
If this is missing, you will have to rebuild the drivers:
$ make
$ sudo cp *.ko /lib/modules/$(uname -r)
$ sudo depmod -a
$ sudo reboot
Best regards,
Jean Poiré
2025-05-14 4:40 AM
Hi @Jean_Poire ,
The vd56g3.ko file was present but I built it again and copied it over just to be sure it was the latest. Unfortunately, it gives the same error as in my previous post when I try to capture an image.
$ libcamera-jpeg -o test.jpg
[0:03:55.086833599] [1115] INFO Camera camera_manager.cpp:326 libcamera v0.0.0+5536-20fea059-dirty (2025-05-05T14:33:07UTC)
[0:03:55.093924139] [1118] INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:13:50)
[0:03:55.094873626] [1118] WARN CameraSensorProperties camera_sensor_properties.cpp:473 No static properties available for 'vd56g3'
[0:03:55.094883959] [1118] WARN CameraSensorProperties camera_sensor_properties.cpp:475 Please consider updating the camera sensor properties database
[0:03:55.114919923] [1118] WARN CameraSensor camera_sensor_legacy.cpp:501 'vd56g3 10-0010': No sensor delays found in static properties. Assuming unverified defaults.
[0:03:55.115408259] [1118] INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@1000120000/rp1/i2c@88000/fox@10 to CFE device /dev/media3 and ISP device /dev/media1 using PiSP variant BCM2712_D0
Preview window unavailable
Mode selection for 562:682:12:P
SGRBG10_CSI2P,320x240/0 - Score: 2558.98
SGRBG10_CSI2P,480x640/0 - Score: 1470.14
SGRBG10_CSI2P,640x480/0 - Score: 1614.48
SGRBG10_CSI2P,768x1024/0 - Score: 1359.14
SGRBG10_CSI2P,1024x768/0 - Score: 1327.98
SGRBG10_CSI2P,720x1280/0 - Score: 1973.64
SGRBG10_CSI2P,1024x1280/0 - Score: 1337.14
SGRBG10_CSI2P,1120x1360/0 - Score: 1310.55
SGRBG10_CSI2P,1124x1364/0 - Score: 1311
SGRBG8,320x240/0 - Score: 3558.98
SGRBG8,480x640/0 - Score: 2470.14
SGRBG8,640x480/0 - Score: 2614.48
SGRBG8,768x1024/0 - Score: 2359.14
SGRBG8,1024x768/0 - Score: 2327.98
SGRBG8,720x1280/0 - Score: 2973.64
SGRBG8,1024x1280/0 - Score: 2337.14
SGRBG8,1120x1360/0 - Score: 2310.55
SGRBG8,1124x1364/0 - Score: 2311
Stream configuration adjusted
[0:03:55.116607710] [1115] INFO Camera camera.cpp:1205 configuring streams: (0) 562x682-YUV420 (1) 1120x1360-GRBG_PISP_COMP1
[0:03:55.116722526] [1118] INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@1000120000/rp1/i2c@88000/fox@10 - Selected sensor format: 1120x1360-SGRBG10_1X10 - Selected CFE format: 1120x1360-PC1G
[0:03:55.126275412] [1118] ERROR V4L2 v4l2_videodevice.cpp:2049 /dev/video6[18:cap]: Failed to start streaming: Invalid argument
ERROR: *** failed to start camera ***
Is there any other information or tests I can do that would provide more clues about the issue?
I appreciate your continued support.
Kind regards,
Chad
2025-05-25 11:47 PM
Hello @3FTI,
Sry for the delay, the understanding of your issue is bit more complicated than anticipated as I cannot replicate your error. Could you try to rebuild your libcamera-apps ? I found this ticket in the offical github of libcamera developpers: No cameras available! after libcamera instalation · Issue #92 · raspberrypi/libcamera . The error message is the same as the one you encountered so it is worth the try to follow their indications.
Kind regards,
Jean
2025-05-29 8:59 AM
I am attempting to do this, but I require the libcamera files as they are dependencies. Is it OK to use the current version or will I need ST's modified files for this to work?
Thanks,
Chad
2025-05-29 10:32 AM
@Jean_Poire I rebuilt rpicam-apps using the latest libcamera-dev and then intalled the ST libcamera files again afterward. I get the same result as before unfortunately.
2025-05-29 10:52 AM
@Jean_Poire I tried this with both the VD66 and VD56 cameras and both fail in the same way. Something to do with the V4L2 driver:
ERROR V4L2 v4l2_videodevice.cpp:2049 /dev/video6[18:cap]: Failed to start streaming: Connection timed out
2025-06-05 12:18 AM
Hi Megane,
As streaming via v4l2 isn't available yet, could you also provide instructions on how to install the libcamera ST provides or could you provide a workaround to get it working with libcamera0.2 which is already present on Ubuntu 24.04.
Thanks
2025-06-05 9:54 AM
Hi @ds2,
Sure. You can already find instructions on how to install and use Libcamera in our documentation titled 'Linux Start Guide for ST BrightSense Image Sensors' available at this link. The instructions are detailed in section 4.3, Libcamera.
Thanks, Megane
2025-06-05 6:15 PM - edited 2025-06-05 6:16 PM
Hi @MeganeG,
That works for Raspberry Pi OS but not for Ubuntu. So even though the driver works and can be recognised, I still cannot stream using libcamerasrc with gstreamer/opencv. Eg:
gst-launch-1.0 libcamerasrc ! videoconvert ! autovideosink
On a fresh install of Ubuntu 24.04.02 LTS, it comes pre-installed with libcamera0.2. When I try install your packages with the recommended command I get this issue:
sudo dpkg -i libcamera-ipa_0.5.0+rpt20250429+st20250505-1_arm64.deb libcamera0.5_0.5.0+rpt20250429+st20250505-1_arm64.deb
Selecting previously unselected package libcamera-ipa:arm64.
(Reading database ... 158886 files and directories currently installed.)
Preparing to unpack libcamera-ipa_0.5.0+rpt20250429+st20250505-1_arm64.deb ...
Unpacking libcamera-ipa:arm64 (0.5.0+rpt20250429+st20250505-1) ...
Selecting previously unselected package libcamera0.5:arm64.
Preparing to unpack libcamera0.5_0.5.0+rpt20250429+st20250505-1_arm64.deb ...
Unpacking libcamera0.5:arm64 (0.5.0+rpt20250429+st20250505-1) ...
dpkg: dependency problems prevent configuration of libcamera-ipa:arm64:
libcamera-ipa:arm64 depends on libpisp1 (>= 1.2.1); however:
Package libpisp1 is not installed.
dpkg: error processing package libcamera-ipa:arm64 (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libcamera0.5:arm64:
libcamera0.5:arm64 depends on libcamera-ipa; however:
Package libcamera-ipa:arm64 is not configured yet.
libcamera0.5:arm64 depends on libpisp1 (>= 1.2.1); however:
Package libpisp1 is not installed.
dpkg: error processing package libcamera0.5:arm64 (--install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.39-0ubuntu8.4) ...
Errors were encountered while processing:
libcamera-ipa:arm64
libcamera0.5:arm64
I then install the dependency:
mkdir libpisp && cd libpisp/
wget https://deb.debian.org/debian/pool/main/libp/libpisp/libpisp-common_1.2.1-2_all.deb
wget https://deb.debian.org/debian/pool/main/libp/libpisp/libpisp1_1.2.1-2_arm64.deb
sudo dpkg -i libpisp-common_1.2.1-2_all.deb libpisp1_1.2.1-2_arm64.deb
and reinstall your libcamera apps and it completes the install. With your driver installed and the sensor being successfully probed in dmesg, along with rp1-fge registering the 9 nodes as /dev/video0 to /dev/video7. I now try to stream using the above command and get this error:
gst-launch-1.0 libcamerasrc ! videoconvert ! autovideosink
Setting pipeline to PAUSED ...
[0:06:10.873535860] [4679] INFO Camera camera_manager.cpp:284 libcamera v0.2.0
ERROR: from element /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0: Could not find any supported camera on this system.
Additional debug info:
../src/gstreamer/gstlibcamerasrc.cpp(389): gst_libcamera_src_open (): /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0:
libcamera::CameraMananger::cameras() is empty
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
It appears to be using the previous libcamera, not ST's version I installed. I think gstreamer only works with libcamera0.2 on this version of Ubuntu, so I'm a bit stuck here. I think I need to build libcamera0.5.0 from github now. Or perhaps you could provide your libcamera0.2 files?
sudo apt install libcamera0.5
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libcamera0.5 is already the newest version (0.5.0+rpt20250429+st20250505-1).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
sudo apt install gstreamer1.0-libcamera
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gstreamer1.0-libcamera : Depends: libcamera0.2 (>= 0.2.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.