Activating Raspberry Pi Camera Module 3 in BlueOS via Docker on Raspberry Pi 5


I’m attempting to build my own ROV and have successfully installed BlueOS on a Raspberry Pi 5 using a Docker Container. So far, everything is functioning well; my flight controller, Pixhawk1-1M, is recognized, and I’m able to control the motors through BlueOS v1.2. However, I’ve encountered an issue with the Raspberry Pi Camera Module 3 — it does not appear in the Video Streams section, preventing me from streaming video to QGC v4.3.0.

Based on forum information, activating “Raspberry legacy camera support” in the Video Streams section is necessary to enable Raspberry Pi camera support. However, this feature requires a reboot to activate, and after restarting both the Core Container and the BlueOS system, the “Raspberry legacy camera support” toggle remains deactivated.

I suspect that changes within a Container do not affect its Image, and to apply such changes, using Docker volumes might be necessary. Yet, I cannot identify which changes and in which file are made after “Raspberry legacy camera support” is activated, in order to preserve this settings file between reboots of the Docker container and the BlueOS system.

Could you provide guidance or specific steps on how to permanently activate “Raspberry legacy camera support”? Any detailed commands or file locations to look into would be greatly appreciated. Thanks in advance for your assistance.

Did you install using the script in the repo or did you manually configure things? Is the host OS Debian Bookworm?

Hi @Spyashiy!

It’s nice to know that people are testing BlueOS with the Pi5!
At the moment we don’t have support to the navigator on the pi 5, we are waiting the raspberry pi foundation to update the kernel with the necessary modules required for our hardware.
Meanwhile, using the pixhawk is the best way of using it.
For the camera… does it show in the video streams page at all ?
There are some changes on the camera modules and how they integrate with the kernel. We are going to look into that.

1 Like

Hi, Matt!

I installed the Docker image described at this link without any modifications (using the command sudo su -c 'curl -fsSL | bash'), then updated the image directly from BlueOS in the “BlueOS Version” section to master 1.2.1. On the Raspberry Pi 5, the latest version of Raspberry Pi OS (32-bit) Raspbian GNU/Linux 12 (bookworm) is installed with all current updates. When I tried using the Raspberry Pi OS (64-bit) version, network connections from the host to the Docker container were not forwarded, so I had to use the 32-bit version of the OS.

Hi Patrick!

If I understood correctly, on the Video Streams page, the camera does not appear. I managed to launch the video stream on the host OS using standard tools (rpicam-vid -t 0 --framerate 12 --width 800 --height 600 --inline -o udp:// ) and connect to it on GCS (Windows 10) using the command ffplay udp:// -fflags nobuffer -flags low_delay -framedrop. However, this stream does not play in QGC. Currently, I am trying to launch the GStreamer stream with libcamera following the advice of João Antônio Cardoso. I am attaching the mavlink-camera-manager logs to this message.
I read on the forum that support for the Pi5 is not planned until the end of 2024, so I would be grateful for any help and tips for solving this task. (43.0 KB)

do you have any errors from “Commander” in the frontend? can you share the errors on the top-right notification bar? do this after trying to enable the legacy camera support

There are only errors from Commander, System Information, and WiFi Manager In Notifications; no other errors are present. Meanwhile, WiFi is functioning, and updates are downloading without any issues. I took a screenshot immediately after attempting to activate “Raspberry legacy camera support”:

I forgot to attach the screenshot of the error that occurs right after entering the Video Streams section to my first message:

I’ve updated to version 1.2.2 and tracked other errors in Commander:

As I understand it, the legacy camera support is for allowing the original Raspberry Pi Camera Module to be accessed via v4l2, which gstreamer makes use of through v4l2src. Newer camera modules (2/3) are not supported by that, and need to be accessed via libcamera (libcamerasrc in gstreamer), which our default gstreamer configuration does not make use of (hence @joaoantoniocardoso suggesting you try to set that up separately).

It is currently expected that new Raspberry Pi camera modules will not work until support has been added for them.

1 Like

Hi Eliot!

Thank you for your response; I’ll be looking forward to Raspberry Pi camera support implementation.

Leaving this here, it might be useful for someone.
At the moment, I’ve managed to set up a stream from the host to QGC via GStreamer and libcamerasrc, but the stream is not very good quality with a delay of several seconds and regular interruptions.
I installed GStreamer on the host with the command: sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-gl gstreamer1.0-plugins-base-apps libcamera-dev gstreamer1.0-libcamera

For the stream, I use the pipeline:
gst-launch-1.0 -v libcamerasrc ! video/x-raw, format=RGBx, width=1920, height=1080, framerate=30/1 ! timeoverlay ! videoconvert ! video/x-raw,format=I420 ! x264enc ! rtph264pay config-interval=-1 ! udpsink host= port=5600 sync=false async=true

Instead of x264enc, you can specify openh264enc, which will reduce CPU load.