Even running the MBS-provided example, when hitting the Initialize button, I get no errors but no images are captured or shown, either.
The “camera.Capture” call returns false.
The camera properties are shown, though. I also tried opening /dev/video1 and higher to no avail.
I have verified that the camera works with the “libcamera-hello” command.
Here’s a basic test code:
dim cam as new RaspberryPiCameraMBS
if not cam.Open() then
break
end if
if not cam.SetSize(640, 480) then
break
end if
if not cam.Capture() then
break
else
dim p as Picture = cam.Picture
break
end if
The error I find in the cam object says (in German):
Unpassender IOCTL (I/O-Control) für das Gerät
In English it means “Invalid IOCTL”
Which sounds like an error in the way the capture API is called.
I fear that they changed something for Pi5 or for Debian 12 and the MBS plugin hasn’t been updated accordingly.
So it appears that the MBS plugin uses older APIs that aren’t fully supported in Debian 12 “Bookworm” any more, where the newer “libcamera” functions should be used instead.
There is, however, a work-around for now: If you run the built app under the libcamerify tool, then the missing features for performing a capture are made available. The performance may suffer from this a bit, though (not sure). And this may stop working in a future Debian release.
For a test, build your app and then run it from the cmdline, but prefix the command with "libcamerify ", like this:
cd /path/to/my/program
libcamerify ./myprogram
And for remote debugging you’d launch the Remote debugger the same way, i.e. prefix its invocation with "libcamerify ".
You may have to install extra packages first to get this tool (not sure, but it can’t harm either, I think):