Raspberry Pi 4 CM Bookworm
Prepare SD card
- Device: Raspberry Pi 4 (Models B, 400, and compute Modules 4, 4S)
- OS: Raspberry Pi OS (64-bit) (tested with release 2025-07-13)
Connect CSI2 camera
In this picture camera is connected to cam1 port.
OS Prepare
Login to your Raspberry device and update it first.
sudo apt update
sudo apt upgrade -y
AR0234
Camera 234x-CSI-M12x
Install AR0234 kernel driver, follow instructions on github. This will take some time.
Edit config file:
sudo nano /boot/firmware/config.txt
# camera_auto_detect=1 --- Find camera_auto_detect=1 and comment it out.
# Paste these lines at the end of the config file
dtoverlay=ar0234,cam1
camera_auto_detect=0
Reboot
Test camera
Check if camera is detected
rpicam-hello --list-cameras
Available cameras
-----------------
0 : ar0234 [1920x1200 10-bit GRBG] (/base/soc/i2c0mux/i2c@1/ar0234@10)
Modes: 'SGRBG10_CSI2P' : 1280x800 [90.11 fps - (314, 190)/1280x800 crop]
1920x1200 [60.47 fps - (0, 0)/1920x1200 crop]
'SGRBG8' : 1280x800 [90.11 fps - (314, 190)/1280x800 crop]
1920x1200 [60.47 fps - (0, 0)/1920x1200 crop]
Capture picture to /tmp/test.jpg
rpicam-jpeg -o /tmp/test.jpg -n
[0:01:49.868191487] [1657] INFO Camera camera_manager.cpp:326 libcamera v0.0.0+5529-1565507d
[0:01:49.909305340] [1658] WARN RPiSdn sdn.cpp:40 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:01:49.911981503] [1658] INFO RPI vc4.cpp:447 Registered camera /base/soc/i2c0mux/i2c@1/ar0234@10 to Unicam device /dev/media3 and ISP device /dev/media1
[0:01:49.912148873] [1658] INFO RPI pipeline_base.cpp:1121 Using configuration file '/usr/local/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Mode selection for 960:600:12:P
SGRBG10_CSI2P,1280x800/0 - Score: 1130
SGRBG10_CSI2P,1920x1200/0 - Score: 1390
SGRBG8,1280x800/0 - Score: 2130
SGRBG8,1920x1200/0 - Score: 2390
Stream configuration adjusted
[0:01:49.914289833] [1657] INFO Camera camera.cpp:1205 configuring streams: (0) 960x600-YUV420 (1) 1280x800-SGRBG10_CSI2P
[0:01:49.914856314] [1658] INFO RPI vc4.cpp:622 Sensor: /base/soc/i2c0mux/i2c@1/ar0234@10 - Selected sensor format: 1280x800-SGRBG10_1X10 - Selected unicam format: 1280x800-pgAA
Mode selection for 1920:1200:12:P
SGRBG10_CSI2P,1280x800/0 - Score: 3080
SGRBG10_CSI2P,1920x1200/0 - Score: 1000
SGRBG8,1280x800/0 - Score: 4080
SGRBG8,1920x1200/0 - Score: 2000
Stream configuration adjusted
[0:01:55.234584045] [1657] INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1200-YUV420 (1) 1920x1200-SGRBG10_CSI2P
[0:01:55.238675782] [1658] INFO RPI vc4.cpp:622 Sensor: /base/soc/i2c0mux/i2c@1/ar0234@10 - Selected sensor format: 1920x1200-SGRBG10_1X10 - Selected unicam format: 1920x1200-pgAA
Still capture image received