How to setup a Raspicam?

Setup/Configure Raspicam

First of all, this procedure is tested with Raspicam v1.3, v2.1 and v3. But should work in the same manner with Arducams (not tested yet). For this example I used the v3 model.

Step 1: Get your device path

Open crowsnest.log and look for an entry like this:

[05/25/23 19:12:07] crowsnest: Detected 'libcamera' device -> /base/soc/i2c0mux/i2c@1/imx708@1a

Step 2: Set your device path

Open your crowsnest.conf in Mainsail and look for the device: entry. Now set the device to the one, grabbed from your log.

device: /base/soc/i2c0mux/i2c@1/imx708@1a

Step 3: Change mode to camera-streamer

Now you have to use camera-streamer as your stream service with:

mode: camera-streamer

After you finished these steps, please click on SAVE & RESTART. Now your camera stream should show up.

Configuration example

Here is a good crowsnest.confexample for a Raspicam v1. The whole explaination can be found in this post on github.

Thanks to ytugarev for spending time on this example

Troubleshooting

Raspicam not detected

Login to your Pi (or Linux machine) and type:

If your output looks like this, your /boot/config.txt is probably misconfigured:

Run this command via terminal to open your /boot/config.txt with nano as editor:

Look for the following entries and change it:

  • start_x=1 this value is deprecated. If you have it in your /boot/config.txt, delete this line.

  • camera_auto_detect=0 this value is deprecated. If you have it in your /boot/config.txt, delete this line.

  • Double-check if you have camera_auto_detect=1 in your /boot/config.txt. If you don't have it in your config, please add it at the bottom of this file.

  • Check if you have dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d in your /boot/config.txt. If you don't have one of these options in your /boot/config.txt without a # in front of the line, please add dtoverlay=vc4-kms-v3d to your /boot/config.txt.

Press CTRL-s to save and CTRL-x to close the nano editor. Then reboot the machine.

After the reboot, please reconnect your ssh client with your machine. Type libcamera-hello --list-cameras again. You should see something like this (a Raspicam V2 was used in this example):

If you get No cameras available! a second time, please check connections and the ribbon cable. Also avoid running the ribbon near stepper motors, stepper drivers and/or power supplies. They can interfere with the signal.

OV5647 and/or klipperscreen

For some users there are problems with the OV5647 sensor module or a Raspberry Pi camera module in combination with klipperscreen. These issues appear to be a problem inside the kernel of the Raspberry Pi itself with the new camera stack libcamera. The easiest option to fix this for now is to use the legacy camera stack of the Raspberry Pi (not to be confused with the legacy branch of crowsnest!!!).

We don't provide support for klipperscreen. If you still have problems with your klipperscreen after these changes, please reach out to the klipperscreen support.

Step 1: Change your /boot/config.txt

Run this command via terminal to open your /boot/config.txt with nano as editor:

Look for the following entries and change it:

  • start_x=1 this value is needed for the legacy camera stack to work. If you don't have it in your /boot/config.txt, please add it at the bottom of this file.

  • camera_auto_detect=0 is needed for the legacy camera stack to work. If you don't have it in your /boot/config.txt, please add it at the bottom of this file.

  • Double-check if you have camera_auto_detect=1 in your /boot/config.txt. If you have it in your config, delete this line.

Press CTRL-s to save and CTRL-x to close the nano editor. Then reboot the machine.

After the reboot, please reconnect your ssh client with your machine. Type vcgencmd get_camera. You should see:

If you get anything else, please check your /boot/config.txt again and the ribbon cable.

Step 2: Set your device path

Open your crowsnest.conf in Mainsail and look for the device: entry. Now set the device to /dev/video0.

Step 3: Try out ustreamer and camera-streamer

With this setup you should be able to use either ustreameror camera-streamer. Sometimes it occurs that camera-streamer doesn't run stable enough with this setup. If you have problems with camera-streamer then change your mode to ustreamer:

After changing the mode, please click on SAVE & RESTART.

Last updated

Was this helpful?