Raspberry Pi Camera V2.1 on Ubuntu 22.04

6,355 views
Skip to first unread message

camp .

unread,
Jul 27, 2022, 1:35:14 AM7/27/22
to HomeBrew Robotics Club
    So here we are again. I had the RaspiCam running on Ubuntu 20.04 as a proof of concept but had to go through, well, I don't even remember what I went through to get it running, BUT I HAD IT RUNNING! Anyway, I'm trying to get a Raspberry Pi Camera V2.1 running on Ubuntu 22.04.
 
    I'm currently running the command "ros2 run v4l2_camera v4l2_camera_node" and getting the below error:
 
camp@turtle11:~$ ros2 run v4l2_camera v4l2_camera_node
[INFO] [1658896077.801709445] [v4l2_camera]: Driver: unicam
[INFO] [1658896077.802025579] [v4l2_camera]: Version: 331559
[INFO] [1658896077.802086617] [v4l2_camera]: Device: unicam
[INFO] [1658896077.802169192] [v4l2_camera]: Location: platform:fe801000.csi
[INFO] [1658896077.802221378] [v4l2_camera]: Capabilities:
[INFO] [1658896077.802273767] [v4l2_camera]:   Read/write: YES
[INFO] [1658896077.802338490] [v4l2_camera]:   Streaming: YES
[INFO] [1658896077.802416639] [v4l2_camera]: Current pixel format: YUYV @ 640x480
[INFO] [1658896077.802525215] [v4l2_camera]: Available pixel formats:
[INFO] [1658896077.802570697] [v4l2_camera]: Available controls:
[INFO] [1658896077.803981419] [v4l2_camera]: Starting camera
[ERROR] [1658896077.806523119] [v4l2_camera]: Failed stream start: Invalid argument (22)
 
    Here's the github: https://index.ros.org/r/v4l2_camera/#humble
 
    Basically, the camera does not start, and we can see it on /dev/video0 (I say "we" as the ROS Discussion Group).
 
    We ran the command "v4l2-ctl -d /dev/video0 --list-formats-ext" and got the results below:
 
camp@turtle11:~$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
    Type: Video Capture

    [0]: 'YUYV' (YUYV 4:2:2)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
    [1]: 'UYVY' (UYVY 4:2:2)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
    [2]: 'YVYU' (YVYU 4:2:2)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
    [3]: 'VYUY' (VYUY 4:2:2)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
    [4]: 'RGBP' (16-bit RGB 5-6-5)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
    [5]: 'RGBR' (16-bit RGB 5-6-5 BE)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
    [6]: 'RGBO' (16-bit A/XRGB 1-5-5-5)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
    [7]: 'RGBQ' (16-bit A/XRGB 1-5-5-5 BE)
        Size: Stepwise 16x16 - 16376x16376 with step 1/1
------------------------------- snip -------------------------------
 
    This seems to imply the system is communicating with the camera, as does the first part of the v4l2 driver.
 
    We have included "start_x=1" and "gpu_mem=128" in the /boot/config.txt file and made the user a member of the video group, "cheese" couldn't open the device. Googling the error goes in various directions with a common theme: Raspicam doesn't work on 64-bit.
 
    My next step is a standard USB camera.  :- /
 
    Suggestions? Comments? Questions?
 
Thanks,
Camp

camp .

unread,
Jul 27, 2022, 7:43:34 PM7/27/22
to hbrob...@googlegroups.com
> My next step is a standard USB camera.  :- /
 
    Alright! I got the Logitech C270 webcam ($25) to work without any problems using the ROS2 v4l2 driver. I'm going to try it again with another microSD card to make sure it wasn't a fluke. The driver still has a few errors; failed a few control setting values and missing a calibration file but the camera works!
 
Loco Jo
 
- Camp

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/314501579.2710571.1658900107090%40mail.yahoo.com.

camp .

unread,
Jul 28, 2022, 1:34:51 AM7/28/22
to hbrob...@googlegroups.com
Alright, the demo during the meeting bombed but here is the video: https://youtu.be/Y82jFydsmSc
 
Thanks,
Camp

Alan Federman

unread,
Jul 28, 2022, 5:19:49 PM7/28/22
to hbrob...@googlegroups.com
it does work on ARM64 Pi 4 on ROS Noetic Ubuntu 20.04, not on 22.  I am thinking it may have something to do with the config.txt in boot, there are some different overlays and different ways to autodetect cameras and displays. I can seem to get either the Raspicam or the touchscreen working on 22/64.

Marco Walther

unread,
Jul 28, 2022, 9:15:54 PM7/28/22
to hbrob...@googlegroups.com
On 7/28/22 14:19, Alan Federman wrote:
> it does work on ARM64 Pi 4 on ROS Noetic Ubuntu 20.04, not on 22.  I am
> thinking it may have something to do with the config.txt in boot, there
> are some different overlays and different ways to autodetect cameras and
> displays. I can seem to get either the Raspicam or the touchscreen
> working on 22/64.

OK, I got an old v1.3 NoIR camera working on Ubuntu 22.04 (64bit) ;-)
I'm currently doing things on a very limited Pi3A (512MB), so progress
is slow.

https://www.raspberrypi.com/documentation/accessories/camera.html
Recompile the latest sources of libcamera & libcamera-apps as described
in that doc. It works the same way for Ubuntu 22.04 ;-) Ubuntu has
packages for libcamera0 and libcamera-tools but they seem to be rather
old and did not work for me.

Nothing special in the config.txt. I tried some options, but I'm back to
the original.
---------------------------------
# Autoload overlays for any recognized cameras or displays that are attached
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
# the legacy camera stack
camera_auto_detect=1
display_auto_detect=1

# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2

# start_x=1
# dtoverlay=ov5647
-------------------------------

ubuntu@jammy-rpi4:~$ libcamera-hello --list-cameras
Available cameras
-----------------
0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1/ov5647@36)
Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
1920x1080 [30.62 fps - (348,
434)/1928x1080 crop]
2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]

ubuntu@jammy-rpi4:~$ libcamera-jpeg -n -o foo.jpg
[4:41:15.607911113] [8632] INFO Camera camera_manager.cpp:293 libcamera
v0.0.0+3775-c19150ea
[4:41:15.690152997] [8633] INFO RPI raspberrypi.cpp:1368 Registered
camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media2
and ISP device /dev/media0
[4:41:15.692300229] [8632] INFO Camera camera.cpp:1029 configuring
streams: (0) 1296x972-YUV420
[4:41:15.693309340] [8633] INFO RPI raspberrypi.cpp:759 Sensor:
/base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format:
1296x972-SGBRG10_1X10 - Selected unicam format: 1296x972-pGAA
[4:41:20.882185084] [8632] INFO Camera camera.cpp:1029 configuring
streams: (0) 2592x1944-YUV420 (1) 2592x1944-SGBRG10_CSI2P
[4:41:20.885717571] [8633] INFO RPI raspberrypi.cpp:759 Sensor:
/base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format:
2592x1944-SGBRG10_1X10 - Selected unicam format: 2592x1944-pGAA
Still capture image received
ubuntu@jammy-rpi4:~$ libcamera-vid -n -o output.h264
[4:21:22.084984046] [8228] INFO Camera camera_manager.cpp:293 libcamera
v0.0.0+3775-c19150ea
[4:21:22.167619547] [8229] INFO RPI raspberrypi.cpp:1368 Registered
camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media2
and ISP device /dev/media0
[4:21:22.169812958] [8228] INFO Camera camera.cpp:1029 configuring
streams: (0) 640x480-YUV420
[4:21:22.170966277] [8229] INFO RPI raspberrypi.cpp:759 Sensor:
/base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format:
640x480-SGBRG10_1X10 - Selected unicam format: 640x480-pGAA
Halting: reached timeout of 5000 milliseconds.

Even things like
libcamera-vid -n -t 0 --inline --listen -o tcp://0.0.0.0:8888

work with some delay when accessing the stream remotely (

That's 'native Ubuntu' so far, not integrated into ROS:-( But the
libcamera has an v4l2 interface. So it should be able to work;-)

More to come;-)
-- Marco
>> <mailto:hbrobotics+...@googlegroups.com>.
>> <https://groups.google.com/d/msgid/hbrobotics/314501579.2710571.1658900107090%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/1897320526.69664.1659043164675%40connect.xfinity.com
> <https://groups.google.com/d/msgid/hbrobotics/1897320526.69664.1659043164675%40connect.xfinity.com?utm_medium=email&utm_source=footer>.
output.h264
foo.jpg

Marco Walther

unread,
Aug 1, 2022, 12:57:55 PM8/1/22
to hbrob...@googlegroups.com
On 7/28/22 18:15, Marco Walther wrote:
> On 7/28/22 14:19, Alan Federman wrote:
>> it does work on ARM64 Pi 4 on ROS Noetic Ubuntu 20.04, not on 22.  I
>> am thinking it may have something to do with the config.txt in boot,
>> there are some different overlays and different ways to autodetect
>> cameras and displays. I can seem to get either the Raspicam or the
>> touchscreen working on 22/64.
>
> OK, I got an old v1.3 NoIR camera working on Ubuntu 22.04 (64bit) ;-)
> I'm currently doing things on a very limited Pi3A (512MB), so progress
> is slow.

OK, the /camera/image_raw topic is showing in RViz;-) Not sure, an OS
update might have broken the 'camera_auto_detect=1' but with the
specified overlay, things work;-)

libcamera as before and https://github.com/christianrauch/camera_ros

ubuntu@jammy-rpi4:~/ros2_ws$ ros2 run camera_ros camera_node
[0:18:41.731504883] [2827] INFO Camera camera_manager.cpp:293 libcamera
v0.0.0+3775-c19150ea
[0:18:41.790475492] [2838] INFO RPI raspberrypi.cpp:1368 Registered
camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media0
and ISP device /dev/media2
>> cameras:
0: ov5647 (/base/soc/i2c0mux/i2c@1/ov5647@36)
>> stream configurations:
...

;-)

Have fun,
-- Marco
Screenshot_2022-08-01_16-52-13.png

Alan Federman

unread,
Aug 1, 2022, 4:20:34 PM8/1/22
to hbrob...@googlegroups.com, Marco Walther
ok with the camera autodetect on in config.txt it sees it as a CSI unicam device.

With autodetect off, it sees it as an mmal device.

In either case, the stream won't start, but it seems closer to working with auto detect off.  
I believe autodetect on is required for libcamera.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.

Marco Walther

unread,
Aug 1, 2022, 4:39:33 PM8/1/22
to Alan Federman, hbrob...@googlegroups.com
On 8/1/22 13:20, Alan Federman wrote:
> ok with the camera autodetect on in config.txt it sees it as a CSI
> unicam device.

On my fully upgraded Jammy, with
# camera_auto_detect=1
dtoverlay=ov5647

$ v4l2-ctl --list-devices sees my camera as
...
unicam (platform:fe801000.csi):
/dev/video0
/dev/media0

With
camera_auto_detect=1
# dtoverlay=ov5647

v4l2-ctl is not happy:-(
$ v4l2-ctl --list-devices
...
unicam (platform:fe801000.csi):
/dev/media0

Cannot open device /dev/video0, exiting.

!! That worked two/three days ago?!


Back to the specified dtoverlay!!
ubuntu@jammy-rpi4:~$ v4l2-ctl --list-devices
...
unicam (platform:fe801000.csi):
/dev/video0
/dev/media0

ubuntu@jammy-rpi4:~$ libcamera-hello --list-cameras
Available cameras
-----------------
0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1/ov5647@36)
Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
1920x1080 [30.62 fps - (348,
434)/1928x1080 crop]
2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]
ubuntu@jammy-rpi4:~$ libcamera-jpeg -n -o foo.jpg
[0:01:46.684251742] [1604] INFO Camera camera_manager.cpp:293 libcamera
v0.0.0+3775-c19150ea
[0:01:46.733639105] [1605] INFO RPI raspberrypi.cpp:1368 Registered
camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media0
and ISP device /dev/media1
[0:01:46.735059391] [1604] INFO Camera camera.cpp:1029 configuring
streams: (0) 1296x972-YUV420
[0:01:46.735629913] [1605] INFO RPI raspberrypi.cpp:759 Sensor:
/base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format:
1296x972-SGBRG10_1X10 - Selected unicam format: 1296x972-pGAA
[0:01:51.884615461] [1604] INFO Camera camera.cpp:1029 configuring
streams: (0) 2592x1944-YUV420 (1) 2592x1944-SGBRG10_CSI2P
[0:01:51.886293267] [1605] INFO RPI raspberrypi.cpp:759 Sensor:
/base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format:
2592x1944-SGBRG10_1X10 - Selected unicam format: 2592x1944-pGAA
Still capture image received
ubuntu@jammy-rpi4:~$ ls -l foo.jpg
-rw-rw-r-- 1 ubuntu ubuntu 1078246 Aug 1 20:36 foo.jpg
ubuntu@jammy-rpi4:~$ date
Mon Aug 1 08:36:19 PM UTC 2022
ubuntu@jammy-rpi4:~$ libcamera-hello --version
libcamera-apps build: 67d4e9294d61-intree 29-07-2022 (00:38:27)
libcamera build: v0.0.0+3775-c19150ea

-- Marco


>
> With autodetect off, it sees it as an mmal device.
>
> In either case, the stream won't start, but it seems closer to working
> with auto detect off.
> I believe autodetect on is required for libcamera.
>> On 08/01/2022 9:57 AM Marco Walther <marc...@gmail.com
>> >>> <mailto:hbrobotics+...@googlegroups.com
>> <https://groups.google.com/d/msgid/hbrobotics/314501579.2710571.1658900107090%40mail.yahoo.com?utm_medium=email&utm_source=footer
>> <https://groups.google.com/d/msgid/hbrobotics/314501579.2710571.1658900107090%40mail.yahoo.com?utm_medium=email&utm_source=footer>>.
>>
>> >>>
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "HomeBrew Robotics Club" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an email to hbrobotics+...@googlegroups.com
>> <mailto:hbrobotics+...@googlegroups.com>
>> >> <mailto:hbrobotics+...@googlegroups.com
>> <https://groups.google.com/d/msgid/hbrobotics/1897320526.69664.1659043164675%40connect.xfinity.com?utm_medium=email&utm_source=footer
>> <https://groups.google.com/d/msgid/hbrobotics/1897320526.69664.1659043164675%40connect.xfinity.com?utm_medium=email&utm_source=footer>>.
>>
>> >>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "HomeBrew Robotics Club" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to hbrobotics+...@googlegroups.com
>> <mailto:hbrobotics+...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/hbrobotics/98eaeb40-da69-3379-295d-6f20aedd11da%40gmail.com
>> <https://groups.google.com/d/msgid/hbrobotics/98eaeb40-da69-3379-295d-6f20aedd11da%40gmail.com>.
>>

Marco Walther

unread,
Aug 1, 2022, 5:38:18 PM8/1/22
to Alan Federman, hbrob...@googlegroups.com
On 8/1/22 13:39, Marco Walther wrote:
> On 8/1/22 13:20, Alan Federman wrote:
>> ok with the camera autodetect on in config.txt it sees it as a CSI
>> unicam device.
>
> On my fully upgraded Jammy, with
> # camera_auto_detect=1
> dtoverlay=ov5647
>
> $ v4l2-ctl --list-devices sees my camera as
> ...
> unicam (platform:fe801000.csi):
>         /dev/video0
>         /dev/media0
>
> With
> camera_auto_detect=1
> # dtoverlay=ov5647
>
> v4l2-ctl is not happy:-(
> $ v4l2-ctl --list-devices
> ...
> unicam (platform:fe801000.csi):
>         /dev/media0
>
> Cannot open device /dev/video0, exiting.
>
> !! That worked two/three days ago?!

Now I updated the RPi4 EEPROM and it seems to work with the
camera_auto_detect=1 again;-)

ubuntu@jammy-rpi4:~$ libcamera-hello --list-cameras
Available cameras
-----------------
0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1/ov5647@36)
Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
1920x1080 [30.62 fps - (348,
434)/1928x1080 crop]
2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]
ubuntu@jammy-rpi4:~$ v4l2-ctl --list-devices
...
unicam (platform:fe801000.csi):
/dev/video0
/dev/media0

;-)
ubuntu@jammy-rpi4:~$ sudo rpi-eeprom-update
BOOTLOADER: up to date
CURRENT: Tue Jan 25 02:30:41 PM UTC 2022 (1643121041)
LATEST: Tue Jan 25 02:30:41 PM UTC 2022 (1643121041)
RELEASE: default (/lib/firmware/raspberrypi/bootloader/default)
Use raspi-config to change the release.

VL805_FW: Dedicated VL805 EEPROM
VL805: up to date
CURRENT: 000138a1
LATEST: 000138a1

-- Marco

Alan Federman

unread,
Aug 1, 2022, 10:24:35 PM8/1/22
to hbrob...@googlegroups.com
I am using Ubuntu ARM64, there is no raspi-config available for Jammy. I think the only thing raspi-config does to enable the camera is add start_x=1 to config.txt.  How'd you get it? Also do you have a 1.5 version Rpi 4?  And what is that overlay about?
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.

Marco Walther

unread,
Aug 1, 2022, 10:59:44 PM8/1/22
to hbrob...@googlegroups.com, Alan Federman
On 8/1/22 19:24, Alan Federman wrote:
> I am using Ubuntu ARM64, there is no raspi-config available for Jammy.

ubuntu@jammy-rpi4:~/src/libcamera-0~git20220801+90906ba7$ dpkg -l
'raspi-con*'
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-===============-============-=================================
ii raspi-config 20201027ubuntu1 all Raspberry Pi
configuration tool

https://packages.ubuntu.com/jammy/raspi-config

> I
> think the only thing raspi-config does to enable the camera is add
> start_x=1 to config.txt.  How'd you get it?

> Also do you have a 1.5
> version Rpi 4?
No, /proc/cpuinfo reports
...
Hardware : BCM2835
Revision : c03111
Serial : 10000000e01eb166
Model : Raspberry Pi 4 Model B Rev 1.1

https://elinux.org/RPi_HardwareHistory does *not* list a 1.5 ?!

> And what is that overlay about?
https://bootlin.com/blog/enabling-new-hardware-on-raspberry-pi-with-device-tree-overlays/
- not camera related but seems to give some general ideas;-)

For your Raspcam v2.1, you might want to try the *imx219* ?! But the
camera_auto_detect should find it?!

I don't have a start_x (enabled in my config.txt)

-------------------------------------------------------------
ubuntu@jammy-rpi4:~/src/libcamera-0~git20220801+90906ba7$ cat
/boot/firmware/config.txt
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel

[pi4]
max_framebuffers=2
arm_boost=1

[all]
# Enable the audio output, I2C and SPI interfaces on the GPIO header. As
these
# parameters related to the base device-tree they must appear *before* any
# other dtoverlay= specification
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on

# Comment out the following line if the edges of the desktop appear outside
# the edges of your display
disable_overscan=1

# If you have issues with audio, you may try uncommenting the following line
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
# support audio output)
#hdmi_drive=2

# Enable the serial pins
enable_uart=1

# Autoload overlays for any recognized cameras or displays that are attached
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
# the legacy camera stack
camera_auto_detect=1
display_auto_detect=1

# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2

# start_x=1
# dtoverlay=ov5647

[cm4]
# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into
# such a board)
dtoverlay=dwc2,dr_mode=host

[all]
ubuntu@jammy-rpi4:~/src/libcamera-0~git20220801+90906ba7$
---------------------------------------------------
ubuntu@jammy-rpi4:~/src/libcamera-0~git20220801+90906ba7$ uname -a
Linux jammy-rpi4 5.15.0-1012-raspi #14-Ubuntu SMP PREEMPT Fri Jun 24
13:10:28 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

-- Marco

>> On 08/01/2022 2:38 PM Marco Walther <marc...@gmail.com
>> https://groups.google.com/d/msgid/hbrobotics/98eaeb40-da69-3379-295d-6f20aedd11da%40gmail.com
>> <https://groups.google.com/d/msgid/hbrobotics/98eaeb40-da69-3379-295d-6f20aedd11da%40gmail.com>
>>
>> >>>
>> <https://groups.google.com/d/msgid/hbrobotics/98eaeb40-da69-3379-295d-6f20aedd11da%40gmail.com
>> <https://groups.google.com/d/msgid/hbrobotics/98eaeb40-da69-3379-295d-6f20aedd11da%40gmail.com>>.
>>
>> >>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "HomeBrew Robotics Club" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to hbrobotics+...@googlegroups.com
>> <mailto:hbrobotics+...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/hbrobotics/eb0c4d94-f9a5-bfd5-a094-5b4d8f95d1b2%40gmail.com
>> <https://groups.google.com/d/msgid/hbrobotics/eb0c4d94-f9a5-bfd5-a094-5b4d8f95d1b2%40gmail.com>.
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/1114117066.269635.1659407047615%40connect.xfinity.com
> <https://groups.google.com/d/msgid/hbrobotics/1114117066.269635.1659407047615%40connect.xfinity.com?utm_medium=email&utm_source=footer>.

James H Phelan

unread,
Aug 7, 2022, 1:02:15 PM8/7/22
to hbrob...@googlegroups.com

Alan & Camp, et al.,

on my Pi4 / U22/ R2 Humble with configuration

# camera_auto_detect=1
dtoverlay=ov5647

$ v4l2-ctl --list-devices sees my camera as
...
unicam (platform:fe801000.csi):

        /dev/media0

and complains it cannot open device /dev/video0 and quits.

Cheese fails complaining:

(cheese:2864): Glib-Gobject-CRITICAL **: 11:25:35.890: g_value_dup_string: assertion ‘G_VALUE_HOLDS_STRING (value)’ failed

Camp,

What was your config.txt that worked?

What other "secret sauce" did you do to install?

[in a past (U18?) version of Ubuntu, the config.txt cautioned NOT to edit it but to edit usrconfig.txt instead.  That seems to have disappeared?]

BTW it's not /boot/config.txt but /boot/firmware/config.txt

James

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

"Here am I, the servent of the Lord;
let it be with me, according to your Word"
Luke 1:38

Alan Federman

unread,
Aug 7, 2022, 1:35:36 PM8/7/22
to hbrob...@googlegroups.com, James H Phelan
I never got cheese to work on any RPi camera. I don't think it is possible. It is possible to get libcamera and ROS to work. For ROS2, use the camera_ros driver. Make sure you use the shortest cable possible for the camera. I am not sure about non ROS apps. I haven't tried OpenCV outside of ROS on RPi.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/10e0b7f9-4e1c-7ae9-8279-0624efca3b0d%40hal-pc.org.

James H Phelan

unread,
Aug 7, 2022, 4:25:41 PM8/7/22
to Alan Federman, hbrob...@googlegroups.com

Robuds,

I've tried climbing back this thread to install libcamera, etc. and keep finding myself in the weeds.

Does anybody have a reliable recipe to follow? 

Pi4b 8GB / U22.04 Jammy / ROS2 Humble / camera v2.1

James

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

"Here am I, the servent of the Lord;
let it be with me, according to your Word"
Luke 1:38
On 8/7/2022 12:35 PM, Alan Federman wrote:
I never got cheese to work on any RPi camera. I don't think it is possible. It is possible to get libcamera and ROS to work. For ROS2, use the camera_ros driver. Make sure you use the shortest cable possible for the camera. I am not sure about non ROS apps. I haven't tried OpenCV outside of ROS on RPi.
On 08/07/2022 10:02 AM James H Phelan <jhph...@hal-pc.org> wrote:


Alan & Camp, et al.,

on my Pi4 / U22/ R2 Humble with configuration

# camera_auto_detect=1
dtoverlay=ov5647

$ v4l2-ctl --list-devices sees my camera as
...
unicam (platform:fe801000.csi):
        /dev/media0

and complains it cannot open device /dev/video0 and quits.l

Marco Walther

unread,
Aug 7, 2022, 6:08:11 PM8/7/22
to hbrob...@googlegroups.com, James H Phelan, Alan Federman
On 8/7/22 13:25, James H Phelan wrote:
> Robuds,
>
> I've tried climbing back this thread to install libcamera, etc. and keep
> finding myself in the weeds.

Why do you think,
>>> dtoverlay=ov5647

is a good idea for your camera v2.1? That should be an imx219, if I'm
not mistaken?!

Otherwise, update the firmware on your RPi4 and I would suggest the
packages from this post:

https://groups.google.com/g/hbrobotics/c/AmMHWrGP1EM

That should hopefully get the libcamera parts working.


>
> Does anybody have a reliable recipe to follow?

With so many different combinations out there, you will never really be
able to follow anything blindly:-( Know, what you have and what you want
to archive and adapt things accordingly.


-- Marco

>
> Pi4b 8GB / U22.04 Jammy / ROS2 Humble / camera v2.1
>
> James
>
> James H Phelan
> "Nihil est sine ratione cur potius sit quam non sit"
> Leibniz
>
> "Here am I, the servent of the Lord;
> let it be with me, according to your Word"
> Luke 1:38
>
> On 8/7/2022 12:35 PM, Alan Federman wrote:
>> I never got cheese to work on any RPi camera. I don't think it is
>> possible. It is possible to get libcamera and ROS to work. For ROS2,
>> use the camera_ros driver. Make sure you use the shortest cable
>> possible for the camera. I am not sure about non ROS apps. I haven't
>> tried OpenCV outside of ROS on RPi.
>>> On 08/07/2022 10:02 AM James H Phelan <jhph...@hal-pc.org> wrote:
>>>
>>>
>>> *Alan & Camp, et al.,*
>>>
>>> on my Pi4 / U22/ R2 Humble with configuration
>>>
>>> # camera_auto_detect=1
>>> dtoverlay=ov5647
>>>
>>> $ v4l2-ctl --list-devices sees my camera as
>>> ...
>>> unicam (platform:fe801000.csi):
>>>         /dev/media0
>>>
>>> and complains it cannot open device /dev/video0 and quits.l
>>>
>>> Cheese fails complaining:
>>>
>>> (cheese:2864): Glib-Gobject-CRITICAL **: 11:25:35.890:
>>> g_value_dup_string: assertion ‘G_VALUE_HOLDS_STRING (value)’ failed
>>>
>>> *Camp*,
>>>
>>> What was your config.txt that worked?
>>>
>>> What other "secret sauce" did you do to install?
>>>
>>> [in a past (U18?) version of Ubuntu, the config.txt cautioned NOT to
>>> edit it but to edit usrconfig.txt instead.  That seems to have
>>> disappeared?]
>>>
>>> BTW it's not /boot/config.txt but /boot/*firmware*/config.txt
>>> <https://groups.google.com/d/msgid/hbrobotics/10e0b7f9-4e1c-7ae9-8279-0624efca3b0d%40hal-pc.org?utm_medium=email&utm_source=footer>.
>>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/4d65d754-04b3-b7de-124a-e02cc23cf921%40hal-pc.org
> <https://groups.google.com/d/msgid/hbrobotics/4d65d754-04b3-b7de-124a-e02cc23cf921%40hal-pc.org?utm_medium=email&utm_source=footer>.

Ross Lunan

unread,
Aug 8, 2022, 8:50:42 PM8/8/22
to HomeBrew Robotics Club
Marco July 28. Following the Raspberry Pi instructions to build the libcamera & libcamera-apps. Seem to have installed the necessary dependencies, but the meson compiles fails at: The Meson build system

Version: 0.63.0

Source dir: /home/ubuntu/libcamera

Build dir: /home/ubuntu/libcamera/build

Build type: native build

Project name: libcamera

Project version: 0.0.0

C compiler for the host machine: cc (gcc 11.2.0 "cc (Ubuntu 11.2.0-19ubuntu1) 11.2.0")

C linker for the host machine: cc ld.bfd 2.38

C++ compiler for the host machine: c++ (gcc 11.2.0 "c++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0")

C++ linker for the host machine: c++ ld.bfd 2.38

Host machine cpu family: aarch64

Host machine cpu: aarch64

Header "unistd.h" has symbol "issetugid" : NO 

Header "stdlib.h" has symbol "secure_getenv" : YES 

Compiler for C supports arguments -Wno-c99-designator: NO 

Library lttng-ust found: NO

Program ./parser.py found: YES (/home/ubuntu/libcamera/utils/ipc/./parser.py)

Program ./generate.py found: YES (/home/ubuntu/libcamera/utils/ipc/./generate.py)

Program ./extract-docs.py found: YES (/home/ubuntu/libcamera/utils/ipc/./extract-docs.py)

Program ./gen-tp-header.py found: YES (/home/ubuntu/libcamera/utils/tracepoints/./gen-tp-header.py)

Configuring version.h using configuration

Program openssl found: YES (/usr/bin/openssl)

Library atomic found: YES

Library libdw found: YES

Library libunwind found: YES

Header "execinfo.h" has symbol "backtrace" : YES 

Run-time dependency threads found: YES

Library dl found: YES


src/libcamera/meson.build:68:0: ERROR: C shared or static library 'gnutls' not found


A full log can be found at /home/ubuntu/libcamera/build/meson-logs/meson-log.txt

ubuntu@rp4-ub22h-r2:~/libcamera

Appreciate any advice 
Regards
Ross

Marco Walther

unread,
Aug 8, 2022, 9:10:19 PM8/8/22
to hbrob...@googlegroups.com
On 8/8/22 17:50, 'Ross Lunan' via HomeBrew Robotics Club wrote:
> Marco July 28. Following the Raspberry Pi instructions to build the
> libcamera & libcamera-apps. Seem to have installed the necessary
> dependencies, but the meson compiles fails at: *The Meson build system*
>
> Version: 0.63.0
>
> Source dir: */home/ubuntu/libcamera*
>
> Build dir: */home/ubuntu/libcamera/build*
>
> Build type: *native build*
>
> Project name: *libcamera*
>
> Project version: *0.0.0*
>
> C compiler for the host machine: *cc* (gcc 11.2.0 "cc (Ubuntu
> 11.2.0-19ubuntu1) 11.2.0")
>
> C linker for the host machine: *cc* ld.bfd 2.38
>
> C++ compiler for the host machine: *c++* (gcc 11.2.0 "c++ (Ubuntu
> 11.2.0-19ubuntu1) 11.2.0")
>
> C++ linker for the host machine: *c++* ld.bfd 2.38
>
> Host machine cpu family: *aarch64*
>
> Host machine cpu: *aarch64*
>
> Header "*unistd.h*" has symbol "*issetugid*" : *NO*
>
> Header "*stdlib.h*" has symbol "*secure_getenv*" : *YES*
>
> Compiler for C supports arguments -Wno-c99-designator: *NO*
>
> Library *lttng-ust* found: *NO*
>
> Program *./parser.py* found: *YES*
> (/home/ubuntu/libcamera/utils/ipc/./parser.py)
>
> Program *./generate.py* found: *YES*
> (/home/ubuntu/libcamera/utils/ipc/./generate.py)
>
> Program *./extract-docs.py* found: *YES*
> (/home/ubuntu/libcamera/utils/ipc/./extract-docs.py)
>
> Program *./gen-tp-header.py* found: *YES*
> (/home/ubuntu/libcamera/utils/tracepoints/./gen-tp-header.py)
>
> Configuring *version.h* using configuration
>
> Program *openssl* found: *YES* (/usr/bin/openssl)
>
> Library *atomic* found: *YES*
>
> Library *libdw* found: *YES*
>
> Library *libunwind* found: *YES*
>
> Header "*execinfo.h*" has symbol "*backtrace*" : *YES*
>
> Run-time dependency *threads* found: *YES*
>
> Library *dl* found: *YES*
>
>
> src/libcamera/meson.build:68:0: *ERROR:* C shared or static library
> 'gnutls' not found
>
>
> A full log can be found at
> */home/ubuntu/libcamera/build/meson-logs/meson-log.txt*
>
> *ubuntu@rp4-ub22h-r2*:*~/libcamera*$
>
> Appreciate any advice

install the libgnutls*-dev package.

-- Marco
> tcp://0.0.0.0:8888 <http://0.0.0.0:8888>
> <https://groups.google.com/d/msgid/hbrobotics/10e0b7f9-4e1c-7ae9-8279-0624efca3b0d%40hal-pc.org?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/hbrobotics/10e0b7f9-4e1c-7ae9-8279-0624efca3b0d%40hal-pc.org?utm_medium=email&utm_source=footer>>.
>
> >>>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "HomeBrew Robotics Club" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to hbrobotics+...@googlegroups.com
> > <mailto:hbrobotics+...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/hbrobotics/4d65d754-04b3-b7de-124a-e02cc23cf921%40hal-pc.org
> <https://groups.google.com/d/msgid/hbrobotics/4d65d754-04b3-b7de-124a-e02cc23cf921%40hal-pc.org>
>
> >
> <https://groups.google.com/d/msgid/hbrobotics/4d65d754-04b3-b7de-124a-e02cc23cf921%40hal-pc.org?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/hbrobotics/4d65d754-04b3-b7de-124a-e02cc23cf921%40hal-pc.org?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Alan Federman

unread,
Aug 9, 2022, 11:07:32 AM8/9/22
to hbrob...@googlegroups.com, Marco Walther
i built the libcamera source from the libcamera GitHub, not the Linux TV repo suggested by Raspberry Pi, but I am uncertain that makes a difference. I am pretty sure installing from apt doesn't work.

Marco Walther

unread,
Aug 9, 2022, 12:36:56 PM8/9/22
to Alan Federman, hbrob...@googlegroups.com
On 8/9/22 08:07, Alan Federman wrote:
> i built the libcamera source from the libcamera GitHub, not the Linux TV
> repo suggested by Raspberry Pi, but I am uncertain that makes a
> difference. I am pretty sure installing from apt doesn't work.

The packages from the official Ubuntu 22.04 package repos are based on
libcamera sources from 2020!! They don't work.

So, you either uninstall those and install from source or try to use the
packages, I built a couple of days ago (also from the official libcamera
source repo;-).

-- Marco

>> On 08/08/2022 6:10 PM Marco Walther <marc...@gmail.com
>>> tcp://0.0.0.0:8888 <http://0.0.0.0:8888 <http://0.0.0.0:8888>>
>>> >>>>>>>
>>> >>>>>>> work with some delay when accessing the stream remotely (
>>> >>>>>>>
>>> >>>>>>> That's 'native Ubuntu' so far, not integrated into ROS:-(
>>> But the
>>> >>>>>>> libcamera has an v4l2 interface. So it should be able to
>>> work;-)
>>> >>>>>>>
>>> >>>>>>> More to come;-)
>>> >>>>>>> -- Marco
>>> >>>>>>>
>>> >>>>>>> >> On 07/26/2022 10:35 PM camp . <ca...@camppeavy.com
>>> <mailto:ca...@camppeavy.com>
>>> >>>>>>> <mailto:ca...@camppeavy.com <mailto:ca...@camppeavy.com>>>
>>> >>> send an email to hbrobotics+...@googlegroups.com
>>> <mailto:hbrobotics+...@googlegroups.com>.
>>> >>> To view this discussion on the web visit
>>> >>>
>>> https://groups.google.com/d/msgid/hbrobotics/10e0b7f9-4e1c-7ae9-8279-0624efca3b0d%40hal-pc.org
>>> > <mailto:hbrobotics+...@googlegroups.com
>>> <mailto:hbrobotics+...@googlegroups.com>>.
>>> > To view this discussion on the web visit
>>> >
>>> https://groups.google.com/d/msgid/hbrobotics/4d65d754-04b3-b7de-124a-e02cc23cf921%40hal-pc.org
>>> <mailto:hbrobotics+...@googlegroups.com
>>> <mailto:hbrobotics+...@googlegroups.com>>.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com>
>>>
>>> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer
>>> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "HomeBrew Robotics Club" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to hbrobotics+...@googlegroups.com
>> <mailto:hbrobotics+...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/hbrobotics/4312c618-f6b4-4536-b2f1-994d9afa098f%40gmail.com
>> <https://groups.google.com/d/msgid/hbrobotics/4312c618-f6b4-4536-b2f1-994d9afa098f%40gmail.com>.
>>

Ross Lunan

unread,
Aug 12, 2022, 5:16:02 PM8/12/22
to HomeBrew Robotics Club
Marco, Many tnx for libcamera & lib camera-apps installation advice - After installing libgnutils28-dev, and cmake, libpng-dev, successfully installed this app on my Raspi4/8GB Ubuntu-Mate 22.04 (aarch64). In spite of doing edits to the config.sys prescribed in https://raspberrypi.stackexchange.com/questions/135364/libcamera-stack-does-not-work-with-bullseye as follows to enable my Camera,                                 [all]
camera_auto_detect=0
dtoverlay=imx219,media-controller=0
gpu_mem=256
dtoverlay=vc4-kms-v3d   

While the Camera shows up in /dev,  
ubuntu@rp4-ub22h-r2:~$ ls -l /dev/video0
crw-rw----+ 1 root video 81, 13 Aug 11 19:00 /dev/video0
and :~$ v4l2-ctl --list-devces
unicam (platform:fe80100.csi
       /dev/video0
:~$  libcamera-hello --list-cameras reports "no camera available", and 
ubuntu@rp4-ub22h-r2:~$ libcamera-hello
Preview window unavailable
[0:02:00.742143535] [2807]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3815-293e23e2
[0:02:00.775181060] [2808] ERROR RPI dma_heaps.cpp:53 Could not open any dmaHeap device
[0:02:00.775318681] [2808] ERROR RPI raspberrypi.cpp:1184 Failed to register camera imx219 10-0010: -12
ERROR: *** no cameras available ***

Camp is having an identical propel :(

Any Suggestions :)
Regards
Ross

Alan Federman

unread,
Aug 12, 2022, 5:36:08 PM8/12/22
to hbrob...@googlegroups.com
I will check, off the top of my head I used the fkms version of the overlay, and just used imx219 without arguments.


To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/ed0be833-083e-4917-a4c8-04e0dd199d81n%40googlegroups.com.

Marco Walther

unread,
Aug 12, 2022, 5:40:34 PM8/12/22
to hbrob...@googlegroups.com
On 8/12/22 14:16, 'Ross Lunan' via HomeBrew Robotics Club wrote:
> Marco, Many tnx for libcamera & lib camera-apps installation advice -
> After installing libgnutils28-dev, and cmake, libpng-dev, successfully
> installed this app on my Raspi4/8GB Ubuntu-Mate 22.04 (aarch64). In
> spite of doing edits to the *config.sys* prescribed in

You did that to the /boot/firmware/config.txt, right?

> https://raspberrypi.stackexchange.com/questions/135364/libcamera-stack-does-not-work-with-bullseye
> <https://raspberrypi.stackexchange.com/questions/135364/libcamera-stack-does-not-work-with-bullseye> as
> follows to enable my Camera,                                 [all]
> camera_auto_detect=0
> dtoverlay=imx219,media-controller=0

Did you try without the ',media-controller=0' part? I don't have that on
there (I have the /dev/media* devices in the list) and the latest (as of
> two weeks ago) libcamera sources handle that just fine;-)

-- Marco
> <http://0.0.0.0:8888> <http://0.0.0.0:8888 <http://0.0.0.0:8888>>>
> https://groups.google.com/d/msgid/hbrobotics/ed0be833-083e-4917-a4c8-04e0dd199d81n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/ed0be833-083e-4917-a4c8-04e0dd199d81n%40googlegroups.com?utm_medium=email&utm_source=footer>.

camp .

unread,
Aug 12, 2022, 6:06:15 PM8/12/22
to hbrob...@googlegroups.com
    I bypassed the problem using a plain old USB camera (Logitech C270). For RaspiCam, the advice was to move to libcamera because (as I understood it) v4l2 wasn't 64-bit compatible (Ubuntu 22.04). Which begs the question, why does a standard USB camera work with v4l2 (Video4Linux) and the RaspiCam not?
 
Thanks,
Camp

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+unsub...@googlegroups.com.

Marco Walther

unread,
Aug 12, 2022, 6:20:44 PM8/12/22
to hbrob...@googlegroups.com, camp .
On 8/12/22 15:06, camp . wrote:
>     I bypassed the problem using a plain old USB camera (Logitech
> C270). For RaspiCam, the advice was to move to libcamera because (as I
> understood it) v4l2 wasn't 64-bit compatible (Ubuntu 22.04). Which begs
> the question, why does a standard USB camera work with v4l2
> (Video4Linux) and the RaspiCam not?

It's *not* the v4l2, that's the problem. That has been running 64bit for
many years. It's the Broadcom binary blob and the mmal libraries
interfacing to it, which are 32bit-only. They are specific to the RasPi
and v4l2 makes use of those [in the 32bit world] to connect to the
RaspiCam. The libcamera has some rudimentary interface layer for v4l2 as
well. But I did not get that really working yet.


@Ross,

question for you: Does that camera work fine with the 32bit Rasbian on
your Pi? I see, many imx219 - based camera which *only* list the RasPi
*compute moduels* as compatible?! I don't know, what that is all about?!
If anybody else knows, please share;-) I would be interested in one but
those limitations kind of kept me away??

-- Marco

>
> Thanks,
> Camp
>
> On Friday, August 12, 2022 at 05:40:34 PM EDT, Marco Walther
> <marc...@gmail.com> wrote:
>
>
> On 8/12/22 14:16, 'Ross Lunan' via HomeBrew Robotics Club wrote:
> > Marco, Many tnx for libcamera & lib camera-apps installation advice -
> > After installing libgnutils28-dev, and cmake, libpng-dev, successfully
> > installed this app on my Raspi4/8GB Ubuntu-Mate 22.04 (aarch64). In
> > spite of doing edits to the *config.sys* prescribed in
>
> You did that to the /boot/firmware/config.txt, right?
>
> >
> https://raspberrypi.stackexchange.com/questions/135364/libcamera-stack-does-not-work-with-bullseye
> <https://raspberrypi.stackexchange.com/questions/135364/libcamera-stack-does-not-work-with-bullseye
> >
> >
> <https://raspberrypi.stackexchange.com/questions/135364/libcamera-stack-does-not-work-with-bullseye
> <https://raspberrypi.stackexchange.com/questions/135364/libcamera-stack-does-not-work-with-bullseye>> as
>
> > follows to enable my Camera,                                 [all]
> > camera_auto_detect=0
> > dtoverlay=imx219,media-controller=0
>
> Did you try without the ',media-controller=0' part? I don't have that on
> there (I have the /dev/media* devices in the list) and the latest (as of
> > two weeks ago) libcamera sources handle that just fine;-)
>
> -- Marco
>
> > gpu_mem=256
> > dtoverlay=vc4-kms-v3d
> >
> > While the Camera shows up in /dev,
> > ubuntu@rp4-ub22h-r2 <mailto:ubuntu@rp4-ub22h-r2>:~$ ls -l /dev/video0
> > crw-rw----+ 1 root video 81, 13 Aug 11 19:00 /dev/video0
> > and :~$ v4l2-ctl --list-devces
> > unicam (platform:fe80100.csi
> >         /dev/video0
> > :~$  libcamera-hello --list-cameras reports "no camera available", and
> > ubuntu@rp4-ub22h-r2 <mailto:ubuntu@rp4-ub22h-r2>:~$ libcamera-hello
> > Preview window unavailable
> > [0:02:00.742143535] [2807]  INFO Camera camera_manager.cpp:293 libcamera
> > v0.0.0+3815-293e23e2
> > [0:02:00.775181060] [2808] ERROR RPI dma_heaps.cpp:53 Could not open any
> > dmaHeap device
> > [0:02:00.775318681] [2808] ERROR RPI raspberrypi.cpp:1184 Failed to
> > register camera imx219 10-0010: -12
> > ERROR: *** no cameras available ***
> >
> > Camp is having an identical propel :(
> >
> > Any Suggestions :)
> > Regards
> > Ross
> >
> >
> >
> > On Tuesday, August 9, 2022 at 12:36:56 PM UTC-4 marc...@gmail.com
> <mailto:marc...@gmail.com> wrote:
> >
> >    On 8/9/22 08:07, Alan Federman wrote:
> >      > i built the libcamera source from the libcamera GitHub, not the
> >    Linux TV
> >      > repo suggested by Raspberry Pi, but I am uncertain that makes a
> >      > difference. I am pretty sure installing from apt doesn't work.
> >
> >    The packages from the official Ubuntu 22.04 package repos are based on
> >    libcamera sources from 2020!! They don't work.
> >
> >    So, you either uninstall those and install from source or try to use
> >    the
> >    packages, I built a couple of days ago (also from the official
> >    libcamera
> >    source repo;-).
> >
> >    -- Marco
> >
> >      >> On 08/08/2022 6:10 PM Marco Walther <marc...@gmail.com
> <mailto:marc...@gmail.com>
> <mailto:ubuntu@rp4-ub22h-r2>*:*~/libcamera*$
> >      >>>
> >      >>> Appreciate any advice
> >      >> install the libgnutls*-dev package.
> >      >>
> >      >> -- Marco
> >      >>
> >      >>> Regards
> >      >>> Ross
> >      >>> On Sunday, August 7, 2022 at 6:08:11 PM UTC-4
> marc...@gmail.com <mailto:marc...@gmail.com>
> >      >>> >>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$
> v4l2-ctl --list-devices
> >      >>> >>>> ...
> >      >>> >>>> unicam (platform:fe801000.csi):
> >      >>> >>>>         /dev/video0
> >      >>> >>>>         /dev/media0
> >      >>> >>>>
> >      >>> >>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$
> libcamera-hello --list-cameras
> >      >>> >>>> Available cameras
> >      >>> >>>> -----------------
> >      >>> >>>> 0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1
> <mailto:i2c@1>/ov5647@36 <mailto:ov5647@36>)
> >      >>> >>>>     Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16,
> >      >>> 0)/2560x1920
> >      >>> >>>> crop]
> >      >>> >>>>                              1296x972 [43.25 fps - (0,
> >      >>> 0)/2592x1944
> >      >>> >>>> crop]
> >      >>> >>>>                              1920x1080 [30.62 fps - (348,
> >      >>> >>>> 434)/1928x1080 crop]
> >      >>> >>>>                              2592x1944 [15.63 fps - (0,
> >      >>> 0)/2592x1944
> >      >>> >>>> crop]
> >      >>> >>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$
> libcamera-jpeg -n -o foo.jpg
> >      >>> >>>> [0:01:46.684251742] [1604]  INFO Camera
> >    camera_manager.cpp:293
> >      >>> >>>> libcamera v0.0.0+3775-c19150ea
> >      >>> >>>> [0:01:46.733639105] [1605]  INFO RPI raspberrypi.cpp:1368
> >      >>> Registered
> >      >>> >>>> camera /base/soc/i2c0mux/i2c@1 <mailto:i2c@1>/ov5647@36
> <mailto:ov5647@36> to Unicam device
> >      >>> >>>> /dev/media0 and ISP device /dev/media1
> >      >>> >>>> [0:01:46.735059391] [1604]  INFO Camera camera.cpp:1029
> >      >>> configuring
> >      >>> >>>> streams: (0) 1296x972-YUV420
> >      >>> >>>> [0:01:46.735629913] [1605]  INFO RPI raspberrypi.cpp:759
> >    Sensor:
> >      >>> >>>> /base/soc/i2c0mux/i2c@1 <mailto:i2c@1>/ov5647@36
> <mailto:ov5647@36> - Selected sensor format:
> >      >>> >>>> 1296x972-SGBRG10_1X10 - Selected unicam format:
> 1296x972-pGAA
> >      >>> >>>> [0:01:51.884615461] [1604]  INFO Camera camera.cpp:1029
> >      >>> configuring
> >      >>> >>>> streams: (0) 2592x1944-YUV420 (1) 2592x1944-SGBRG10_CSI2P
> >      >>> >>>> [0:01:51.886293267] [1605]  INFO RPI raspberrypi.cpp:759
> >    Sensor:
> >      >>> >>>> /base/soc/i2c0mux/i2c@1 <mailto:i2c@1>/ov5647@36
> <mailto:ov5647@36> - Selected sensor format:
> >      >>> >>>> 2592x1944-SGBRG10_1X10 - Selected unicam format:
> >    2592x1944-pGAA
> >      >>> >>>> Still capture image received
> >      >>> >>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$ ls -l
> foo.jpg
> >      >>> >>>> -rw-rw-r-- 1 ubuntu ubuntu 1078246 Aug  1 20:36 foo.jpg
> >      >>> >>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$ date
> >      >>> >>>> Mon Aug  1 08:36:19 PM UTC 2022
> >      >>> >>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$
> <mailto:ubuntu@jammy-rpi4>:~/ros2_ws$ ros2 run camera_ros
> >    camera_node
> >      >>> >>>>>> [0:18:41.731504883] [2827] INFO Camera
> >    camera_manager.cpp:293
> >      >>> >>>>>> libcamera
> >      >>> >>>>>> v0.0.0+3775-c19150ea
> >      >>> >>>>>> [0:18:41.790475492] [2838] INFO RPI raspberrypi.cpp:1368
> >      >>> Registered
> >      >>> >>>>>> camera /base/soc/i2c0mux/i2c@1
> <mailto:i2c@1>/ov5647@36 <mailto:ov5647@36> to Unicam device
> >      >>> /dev/media0
> >      >>> >>>>>> and ISP device /dev/media2
> >      >>> >>>>>> >> cameras:
> >      >>> >>>>>> 0: ov5647 (/base/soc/i2c0mux/i2c@1
> <mailto:i2c@1>/ov5647@36 <mailto:ov5647@36>)
> >      >>> >>>>>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$
> libcamera-hello --list-cameras
> >      >>> >>>>>>> Available cameras
> >      >>> >>>>>>> -----------------
> >      >>> >>>>>>> 0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1
> <mailto:i2c@1>/ov5647@36 <mailto:ov5647@36>)
> >      >>> >>>>>>>     Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16,
> >      >>> >>>>>>> 0)/2560x1920 crop]
> >      >>> >>>>>>>                              1296x972 [43.25 fps - (0,
> >      >>> >>>>>>> 0)/2592x1944 crop]
> >      >>> >>>>>>>                              1920x1080 [30.62 fps -
> (348,
> >      >>> >>>>>>> 434)/1928x1080 crop]
> >      >>> >>>>>>>                              2592x1944 [15.63 fps - (0,
> >      >>> >>>>>>> 0)/2592x1944 crop]
> >      >>> >>>>>>>
> >      >>> >>>>>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$
> libcamera-jpeg -n -o foo.jpg
> >      >>> >>>>>>> [4:41:15.607911113] [8632]  INFO Camera
> >    camera_manager.cpp:293
> >      >>> >>>>>>> libcamera
> >      >>> >>>>>>> v0.0.0+3775-c19150ea
> >      >>> >>>>>>> [4:41:15.690152997] [8633]  INFO RPI
> raspberrypi.cpp:1368
> >      >>> Registered
> >      >>> >>>>>>> camera /base/soc/i2c0mux/i2c@1
> <mailto:i2c@1>/ov5647@36 <mailto:ov5647@36> to Unicam device
> >      >>> >>>>>>> /dev/media2
> >      >>> >>>>>>> and ISP device /dev/media0
> >      >>> >>>>>>> [4:41:15.692300229] [8632]  INFO Camera camera.cpp:1029
> >      >>> configuring
> >      >>> >>>>>>> streams: (0) 1296x972-YUV420
> >      >>> >>>>>>> [4:41:15.693309340] [8633]  INFO RPI raspberrypi.cpp:759
> >      >>> Sensor:
> >      >>> >>>>>>> /base/soc/i2c0mux/i2c@1 <mailto:i2c@1>/ov5647@36
> <mailto:ov5647@36> - Selected sensor
> >    format:
> >      >>> >>>>>>> 1296x972-SGBRG10_1X10 - Selected unicam format:
> >    1296x972-pGAA
> >      >>> >>>>>>> [4:41:20.882185084] [8632]  INFO Camera camera.cpp:1029
> >      >>> configuring
> >      >>> >>>>>>> streams: (0) 2592x1944-YUV420 (1)
> 2592x1944-SGBRG10_CSI2P
> >      >>> >>>>>>> [4:41:20.885717571] [8633]  INFO RPI raspberrypi.cpp:759
> >      >>> Sensor:
> >      >>> >>>>>>> /base/soc/i2c0mux/i2c@1 <mailto:i2c@1>/ov5647@36
> <mailto:ov5647@36> - Selected sensor
> >    format:
> >      >>> >>>>>>> 2592x1944-SGBRG10_1X10 - Selected unicam format:
> >      >>> 2592x1944-pGAA
> >      >>> >>>>>>> Still capture image received
> >      >>> >>>>>>> ubuntu@jammy-rpi4 <mailto:ubuntu@jammy-rpi4>:~$
> libcamera-vid -n -o output.h264
> >      >>> >>>>>>> [4:21:22.084984046] [8228]  INFO Camera
> >    camera_manager.cpp:293
> >      >>> >>>>>>> libcamera
> >      >>> >>>>>>> v0.0.0+3775-c19150ea
> >      >>> >>>>>>> [4:21:22.167619547] [8229]  INFO RPI
> raspberrypi.cpp:1368
> >      >>> Registered
> >      >>> >>>>>>> camera /base/soc/i2c0mux/i2c@1
> <mailto:i2c@1>/ov5647@36 <mailto:ov5647@36> to Unicam device
> >      >>> >>>>>>> /dev/media2
> >      >>> >>>>>>> and ISP device /dev/media0
> >      >>> >>>>>>> [4:21:22.169812958] [8228]  INFO Camera camera.cpp:1029
> >      >>> configuring
> >      >>> >>>>>>> streams: (0) 640x480-YUV420
> >      >>> >>>>>>> [4:21:22.170966277] [8229]  INFO RPI raspberrypi.cpp:759
> >      >>> Sensor:
> >      >>> >>>>>>> /base/soc/i2c0mux/i2c@1 <mailto:i2c@1>/ov5647@36
> <mailto:ov5647@36> - Selected sensor
> >    format:
> >      >>> >>>>>>> 640x480-SGBRG10_1X10 - Selected unicam format:
> >    640x480-pGAA
> >      >>> >>>>>>> Halting: reached timeout of 5000 milliseconds.
> >      >>> >>>>>>>
> >      >>> >>>>>>> Even things like
> >      >>> >>>>>>> libcamera-vid -n -t 0 --inline --listen -o
> >      >>> tcp://0.0.0.0:8888 <http://0.0.0.0:8888
> <http://0.0.0.0:8888>> <http://0.0.0.0:8888 <http://0.0.0.0:8888>
> >    <http://0.0.0.0:8888 <http://0.0.0.0:8888>> <http://0.0.0.0:8888
> >      >>> >>>>>> >>> camp@turtle11 <mailto:camp@turtle11>:~$ ros2 run
> >      >>> >>>>>> >>> camp@turtle11 <mailto:camp@turtle11>:~$ v4l2-ctl
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>
> >      >>> >>>>>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>>
> >      >>> >>>>>> >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>
> >      >>> >>>>>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>>>.
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>
> >      >>> >>>>>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>>
> >      >>> >>>>>> >> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>
> >      >>> >>>>>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>>>.
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>
> >      >>> >>>>>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>>.
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>.
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>
> >      >>> > <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>>.
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >>> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>>.
> >      >>> To view this discussion on the web visit
> >      >>>
> >
> https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com>
> >
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com>>
> >
> >      >>>
> >
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com>
> >
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com>>>
> >
> >      >>>
> >      >>>
> >
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer>
> >
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer>>
> >
> >      >>>
> >
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer>
> >
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/hbrobotics/e493acd1-38c5-4ee7-ac1f-2c9939e83578n%40googlegroups.com?utm_medium=email&utm_source=footer>>>>.
> >
> >      >>>
> >      >> --
> >      >> You received this message because you are subscribed to the
> Google
> >      >> Groups "HomeBrew Robotics Club" group.
> >      >> To unsubscribe from this group and stop receiving emails from
> >    it, send
> >      >> an email to hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>
> >      >> <mailto:hbrobotics+...@googlegroups.com
> <mailto:...@googlegroups.com>>.
> > an email to hbrobotics+...@googlegroups.com
> <mailto:unsub...@googlegroups.com>
> > <mailto:hbrobotics+...@googlegroups.com
> <mailto:unsub...@googlegroups.com>>.
> <https://groups.google.com/d/msgid/hbrobotics/ed0be833-083e-4917-a4c8-04e0dd199d81n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/hbrobotics/ed0be833-083e-4917-a4c8-04e0dd199d81n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com.
> <mailto:unsub...@googlegroups.com.>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/1536626221.1161142.1660341965954%40mail.yahoo.com
> <https://groups.google.com/d/msgid/hbrobotics/1536626221.1161142.1660341965954%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

James H Phelan

unread,
Aug 21, 2022, 6:00:19 PM8/21/22
to hbrob...@googlegroups.com
RoBuds,

Following the ongoing issue of the difficulty installing a Raspberry Pi
camera and subsequent advice, I thought I'd try to write at least one
successful recipe.

All goes well until the end when I get a policykit error despite
entering the correct password.

Thinking it was a SSH issue, I tried it from the Desktop, but got a
similar error.

Googling the error wasn't informative.

Given it's a permission error, I wonder if something was installed
"sudo" that shouldn't  or vice-versa?

Anybody have a clue?

James

Following from:
https://libcamera.org/getting-started.html
and
https://www.raspberrypi.com/documentation/accessories/camera.html#libcamera-and-libcamera-apps
Skip over Getting Started to install dependencies first
Check for C++
ubuntu@ubuntu:~$ g++ --version
g++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0

ubuntu@ubuntu:~$ pip3 install --user meson
ubuntu@ubuntu:~$ pip3 install --user --upgrade meson

ubuntu@ubuntu:~/libcamera$ pip3 install ninja

Being unclear as to which of the optional dependencies may be needed
install then all.  Respond “y” when asked.
ubuntu@ubuntu:~$ sudo apt install libyaml-dev python3-yaml python3-ply
python3-jinja2
ubuntu@ubuntu:~/libcamera$ sudo apt install libgnutls28-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install libdw-dev libunwind-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install libudev-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install python3-sphinx doxygen
graphviz texlive-latex-extra
ubuntu@ubuntu:~/libcamera$ sudo apt install libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install libevent-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install libdrm-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install libjpeg-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install libsdl2-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install qtbase5-dev libqt5core5a
libqt5gui5 libqt5widgets5 qttools5-dev-tools libtiff-dev
ubuntu@ubuntu:~/libcamera$ sudo apt install liblttng-ust-dev
python3-jinja2 lttng-tools

Configure /boot/firmware/config.txt
ubuntu@ubuntu:~$ cd /boot/firmware/
ubuntu@ubuntu:/boot/firmware$ sudo nano config.txt
    camera_auto_detect=0        [change existing line =1 > =0]
    dtoverlay=imx219        [add new line at bottom for Picamera driver]
    start_x=1            [may also be needed at end to enable camera]

Now to the Getting Started part:
ubuntu@ubuntu:~$ git clone https://git.libcamera.org/libcamera/libcamera.git
ubuntu@ubuntu:~$ cd libcamera
ubuntu@ubuntu:~/libcamera$ meson build
ubuntu@ubuntu:~/libcamera$ ninja -C build install
very long install...then -
[424/425] Installing files.
Installation failed due to insufficient permissions.
Attempting to use polkit to gain elevated privileges...
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/bin/python3' as the super user
Authenticating as: Ubuntu (ubuntu)
Password:
polkit-agent-helper-1: error response to PolicyKit daemon:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.
FAILED: meson-internal__install
/home/ubuntu/.local/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.

James H Phelan

unread,
Aug 21, 2022, 9:01:59 PM8/21/22
to hbrob...@googlegroups.com

I left off the important part:

[424/425] Installing files.
Installation failed due to insufficient permissions.
Attempting to use polkit to gain elevated privileges...
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/bin/python3' as the super user
Authenticating as: Ubuntu (ubuntu)
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.
FAILED: meson-internal__install
/home/ubuntu/.local/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

"Here am I, the servent of the Lord;
let it be with me, according to your Word"
Luke 1:38

James H Phelan

unread,
Aug 21, 2022, 9:04:59 PM8/21/22
to hbrob...@googlegroups.com

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

"Here am I, the servent of the Lord;
let it be with me, according to your Word"
Luke 1:38

On 8/21/2022 5:00 PM, James H Phelan wrote:

Marco Walther

unread,
Aug 22, 2022, 2:17:27 AM8/22/22
to hbrob...@googlegroups.com, James H Phelan
If my memory is correct, you want to do that in two steps

ubuntu@ubuntu:~/libcamera$ ninja -C build

to build most of the stuff as the ubuntu user and then another

ubuntu@ubuntu:~/libcamera$ sudo ninja -C build install

to be able to install everything into /usr/local/*

With the newly built version in /usr/local, you *must make sure*, the
ubuntu packaged version is not installed. Otherwise you will run into
mixing the two which will only cause grief down the line!!

Hope that helps,
-- Marco

Sampsa Ranta

unread,
Aug 22, 2022, 4:14:20 AM8/22/22
to hbrob...@googlegroups.com
Modern policy based rules try to break the UID 0 (root) magic. First came the kernel capabilities bits that allow a bit more fine-grained access to privileged stuff, then came policy based selinux and apparmor.

In short, root privileges will not be the sufficient shortcut with these.

Bad security practise shortcut would be to disable the policy manager (from bootloader kernel parameters for example), but as development test it might feel like good idea. Just dont say ever say aloud you might do such thing when being interviewed.

For proper policy solution, you need to enable some policy to allow functionality or create new policy to capture the stuff.

Proper introduction would be longer, this is kept short.

- Sampsa
 

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.

James H Phelan

unread,
Aug 22, 2022, 6:52:35 AM8/22/22
to Marco Walther, hbrob...@googlegroups.com

Marco,

"you *must make sure*, the ubuntu packaged version is not installed"

I'm not clear what "ubuntu packaged version" refers to.  How would it get there and how do you check?

J

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

"Here am I, the servent of the Lord;
let it be with me, according to your Word"
Luke 1:38

James H Phelan

unread,
Aug 22, 2022, 6:58:51 AM8/22/22
to hbrob...@googlegroups.com

Sampsa,

I'm a hobbyist not an IT professional.  So no risk of ever being interviewed!

This is a robot raspberry pi, not an enterprise server, so no significant security worries.

I just want to get it to work.  What do I do?

James

James H Phelan
"Nihil est sine ratione cur potius sit quam non sit"
Leibniz

"Here am I, the servent of the Lord;
let it be with me, according to your Word"
Luke 1:38

Marco Walther

unread,
Aug 22, 2022, 11:45:52 AM8/22/22
to James H Phelan, hbrob...@googlegroups.com
On 8/22/22 03:52, James H Phelan wrote:
> Marco,
>
> "you *must make sure*, the ubuntu packaged version is not installed"
>
> I'm not clear what "ubuntu packaged version" refers to.  How would it
> get there and how do you check?

Ubuntu has a packaged version of libcamera, which you could either have
installed directly via "apt-get install ..." or "apt install ..." or
similar. But it could also be installed as a dependency of another
package. As many people found out, that packaged version of libcamera
does not work with the RaspiCam.

So, check with "dpkg -l 'libcamera*'" if there are any installed (ii in
the first column).

If you find some, you can try to remove them via "apt-get remove ..." or
similar *but* if other packages depend on it, you will run into trouble.

Your 'built-from-source' version of the libcamera might work standalone.
But it's not really working as a replacement for the 'Ubuntu-provided
package of libcamera':-( For one, it's installed into /usr/local/* by
default and the packaged stuff is expected to live in /usr/*. You could
try to copy stuff around (or even bend the install config) but then any
system update (apt-get upgrade or similar - potentially even
automatically) could override your changes.

All of those are the reasons, why I tried to build those replacement
packages. They took the sources as of four (?) weeks ago and behave like
the real Ubuntu packages. They install things where expected and satisfy
the dependencies for other packages. And since they have a new version
in the original versioning scheme, they would only be replaced by
packages with newer source bases.

As always, it's easy to shoot yourself in the foot. Trying to make
things work repeatable is the hard part.

I hope, this helps,
-- Marco
Reply all
Reply to author
Forward
0 new messages