Open jonathan88n opened 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.
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:
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
Can you please check /boot/firmware/config.txt
This must have an active entry camera_auto_detect=1
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.
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.
The cable connected to your Raspberry Pi 5 is reversed
@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.
@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)
@ZombieToad, so I tried flipping the cable around to face the Ethernet port but still no luck:
@signag, I noticed in those troubleshooting steps, the permission check shows I don't even have /dev/video0 at all:
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:
Here is my OS info:
I just recently did a fresh image 2 weeks ago.
I still think that your cables might be pushed in further.
here is my setup:
Do you have the possibility to try with another camera?
Perhaps this one has a defect.
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.
Then I have no more idea, except that the camera port on your pi5 does not work.
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+
This is with no camera plugged in:
This is with one camera plugged in:
And this with two cameras:
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
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.
I've attached two pictures of the cable hook up into cam0 slot.