signag / raspi-cam-srv

Web Server for Raspi Camera Access
MIT License
67 stars 7 forks source link

Raspberry Pi 5 x64 Bookworm with Camera Module 3 - No cameras detected #6

Open jonathan88n opened 8 months ago

jonathan88n commented 8 months ago

When starting up the camsrv, I see error logs in the terminal that says the following:

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

rpi5-1 rpi5-2 I've attached two pictures of the cable hook up into cam0 slot.

signag commented 8 months ago

Your cabeling looks OK.

The error is raised when Picamera2 does not return any camera information. You can test it directly:

~ $ python
>>> from picamera2 import Picamera2
>>> print(Picamera2.global_camera_info())
>>> quit()

After some libcamera INFOs, you should see
[{'Model': 'imx708_wide_noir', 'Location': 2, 'Rotation': 0, 'Id': '/base/soc/i2c0mux/i2c@1/imx708@1a'}]

If you see an empty list, instead
[],
Picamera2 did not find a camera.

In this case, you may have activated legacy camera support. Open the Raspberry Pi Configuration tool:

~ $ sudo raspi-config
Select "3 Interface Options"
Then "I1 Legacy Camera Enable/disable legacy camera support"

If you see "Would you like to enable legacy camera support?"
select <No>

When back in the main menu, choose <Finish>

The tool will request to reboot, which must be confirmed with <Yes>

After reboot, you can reconnect via SSH and repeat the direct test with Python, described above.

jonathan88n commented 8 months ago

print(Picamera2.global_camera_info()) did return an empty list ( [] ).

I did sudo raspi-config and went to Interface Options but had no Legacy or Camera options: image

uname -a

Linux rpi5 6.1.0-rpi8-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

signag commented 8 months ago

Can you please check /boot/firmware/config.txt

This must have an active entry camera_auto_detect=1

jonathan88n commented 8 months ago

sudo cat /boot/firmware/config.txt | grep camera_auto

camera_auto_detect=1

I am using a Raspberry Pi Camera Cable (Standard - Mini | 200mm) by the way.

signag commented 8 months ago

Certainly, you may have already looked elswhere for solutions.
Maybe, this one has some new aspects:
https://www.raspberrypi-5.com/questions/cant-open-camera-by-index-raspberry-pi/
... especially the permission check.

The primary check would, of course, be to check the cables.

Looking again at your picture for the camera side, it seems to me that the cable is not pushed far enough into the connector.
Normally, there is not so much to be seen from the gold contacts.

If that all does not help and if you have a spare SD card, I would recommend preparing a fresh install with the latest imager version.

ZombieToad commented 8 months ago

rpi5-1

The cable connected to your Raspberry Pi 5 is reversed

jonathan88n commented 8 months ago

@signag, I have indeed looked elsewhere but I'll give those troubleshooting steps a try. @ZombieToad, are you saying the connector (gold side) should be facing the HDMI instead of facing where the SD card is inserted? I read elsewhere that that cable should be facing opposite direction of the HDMI port.

ZombieToad commented 8 months ago

@signag, I have indeed looked elsewhere but I'll give those troubleshooting steps a try. @ZombieToad, are you saying the connector (gold side) should be facing the HDMI instead of facing where the SD card is inserted? I read elsewhere that that cable should be facing opposite direction of the HDMI port.

the HDMI and SD card slot are on the same side from the camera connector? the gold contacts should be facing the ethernet port (away from the hdmi ports) image2

jonathan88n commented 8 months ago

@ZombieToad, so I tried flipping the cable around to face the Ethernet port but still no luck: image image image

@signag, I noticed in those troubleshooting steps, the permission check shows I don't even have /dev/video0 at all: image

image

signag commented 8 months ago

What about a fresh install with latest imager version 1.8.5 from https://www.raspberrypi.com/software/?

What is your OS version?

Here is mine: image

jonathan88n commented 8 months ago

Here is my OS info: image

I just recently did a fresh image 2 weeks ago.

signag commented 8 months ago

I still think that your cables might be pushed in further.

here is my setup:

20240311_184158

20240311_183850

Do you have the possibility to try with another camera?
Perhaps this one has a defect.

jonathan88n commented 8 months ago

So, I do have another Camera Module 3 camera that works successfully with a RPI4 x64 Bulleye and I have tried to use that camera on the RPI5 and the cable doesn't not go any further (it hits a wall, if you will) when inserting it. Both cameras do not get detected in the RPI5 while both DO get detected in the RPI4.

signag commented 8 months ago

Then I have no more idea, except that the camera port on your pi5 does not work.

jonathan88n commented 8 months ago

Does /dev/video0 and /dev/video1 show for you whether or not you have camera plugged in for you? ls -lha /dev/video* doesn't return any video0 or video1, only video19+

image

signag commented 8 months ago

This is with no camera plugged in:
image

This is with one camera plugged in:
image

And this with two cameras:
image

jonathan88n commented 7 months ago

What cable connector are you using between your RPI and Camera Module 3 (link if you don't mind)? I will try getting a new cable

signag commented 7 months ago

I use this one:
https://www.rasppishop.de/Raspberry-Pi-Zero-Kamera-Kabel-150mm-11944

and this: https://www.rasppishop.de/Raspberry-Pi-5-Kamera-Kabel-Standard-Mini-500mm