wpilibsuite / WPILibPi

WPILib Raspberry Pi images designed for FRC (formerly FRCVision)
Other
86 stars 40 forks source link

Pi Camera Module 3 support #230

Closed Krylez closed 1 year ago

Krylez commented 1 year ago

I'm having difficulty getting the Pi Camera Module 3 up and running. After reading a thread on Chief Delphi, I added this to config.txt:

[all]
dtoverlay=imx708

After rebooting, there's no camera stream and dmesg shows:

[   16.522091] unicam fe801000.csi: Wrong metadata width/height/code 16384x1 00007002 (remote pad set to 28800x1 00007002)
[   16.522136] unicam fe801000.csi: Failed to start media pipeline: -22
[   31.716613] cam-dummy-reg: disabling

Just to confirm, the camera shows up as connected on the dashboard and I've set the pixel format to YUYV and tried all of the below resolutions, which are documented supported resolutions:

Using damera_auto_detect=0 gets rid of the dmesg error, but there's still no camera stream.

It also makes no difference whether media-controller=0 is there or not.

Any tips?

PeterJohnson commented 1 year ago

So there's a bug with the built-in camera server in this release where the first camera doesn't work. It will be fixed in the next release, or you can work around it by using the python camera server and making the change in this commit: https://github.com/wpilibsuite/WPILibPi/commit/acac6a6f828d33717d2a91181a59d764ddb77bdb

Krylez commented 1 year ago

Thanks for replying so quickly. Just to confirm, I'll need to patch the changes from that commit to the source for the 2023.1.1 release and then build the OS?

Krylez commented 1 year ago

So I tried carefully following along with the build instructions for WPILibPi, but I've had no success. I don't think I can devote the time to figuring that out on top of the other things we're working on. Is that the only way to fix this? Is the next release likely to be in a few months?

PeterJohnson commented 1 year ago

Next release is imminent (uploading now).

PeterJohnson commented 1 year ago

2023.2.1 is now released. Please reopen this issue if you continue to have problems.