Zum Inhalt springen

WSAL11633 – RPi Camera V2/en

Aus JW Tech Wiki

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The RPi Camera V2 is an official Raspberry Pi camera module that connects via the CSI port to various Raspberry Pi boards. It supports several sensor chips (including IMX477) and is controlled using libcamera or rpicam commands.

Related products at JW Tech

Technical overview

  • Connection: The camera plugs into the CSI port; Raspberry Pi 5 offers two CSI ports, while on the Zero series the port sits next to the power connector.
  • Supported sensors: The module can be used with various sensor chips such as OV5647, IMX219, IMX477, or IMX708; supported drivers are libcamera or Raspicam depending on the model.
  • System updates: When using the latest Camera Module 3 or Global Shutter camera, run 'sudo apt-get update -y' and 'sudo apt-get upgrade -y'.
  • config.txt setup: For non-official cameras, set 'camera_auto_detect=0' in /boot/config.txt (or /boot/firmware/config.txt on Bookworm) and add the appropriate dtoverlay line.
  • Binocular example: Two cameras can be connected simultaneously by appending 'cam0' and 'cap1' after the respective configuration lines.
  • Start preview: Run 'sudo libcamera-hello -t 0' in the terminal; close the preview with Alt+F4 or Ctrl+C.
  • Capture stills: 'rpicam-jpeg -o test.jpg' captures a JPEG image; options like --width and --height control resolution.
  • Exposure control: Use '--shutter' and '--gain' to fix exposure time and gain, e.g. 'rpicam-jpeg -o test.jpg -t 2000 --shutter 20000 --gain 1.5'.
  • Tuning files: For specific sensors (e.g., NoIR variants), a custom tuning file can be specified via '--tuning-file'.

Commands and examples – verify before use: 

sudo apt-get update -y
sudo apt-get upgrade -y
sudo nano /boot/config.txt
sudo nano /boot/firmware/config.txt
sudo libcamera-hello -t 0
sudo libcamera-hello -t 0 --camera 0
sudo libcamera-hello -t 0 --camera 1
rpicam-hello
rpicam-hello -t 0
rpicam-jpeg -o test.jpg
rpicam-jpeg -o test.jpg -t 2000 --width 640 --height 480
rpicam-jpeg -o test.jpg -t 2000 --shutter 20000 --gain 1.5
rpicam-hello --tuning-file /usr/share/libcamera/ipa/rpi/vc4/imx219_noir.json
rpicam-hello --tuning-file /usr/share/libcamera/ipa/rpi/pisp/imx219_noir.json
dtoverlay=imx219,cam0
dtoverlay=ov5647,cam1

Notes and version constraints

  • Exact compatibility with specific board versions (e.g., Compute Module) depends on the particular carrier board; verify the CSI port location before connecting.
  • Using non-official cameras requires manual configuration in config.txt; without these steps the camera may remain undetected.
  • Older systems (Bullseye/Buster) have different activation steps; use the corresponding section of the guide accordingly.
  • Adding a JSON file for IMX290 on Raspberry Pi 5 requires network access to download the file; this step cannot be performed without internet connectivity.
  • For binocular cameras, explicitly specify the camera ID with '--camera'; otherwise cam0 is used by default.
  • Older devices (Raspberry Pi 3 and earlier) under Bullseye may require enabling Glamor via raspi-config for hardware-accelerated preview.

Source and revision record

  • RPi Camera V2 - Waveshare Wiki
  • Source revision: 89211
  • Captured: 2026-08-30T03:06:11+00:00
  • SHA-256: 579b4a2b7cf2291aeb5e9d3dc8c46af22e9b9f2124562731e6a4df06c22d3bae