Skip to main content
Associate
March 4, 2025
Solved

VD56G3 Linux driver cannot find camera

  • March 4, 2025
  • 15 replies
  • 3804 views

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!

Best answer by ds2

I have finally got it working by building libcamera with this tag: https://github.com/raspberrypi/libcamera/tree/v0.5.0%2Brpt20250429

It's also required to follow the instructions to copy the json file from here:
https://community.st.com/t5/imaging-sensors/error-with-vd66gy-on-raspberry-pi/m-p/785546

15 replies

3FTI
Associate III
May 29, 2025

@Jean_Poire ,

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

3FTI
Associate III
May 29, 2025

@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.

3FTI
Associate III
May 29, 2025

@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

 

 

ds2Author
Associate
June 6, 2025

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.

 

 

ds2AuthorBest answer
Associate
June 6, 2025

I have finally got it working by building libcamera with this tag: https://github.com/raspberrypi/libcamera/tree/v0.5.0%2Brpt20250429

It's also required to follow the instructions to copy the json file from here:
https://community.st.com/t5/imaging-sensors/error-with-vd66gy-on-raspberry-pi/m-p/785546

ST Employee
June 10, 2025

Hi,

 

We just updated our libcamera package to also include source code. Maybe it will be easier for you to rebuild directly from our source. You will get the up to date tuning file alongside it too.