Want to connect camera module 3 to raspberry pi 3

Hi, I am new to raspberry pi, i recently have a project that needed to connect camera module to raspberry pi 3. And I cannot connect it as others might. When I dive into different website, I could not understand what they are doing too. Can anyone help me? When I type in libcamera-hello, it says libEGL warning: DRI2: failed to authenticate
Made X/EGL preview window
[0:32:45.837102216] [3278] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
ERROR: *** no cameras available ***

Run dietpi-config, go into Display Options and activate RPi Camera and then reboot the device and try again.

hi, i seen this yesterday, but it shows the command not found
user@raspberrypi:~ $ dietpi-config
bash: dietpi-config: command not found

Can you please fill out the troubleshoot template:

Required Information

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname --all
  • Architecture | dpkg --print-architecture
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

sorry, by fill out the troubleshoot template means??
image

i tried this command,
image
yesterday still got supported=1, detected=0, libcamera interfaces=0
today become 0

Do you even use DietPi?

ls /boot/dietpi

i’m sorry, but does it means just type in in the command window? if yes, it shows this
image

What OS have you installed?

image

I will move this topic to the general discussion since it’s not related to DietPi.

How to config the camera module with Raspberry Pi OS is explained in RPi documentation:
https://www.raspberrypi.com/documentation/computers/camera_software.html#getting-started

i have tried according to the website but it still cannot work. Is there any chance to know the camera module is working fine or not?

What camera module do you use?

it says camera module 3

What is the output of

ls /dev/video*

/dev/video10 /dev/video13 /dev/video16 /dev/video21 /dev/video31
/dev/video11 /dev/video14 /dev/video18 /dev/video22
/dev/video12 /dev/video15 /dev/video20 /dev/video23

Looks like it is detected at least.
If the instructions from official RPi docs does not work it would be the best to ask directly in the RPi forums about this issue.

alright, thank you so much

So meanwhile I got a Camera Module v3 NoIR wide and did some testing.
I set/changed in config.txt to the following:

#-------RPi camera module-------
start_x=1
dtoverlay=vc4-kms-v3d,cma-384
camera_auto_detect=1
#disable_camera_led=1

(adding ,cma-384 was necessary to get Picamera2 WebUI Lite working on my RPi 3B+)
I installed libcamera and libcamera-apps-lite and got a response from libcamera-hello like:

root@TestPi3B:~# libcamera-hello
[0:35:33.602847361] [2205]  INFO Camera camera_manager.cpp:284 libcamera v0.2.0+120-eb00c13d
[0:35:33.828322361] [2208]  WARN RPiSdn sdn.cpp:40 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:35:33.836540330] [2208]  INFO RPI vc4.cpp:446 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:35:33.836838872] [2208]  INFO RPI pipeline_base.cpp:1102 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
Preview window unavailable
Mode selection for 2304:1296:12:P
    SRGGB10_CSI2P,1536x864/0 - Score: 3400
    SRGGB10_CSI2P,2304x1296/0 - Score: 1000
    SRGGB10_CSI2P,4608x2592/0 - Score: 1900
Stream configuration adjusted
[0:35:33.846561163] [2205]  INFO Camera camera.cpp:1183 configuring streams: (0) 2304x1296-YUV420 (1) 2304x1296-SBGGR10_CSI2P
[0:35:33.847628090] [2208]  INFO RPI vc4.cpp:621 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA
#0 (0.00 fps) exp 8176.00 ag 1.12 dg 1.15
#1 (30.01 fps) exp 8176.00 ag 1.12 dg 1.22
...

I use Picamera2 WebUI Lite to get camera output and controls in a browser.
Without the ,cma-384 in the config.txt I got some error about memory.

So for this you need Python and Git, both can be installed via dietpi-software.
Then you need also to install flask and picamera2:
Flask is available via pip and picamera2 comes from RPi repo)

pip install Flask
sudo apt install -y python3-picamera2 --no-install-recommends

(--no-install-recommends is used to not install the GUI dependencies, since we just ouput into a webserver)
Then we clone the github repo, cd into and start the app:

git clone https://github.com/monkeymademe/picamera2-WebUI-Lite.git
cd picamera2-WebUI-Lite
python3 app.py

and a webserver will start at port 8080.

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.