Hi folks - First up I am a UNIX novice. I am trying to use my RPi camera 3 module with my RPi 4B that has been step up with Mainsail host and Klipper to control my 3D printer (Ender 3). My RPi 4B has Bullseye OS as the base UNIX OS.
When I try to use libcamera I get the following:
pi@mainsailos:~/crowsnest/bin/camera-streamer/tools $ libcamera-hello
Preview window unavailable
[14:05:55.757536670] [38917] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[14:05:55.776149797] [38918] ERROR V4L2 v4l2_device.cpp:353 'imx708_wide': Unable to set controls: Device or resource busy
[14:05:55.795792559] [38918] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media1 and ISP device /dev/media2
[14:05:55.795948242] [38918] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[14:05:55.796362755] [38917] INFO Camera camera.cpp:840 Pipeline handler in use by another process
ERROR: *** failed to acquire camera /base/soc/i2c0mux/i2c@1/imx708@1a ***
I’m afraid I have no idea what that all means and therefore don’t know where to go next.
The reason I am trying to get to the camera controls is that the camera refuses to focus under Mainsail/Spyglass control and I’m trying to work out why.
Thanks in advance
Is anything running on the Pi that could be using the camera? How did you set the camera up?
vcgencmd get_camera
This is another line you can use to detect if a camera is available. ‘imx708_wide’ this should be the camera but its just another sanity check you can do.
My RPi is set up to run Klipper for my 3D printer and uses Mainsail and various other interfaces to do this. I suspect that Mainsail / Crowsnest / Spyglass may be the culprits but I have no expertise in Unix and don’t know how to determine this.
That response to Jack’s suggestion indicates that your Pi can’t detect your camera at all.
I would suggest looking over the steps you took to set up the camera and make sure you didn’t miss anything.
otherwise ensuring these steps have been successfully completed should give us a good baseline to figure out what is causing this:
Update Your Raspberry Pi OS: Open the terminal and run: sudo apt-get update sudo apt-get upgrade
Enable the Camera Interface: Use raspi-config to enable the camera = sudo raspi-config. Navigate to Interfacing Options → Camera → Enable, then reboot your Raspberry Pi.
Install Camera Software:sudo apt-get install libcamera-apps
Hi Samuel – did that and i can now get some response from the camera. I think there’s something else going on though, probably to do with the Mainsail service that is running on the pi to control my 3D printer. I’ll keep digging …